/////////////////////////////////////////////////////////////////////////////// // 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 _ODSPATIALREFERENCE_ODCSDFORMATTER_INCLUDED_ #define _ODSPATIALREFERENCE_ODCSDFORMATTER_INCLUDED_ #include "OdCoordinateReferenceSystemDefinition.h" #include "OdVerticalCoordinateReferenceSystemDefinition.h" namespace OdSpatialReference { namespace OdCsdFormatter { /** \details Creates the dictionary XML string from array of OdDefinitionBase smartpointer objects. \param arrDefinitionBase [in] Array of OdDefinitionBase smartpointer objects. \param sResultXml [out] Resulted xml string. \returns Returns eOK if successful, or an appropriate error code if not. */ TD_SPATIALREFERENCE_API OdResult createXml(const OdDefinitionBaseArray& arrDefinitionBase, OdString& sResultXml); /** \details Creates the dictionary XML string from coordinate reference system definition. \param pCRSD [in] Pointer to an OdCoordinateReferenceSystemDefinition object, can be nullptr (if vertical CRSD XML is needed). \param pVCRSD [in] Pointer to an OdVerticalCoordinateReferenceSystemDefinition object, can be nullptr (if CRSD XML is needed). \param sResultXml [out] Resulted xml string. \returns Returns eOK if successful, or an appropriate error code if not. */ TD_SPATIALREFERENCE_API OdResult createXml(const OdCoordinateReferenceSystemDefinition* pCRSD, const OdVerticalCoordinateReferenceSystemDefinition* pVCRSD, OdString& sResultXml); /** \details Parses dictionary XML string and creates the array of OdDefinitionBase smartpointer objects. \param sXml [in] Dictionary XML string. \param arrDefinitionBase [out] Array of OdDefinitionBase smartpointer objects. \returns Returns eOK if successful, or an appropriate error code if not. */ TD_SPATIALREFERENCE_API OdResult parseXml(const OdString& sXml, OdDefinitionBaseArray& arrDefinitionBase); /** \details Parses dictionary XML string and creates the coordinate reference system definition object. \param sXml [in] Dictionary XML string. \param pCRSD [out] Pointer to an OdCoordinateReferenceSystemDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ TD_SPATIALREFERENCE_API OdResult parseXml(const OdString& sXml, OdCoordinateReferenceSystemDefinitionPtr& pCRSD); /** \details Parses dictionary XML string and creates the vertical coordinate reference system definition object. \param sXml [in] Dictionary XML string. \param pCRSD [out] Pointer to an OdVerticalCoordinateReferenceSystemDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ TD_SPATIALREFERENCE_API OdResult parseXml(const OdString& sXml, OdVerticalCoordinateReferenceSystemDefinitionPtr& pVCRSD); /** \details Parses dictionary XML string and creates the vertical coordinate reference system definition object. \param sXml [in] Dictionary XML string. \param pCRSD [out] Pointer to an OdCoordinateReferenceSystemDefinition object. \param pVCRSD [out] Pointer to an OdVerticalCoordinateReferenceSystemDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ TD_SPATIALREFERENCE_API OdResult parseXml(const OdString& sXml, OdCoordinateReferenceSystemDefinitionPtr& pCRSD, OdVerticalCoordinateReferenceSystemDefinitionPtr& pVCRSD); }; } #endif //_ODSPATIALREFERENCE_ODCSDFORMATTER_INCLUDED_