BeXmlCommonGeometry.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #include "GeomLibsSerialization.h"
11 
15 {
16 private:
17  BeXmlCGParser ();
18 
19 public:
24  static GEOMLIBS_SERIALIZATION_EXPORT bool TryParse (Utf8CP beXmlCGString, ICurvePrimitivePtr &result);
29  static GEOMLIBS_SERIALIZATION_EXPORT bool TryParse (Utf8CP beXmlCGString, ISolidPrimitivePtr &result);
30 
35  static GEOMLIBS_SERIALIZATION_EXPORT bool TryParse (Utf8CP beXmlCGString, MSBsplineSurfacePtr &result);
36 
43  static GEOMLIBS_SERIALIZATION_EXPORT bool TryParse (Utf8CP beXmlCGString, bvector<IGeometryPtr> &geometry, size_t maxDepth = INT_MAX);
44 
45 };
46 
48  {
52  };
53 
54 typedef bvector<BeExtendedDataEntry> BeExtendedData;
55 typedef bmap<OrderedIGeometryPtr, BeExtendedData> BeExtendedDataGeometryMap;
56 
58 {
59 private: BeXmlCGStreamReader ();
60 public: static GEOMLIBS_SERIALIZATION_EXPORT bool TryParse (Utf8CP beXmlCGString, bvector<IGeometryPtr> &geometry, bmap<OrderedIGeometryPtr, BeExtendedData> &extendedData, size_t maxDepth = INT_MAX);
61  static GEOMLIBS_SERIALIZATION_EXPORT bool TryParse (::Byte* buffer, int bufferLength, bvector<IGeometryPtr> &geometry, BeExtendedDataGeometryMap &extendedDataMap, size_t maxDepth = INT_MAX);
62 };
63 
66 {
67 
68 public:
69 
73  GEOMLIBS_SERIALIZATION_EXPORT static void Write (Utf8StringR cgBeXml, IGeometryCR data, bmap<OrderedIGeometryPtr, BeExtendedData> *extendedData = NULL, bool preferCGSweeps = false);
74 
78  GEOMLIBS_SERIALIZATION_EXPORT static void WriteBytes (bvector<::Byte>& bytes, IGeometryCR data, bmap<OrderedIGeometryPtr, BeExtendedData> *extendedData = NULL, bool preferCGSweeps = false);
79 
80 };
81 
Contains a UTF-8 encoded string.
Definition: WString.h:275
static methods to add common geometry content to xml file.
Definition: BeXmlCommonGeometry.h:65
Utf8String Type
Definition: BeXmlCommonGeometry.h:50
Open for write access.
#define END_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:30
Definition: BeXmlCommonGeometry.h:57
static methods to read Bentley.Geometry types from Common Geometry xml.
Definition: BeXmlCommonGeometry.h:14
Utf8String Value
Definition: BeXmlCommonGeometry.h:51
#define NULL
Definition: Bentley.h:157
bmap< OrderedIGeometryPtr, BeExtendedData > BeExtendedDataGeometryMap
Definition: BeXmlCommonGeometry.h:55
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
bvector< BeExtendedDataEntry > BeExtendedData
Definition: BeXmlCommonGeometry.h:54
Utf8String Key
Definition: BeXmlCommonGeometry.h:49
struct IGeometry const & IGeometryCR
Definition: msgeomstructs_typedefs.h:165
Utf8Char const * Utf8CP
Definition: Bentley.h:229
#define BEGIN_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:29
unsigned char Byte
Definition: Bentley.r.h:143
Definition: BeXmlCommonGeometry.h:47
#define GEOMLIBS_SERIALIZATION_EXPORT
Definition: GeomLibsSerialization.h:21

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.