/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // // PdfPublishCollectionFolder.h // /////////////////////////////////////////////////////////////////////////////// #ifndef _PDF_PUBLISH_ATTACHED_FOLDER_INCLUDED_ #define _PDF_PUBLISH_ATTACHED_FOLDER_INCLUDED_ #include "PdfPublishBaseObject.h" #include "PdfPublishImage.h" #include "StringArray.h" #include "DoubleArray.h" /** \details Contains declarations for Publish SDK. */ namespace OdPdfPublish{ class OdAttachedFolder; /** \details A data type that represents a smart pointer to an object. */ SMARTPTR(OdAttachedFolder); /** \details This class implements an attached folder entity in PDF documents created with Publish SDK. */ class PDFPUBLISH_TOOLKIT OdAttachedFolder : public OdObject { protected: OdAttachedFolder(); public: ODRX_DECLARE_MEMBERS(OdAttachedFolder); ODRX_HEAP_OPERATORS(); /** \details Destroys the attached folder object. */ ~OdAttachedFolder() override; /** \details Sets the displayed name of the attached folder. Use IsValid() to check the status of the operation. \param name [in] A new displayed name value. */ void setName(const OdString& name); /** \details Sets the description for the attached folder object. \param description [in] A string that contains the new description. */ void setDescription(const OdString& description); /** \details Sets the creation date of the attached folder object. \param creation_date [in] An OdTimeStamp object that contains the new creation date. */ void setCreationDate(const OdTimeStamp& creation_date); /** \details Sets the modification date of the attached folder object. \param mod_date [in] An OdTimeStamp object that contains the new modification date. */ void setModDate(const OdTimeStamp& mod_date); /** \details Sets the thumbnail for the attached folder object. \param pImage [in] A smart pointer to a thumbnail object. */ void setThumb(const OdImagePtr& pImage); /** \details Adds a new text collection item for the attached folder object. \param name [in] A string that contains the name of the new collection item. \param item [in] A string that contains the new collection item text. \remarks * The name cannot contain any special characters or spaces. * To display the collection items, the collection must contain a column with the same name. */ void addTextCollectionItem(const OdString& name, const OdString& item); /** \details Adds a new date collection item for the attached folder object. \param name [in] A string that contains the name of the new collection item. \param date [in] An OdTimeStamp object that contains the new collection item date. \remarks * The name cannot contain any special characters or spaces. * To display the collection items, the collection must contain a column with the same name. */ void addDateCollectionItem(const OdString& name, const OdTimeStamp& date); /** \details Adds a new numeric collection item for the attached folder object. \param name [in] A string that contains the name of the new collection item. \param number [in] A double value that represents the new collection item value. */ void addNumberCollectionItem(const OdString& name, const double& number); /** \details Adds a new child object for the attached folder object. \param folder [in] A smart pointer to a child object. */ void addChildFolder(const OdAttachedFolderPtr& folder); /** \details Adds a new object for the attached folder. \param file [in] A smart pointer to the object. */ void addFile(const OdAttachedFilePtr& file); /** \details Returns the current displayed name of the attached folder object. The method fills a passed string object and returns it to the calling subroutine. \param name [out] A placeholder for a string that contains the displayed name. */ void getName(OdString& name) const; /** \details Returns the current description of the attached folder object. The method fills a passed string object and returns it to the calling subroutine. \param description [out] A placeholder for a string that contains the description. */ void getDescription(OdString& description) const; /** \details Returns the creation date of the attached folder object. The method fills a passed OdTimeStamp object and returns it to the calling subroutine. \param creation_date [out] A placeholder for an OdTimeStamp object that contains the creation date. */ void getCreationDate(OdTimeStamp& creation_date) const; /** \details Returns the date of the latest modification from the attached folder object. The method fills a passed OdTimeStamp object and returns it to the calling subroutine. \param mod_date [out] A placeholder for an OdTimeStamp object that contains the date of the latest modification. */ void getModDate(OdTimeStamp& mod_date) const; /** \details Returns the current thumbnail object from the attached folder object. The method fills a passed object and returns it to the calling subroutine. \param pOutImage [out] A placeholder for the object. */ void getThumb(OdImagePtr& pOutImage) const; /** \details Returns an array of the collection text items from the attached folder object. This method fills the passed string array with item names and a string array with item values, then returns them to a calling subroutine. \param names [out] A placeholder for the collection item names. \param items [out] A placeholder for the collection text item values. */ void getTextCollectionItems(OdStringArray& names, OdStringArray& items) const; /** \details Returns a collection of the collection date items from the attached folder object. This method fills the passed string array with item names and the array of OdTimeStamp objects, then returns them to a calling subroutine. \param names [out] A placeholder for the collection item names. \param dates [out] A placeholder for the collection date item values. */ void getDateCollectionItems(OdStringArray& names, OdArray& dates) const; /** \details Returns an array of the numeric collection items from the attached folder object. This method fills the passed string array with item names and the array of numeric item values, then returns them to a calling subroutine. \param names [out] A placeholder for the collection item names. \param numbers [out] A placeholder for the numeric collection item values. */ void getNumberCollectionItems(OdStringArray& names, OdDoubleArray& numbers) const; /** \details Returns a collection of children from the attached folder object. This method fills the passed to objects, then returns it to a calling subroutine. \param folders [out] A placeholder for the collection of . */ void getChildFolders(OdAttachedFolderPtrArray& folders) const; /** \details Returns a collection of from the attached folder object. This method fills the passed to objects, then returns them to a calling subroutine. \param files [out] A placeholder for the collection of . */ void getFiles(OdAttachedFilePtrArray& files) const; }; } #endif // _PDF_PUBLISH_ATTACHED_FOLDER_INCLUDED_