/////////////////////////////////////////////////////////////////////////////// // 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 _BCF_3_0_EXTENSIONS_H #define _BCF_3_0_EXTENSIONS_H #include "BcfCommon.h" #include "OdArray.h" #include "BcfElement.h" /** \details Contains declarations related to working with BCF files content. */ namespace OdBcf { class OdBcfValidationContext; } /** \details Contains declarations related to working with data of the BCF format version 3.0. */ namespace OdBcf_3_0 { class OdBcfTopicTypes; /** \details A data type that represents a smart pointer to an OdBcfTopicTypes object. */ typedef OdSmartPtr OdBcfTopicTypesPtr; class OdBcfTopicStatuses; /** \details A data type that represents a smart pointer to an OdBcfTopicStatuses object. */ typedef OdSmartPtr OdBcfTopicStatusesPtr; class OdBcfPriorities; /** \details A data type that represents a smart pointer to an OdBcfPriorities object. */ typedef OdSmartPtr OdBcfPrioritiesPtr; class OdBcfTopicLabels; /** \details A data type that represents a smart pointer to an OdBcfTopicLabels object. */ typedef OdSmartPtr OdBcfTopicLabelsPtr; class OdBcfUsers; /** \details A data type that represents a smart pointer to an OdBcfUsers object. */ typedef OdSmartPtr OdBcfUsersPtr; class OdBcfSnippetTypes; /** \details A data type that represents a smart pointer to an OdBcfSnippetTypes object. */ typedef OdSmartPtr OdBcfSnippetTypesPtr; class OdBcfStages; /** \details A data type that represents a smart pointer to an OdBcfStages object. */ typedef OdSmartPtr OdBcfStagesPtr; class OdBcfSession; /** \details A class that stores and operates with an extensions data within the BCF format. */ class BCF_3_0_EXPORT OdBcfExtensions : public OdBcf::OdBcfElement { public: //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdBcfExtensions); //DOM-IGNORE-END /** \details Creates a new markup object. \param pTopicTypes [in] A smart pointer to the topic types of the extensions. \param pTopicStatuses [in] A smart pointer to the topic statuses of the extensions. \param pPriorities [in] A smart pointer to the priorities of the extensions. \param pTopicLabels [in] A smart pointer to the topic labels of the extensions. \param pUsers [in] A smart pointer to the users of the extensions. \param pSnippetTypes [in] A smart pointer to the snippet types of the extensions. \param pStages [in] A smart pointer to the stages of the extensions. \returns A smart pointer to the created OdBcfExtensions instance. */ static OdSmartPtr createObject( const OdBcfTopicTypesPtr &pTopicTypes, const OdBcfTopicStatusesPtr &pTopicStatuses = OdBcfTopicStatusesPtr(), const OdBcfPrioritiesPtr &pPriorities = OdBcfPrioritiesPtr(), const OdBcfTopicLabelsPtr &pTopicLabels = OdBcfTopicLabelsPtr(), const OdBcfUsersPtr &pUsers = OdBcfUsersPtr(), const OdBcfSnippetTypesPtr &pSnippetTypes = OdBcfSnippetTypesPtr(), const OdBcfStagesPtr &pStages = OdBcfStagesPtr()); /** \details Reads XML data into ODA data structures. \param pParent [in] A pointer to the parent element of the data structure. \returns eOk if data is successfully read; otherwise, the method returns an appropriate error code. */ virtual OdResult inFields(TiXmlElement *pParent) ODRX_OVERRIDE; /** \details Writes data into XML structures. \param pParent [in] A pointer to the parent element of the data structure. \returns eOk if data is successfully written; otherwise, the method returns an appropriate error code. */ virtual OdResult outFields(TiXmlElement *pParent) const ODRX_OVERRIDE; /** \details Sets the topic types object for the extensions instance. \param topicTypesValue [in] A smart pointer to the OdBcfTopicTypes object to be set. */ void setTopicTypes(const OdBcfTopicTypesPtr &topicTypesValue); /** \details Retrieves the topic types of the extensions instance. \returns A smart pointer to the OdBcfTopicTypes object. \remarks The topic types object returned by the method can be modified in the calling subroutine. */ OdBcfTopicTypesPtr& getTopicTypes(); /** \details Retrieves the topic types of the extensions instance. \returns A smart pointer to the OdBcfTopicTypes object. \remarks The topic types object returned by the method can't be modified in the calling subroutine. */ const OdBcfTopicTypesPtr& getTopicTypes() const; /** \details Checks whether the topic types object is not initialized. \returns true if the topic types object is not initialized; otherwise, the method returns false. */ bool isTopicTypesUnset() const; /** \details Sets the topic statuses object for the extensions instance. \param topicStatusesValue [in] A smart pointer to the OdBcfTopicStatuses object to be set. */ void setTopicStatuses(const OdBcfTopicStatusesPtr& topicStatusesValue); /** \details Retrieves the topic statuses object of the extensions instance. \returns A smart pointer to the OdBcfTopicStatuses object. \remarks The topic statuses object returned by the method can be modified in the calling subroutine. */ OdBcfTopicStatusesPtr& getTopicStatuses(); /** \details Retrieves the topic statuses object of the extensions instance. \returns A smart pointer to the OdBcfTopicStatuses object. \remarks The topic statuses object returned by the method can't be modified in the calling subroutine. */ const OdBcfTopicStatusesPtr& getTopicStatuses() const; /** \details Checks whether the topic statuses object is not initialized. \returns true if the topic statuses object is not initialized; otherwise, the method returns false. */ bool isTopicStatusesUnset() const; /** \details Sets the priorities object for the extensions instance. \param prioritiesValue [in] A smart pointer to the OdBcfPriorities object to be set. */ void setPriorities(const OdBcfPrioritiesPtr& prioritiesValue); /** \details Retrieves the priorities object of the extensions instance. \returns A smart pointer to the OdBcfPriorities object. \remarks The priorities object returned by the method can be modified in the calling subroutine. */ OdBcfPrioritiesPtr& getPriorities(); /** \details Retrieves the priorities object of the extensions instance. \returns A smart pointer to the OdBcfPriorities object. \remarks The priorities object returned by the method can't be modified in the calling subroutine. */ const OdBcfPrioritiesPtr& getPriorities() const; /** \details Checks whether the priorities object is not initialized. \returns true if the priorities object is not initialized; otherwise, the method returns false. */ bool isPrioritiesUnset() const; /** \details Sets the topic labels object for the extensions instance. \param topicLabelsValue [in] A smart pointer to the OdBcfTopicLabels object to be set. */ void setTopicLabels(const OdBcfTopicLabelsPtr& topicLabelsValue); /** \details Retrieves the topic labels object of the extensions instance. \returns A smart pointer to the OdBcfTopicLabels object. \remarks The topic labels object returned by the method can be modified in the calling subroutine. */ OdBcfTopicLabelsPtr& getTopicLabels(); /** \details Retrieves the topic labels object of the extensions instance. \returns A smart pointer to the OdBcfTopicLabels object. \remarks The topic labels object returned by the method can't be modified in the calling subroutine. */ const OdBcfTopicLabelsPtr& getTopicLabels() const; /** \details Checks whether the topic labels object is not initialized. \returns true if the topic labels object is not initialized; otherwise, the method returns false. */ bool isTopicLabelsUnset() const; /** \details Sets the users object for the extensions instance. \param usersValue [in] A smart pointer to the OdBcfUsers object to be set. */ void setUsers(const OdBcfUsersPtr& usersValue); /** \details Retrieves the users object of the extensions instance. \returns A smart pointer to the OdBcfUsers object. \remarks The users object returned by the method can be modified in the calling subroutine. */ OdBcfUsersPtr& getUsers(); /** \details Retrieves the users object of the extensions instance. \returns A smart pointer to the OdBcfUsers object. \remarks The users object returned by the method can't be modified in the calling subroutine. */ const OdBcfUsersPtr& getUsers() const; /** \details Checks whether the users object is not initialized. \returns true if the users object is not initialized; otherwise, the method returns false. */ bool isUsersUnset() const; /** \details Sets the snippet types object for the extensions instance. \param snippetTypesValue [in] A smart pointer to the OdBcfSnippetTypes object to be set. */ void setSnippetTypes(const OdBcfSnippetTypesPtr& snippetTypesValue); /** \details Retrieves the snippet types object of the extensions instance. \returns A smart pointer to the OdBcfSnippetTypes object. \remarks The snippet types object returned by the method can be modified in the calling subroutine. */ OdBcfSnippetTypesPtr& getSnippetTypes(); /** \details Retrieves the snippet types object of the extensions instance. \returns A smart pointer to the OdBcfSnippetTypes object. \remarks The snippet types object returned by the method can't be modified in the calling subroutine. */ const OdBcfSnippetTypesPtr& getSnippetTypes() const; /** \details Checks whether the snippet types object is not initialized. \returns true if the snippet types object is not initialized; otherwise, the method returns false. */ bool isSnippetTypesUnset() const; /** \details Sets the stages object for the extensions instance. \param stagesValue [in] A smart pointer to the OdBcfStages object to be set. */ void setStages(const OdBcfStagesPtr& stagesValue); /** \details Retrieves the stages object of the extensions instance. \returns A smart pointer to the OdBcfStages object. \remarks The stages object returned by the method can be modified in the calling subroutine. */ OdBcfStagesPtr& getStages(); /** \details Retrieves the stages object of the extensions instance. \returns A smart pointer to the OdBcfStages object. \remarks The stages object returned by the method can't be modified in the calling subroutine. */ const OdBcfStagesPtr& getStages() const; /** \details Checks whether the stages object is not initialized. \returns true if the stages object is not initialized; otherwise, the method returns false. */ bool isStagesUnset() const; //DOM-IGNORE-BEGIN protected: OdBcfTopicTypesPtr m_pTopicTypes; OdBcfTopicStatusesPtr m_pTopicStatuses; OdBcfPrioritiesPtr m_pPriorities; OdBcfTopicLabelsPtr m_pTopicLabels; OdBcfUsersPtr m_pUsers; OdBcfSnippetTypesPtr m_pSnippetTypes; OdBcfStagesPtr m_pStages; /** \details Checks whether the extensions instance has all required fields initialized. \param context [in/out] A raw pointer to the validation context to store results in. \returns true if all required fields are initialized; otherwise the method returns false. */ virtual bool validateData(OdBcf::OdBcfValidationContext *context) const ODRX_OVERRIDE; friend OdBcfSession; //DOM-IGNORE-END }; /** \details A data type that represents a smart pointer to an OdBcfExtensions object. */ typedef OdSmartPtr OdBcfExtensionsPtr; } //namespace OdBcf_3_0 #endif // _BCF_3_0_EXTENSIONS_H