/////////////////////////////////////////////////////////////////////////////// // 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. /////////////////////////////////////////////////////////////////////////////// #ifndef __TNW_GRAPHICJSONBUNDLE_H__ #define __TNW_GRAPHICJSONBUNDLE_H__ #include "NwObject.h" #include "NwExport.h" class OdBinaryData; /** \details This class represents a background element with colors. */ class NWDBEXPORT OdNwGraphicJsonBundle : public OdNwObject { ODRX_DECLARE_MEMBERS(OdNwGraphicJsonBundle); /** \details Default constructor. Creates a new OdNwGraphicJsonBundle object. */ OdNwGraphicJsonBundle(); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwGraphicJsonBundle(); public: /** \details Receives the main JSON of the objects. \returns An OdString with JSON content. */ virtual OdString getJson() const = 0; /** \details Sets the main JSON string. \param json [in] String with the main JSON. \returns The eOk value if the operation is successful, or an appropriate error code otherwise. */ virtual OdResult setJson(const OdString& json) = 0; /** \details Sets the material JSON string. \param json [in] String with the material JSON. \remarks The method is deprecated. Use the method OdResult setJson(const OdString& json) for setting JSON properties. */ virtual void setMaterialJson(const OdString& json) = 0; /** \details Receives the material JSON of the objects. \returns An OdString with material JSON content. \remarks The method is deprecated since relaese/25.9. */ virtual OdString getMaterialJson() const = 0; /** \details Sets a file reference. \param key [in] String with the file's key. \param name [in] String with the file's path. \remarks The method is deprecated since relaese/25.9. */ virtual void setFileRef(const OdString& key, const OdString& name) = 0; /** \details Receives the file reference by key. \returns An OdString with the file path if it exists or an empty string otherwise. */ virtual OdString getFileRef(const OdString& key) const = 0; /** \details Sets a temporary file. \param key [in] String with the file's key. \param cantent [in] OdBinaryData with the file's content. \remarks The method is deprecated since relaese/25.9. */ virtual void setFileEmbedded(const OdString& key, const OdBinaryData& content) = 0; /** \details Receives the temporary file content by key. \returns An OdBinaryData with the temporary file content. */ virtual OdBinaryData getFileEmbedded(const OdString& key) const = 0; /** \details Receives the file reference keys. \returns An array of strings with the file reference keys. */ virtual OdArray getFileRefKeys() const = 0; /** \details Receives the embedded file keys. \returns An array of strings with embedded file keys. */ virtual OdArray getFileEmbeddedKeys() const = 0; }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwGraphicJsonBundle object pointers. */ typedef OdSmartPtr OdNwGraphicJsonBundlePtr; #endif //__TNW_GRAPHICJSONBUNDLE_H__