/////////////////////////////////////////////////////////////////////////////// // 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. /////////////////////////////////////////////////////////////////////////////// #if !defined(ODA_ODMVDXMLPROCESSOR_H_INCLUDED_) #define ODA_ODMVDXMLPROCESSOR_H_INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "RxObject.h" #include "mvdXMLBuildOptions.h" #include "SharedPtr.h" #include "IfcFile.h" #include "Elements/MvdXmlRoot.h" #include "tinyxml.h" class TiXmlDocument; /** \details A data type that represents a shared pointer to an TiXmlDocument object (for internal use only). */ typedef OdSharedPtr TiXmlDocumentPtr; /** \details Contains declarations related to Model View Definition (MVD) functionality. */ namespace OdMvdXml { /** \details Types of MVDXML content processors. */ enum ProccesorType { /**Data validation processor.*/ kValidator, /** Data filtering processor.*/ kFilter }; class OdMvdXmlAuditInfo; /** \details An abstract class that provides an interface for the processing of the MVDXML contents. There are two types of MVDXML content processing: * Data validation that checks MVDXML consistency. * Data filtering that select MVDXML data that meet specified conditions. \sa ProccesorType enumeration. */ class MVDXML_EXPORT OdMvdXmlProcessor : public OdRxObject { ODRX_DECLARE_MEMBERS(OdMvdXmlProcessor); public: /** \details Initializes the root node of the mvdXML file that contains data to process. \returns A smart pointer to an OdMvdXmlRoot object that represents the root node. */ OdMvdXmlRootPtr initRoot(); /** \details Proceeds the data processing within a specified IFC file. \param pFile [in] A smart pointer to an OdIfcFile object that contains data to be processed. \param pAudit [in] A raw pointer to an OdMvdXmlAuditInfo object that contains error and warning messages. \returns eOk if the processing was successful; otherwise, the method returns an appropriate error code. */ virtual OdResult process(OdIfcFilePtr pFile, OdMvdXmlAuditInfo* pAudit) = 0; /** \details Reads the contents of a specified mvdXML file. \param filename [in] A string that contains the full path to the mvdXML file to read. \param pAudit [in] A raw pointer to the OdMvdXmlAuditInfo object that contains error and warning messages. \param fixNamespace [in] A value of the fix namespace flag. \returns eOk if the file contents were successfully read; otherwise, the method returns an appropriate error code. */ OdResult readFile(const OdString& filename, OdMvdXmlAuditInfo* pAudit, bool fixNamespace = false); /** \details Reads the contents of a specified mvdXML file. \param filename [in] A string that contains the full path to the mvdXML file to read. \param pAudit [in] A raw pointer to the OdMvdXmlAuditInfo object that contains error and warning messages. \returns eOk if the file contents were successfully read; otherwise, the method returns an appropriate error code. */ OdResult writeFile(const OdString& filename, OdMvdXmlAuditInfo* pAudit); protected: OdMvdXmlRootPtr m_pRoot; }; /** \details A data type that represents a smart pointer to an OdMvdXmlProcessor object. */ typedef OdSmartPtr OdMvdXmlProcessorPtr; } #endif // !defined(ODA_ODMVDXMLPROCESSOR_H_INCLUDED_)