ECValue.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 
11 #include <Bentley/DateTime.h>
12 #include <ECObjects/ECInstance.h>
13 #include <ECObjects/ECObjects.h>
15 #include <Geom/GeomApi.h>
16 
18 
21 
24 
25 
26 //=======================================================================================
29 //=======================================================================================
30 struct ArrayInfo
31  {
32 private:
33  union
34  {
37  };
38  bool m_isFixedCount;
39  uint32_t m_count;
40 
41 public:
45  void InitializeStructArray (uint32_t count, bool isFixedSize); // cannot have a real constructor due to inclusion in a union
46 
51  void InitializePrimitiveArray (PrimitiveType elementPrimitiveType, uint32_t count, bool isFixedCount); // cannot have a real constructor due to inclusion in a union
52 
56  ECOBJECTS_EXPORT bool IsFixedCount() const;
60  ECOBJECTS_EXPORT bool IsStructArray() const;
65  };
66 
67 //=======================================================================================
72 //=======================================================================================
73 struct ECValue
74  {
75 public:
77  void ShallowCopy (ECValueCR v);
78 private:
79  union
80  {
83  };
84 
85  uint8_t m_stateFlags;
86  mutable uint8_t m_ownershipFlags; // mutable because string ownership may change when we perform on-demand encoding conversions...
87 
88  void InitForString (void const * str);
89  BentleyStatus SetBinaryInternal (const Byte * data, size_t size, bool holdADuplicate = false);
90  bool ConvertToPrimitiveFromString (PrimitiveType primitiveType);
91 
92 protected:
93  typedef bvector<ECValue> ValuesVector;
94  typedef bvector<ECValue>* ValuesVectorP;
95 
97  struct BinaryInfo
98  {
99  const Byte * m_data;
100  size_t m_size;
101  };
102 
104  struct StringInfo
105  {
106  private:
107 
108  Utf8CP m_utf8;
109  Utf16CP m_utf16;
110 #if !defined (_WIN32)
111  WCharCP m_wchar; // On Windows we use m_utf16. The presence of the extra pointer wouldn't hurt anything but want to ensure it's only used on unix.
112 #endif
113  };
114 
116  {
117  private:
118  ::Int64 m_ceTicks;
119  DateTime::Kind m_kind;
120  DateTime::Component m_component;
121  bool m_isMetadataSet;
122 
123  };
124 
126  union
127  {
128  bool m_boolean;
131  double m_double;
132  mutable StringInfo m_stringInfo; // mutable so that we can convert to requested encoding on demand
140  };
141 
143  void ConstructUninitialized();
145  inline void FreeMemory ();
146 
147 public:
149  ECOBJECTS_EXPORT void Clear();
154 
160 
163  ECOBJECTS_EXPORT explicit ECValue (ValueKind classification);
164 
167  ECOBJECTS_EXPORT explicit ECValue (PrimitiveType primitiveType);
168 
171  ECOBJECTS_EXPORT explicit ECValue (::Int32 integer32);
172 
175  ECOBJECTS_EXPORT explicit ECValue (::Int64 long64);
176 
179  ECOBJECTS_EXPORT explicit ECValue (double doubleVal);
180 
185  ECOBJECTS_EXPORT explicit ECValue (WCharCP string, bool holdADuplicate = true);
186 
191  ECOBJECTS_EXPORT explicit ECValue (Utf8CP string, bool holdADuplicate = true);
192 
197  ECOBJECTS_EXPORT explicit ECValue (Utf16CP string, bool holdADuplicate = true);
198 
204  ECOBJECTS_EXPORT explicit ECValue (const Byte * blob, size_t size);
205 
208  ECOBJECTS_EXPORT explicit ECValue (DPoint2dCR point2d);
209 
212  ECOBJECTS_EXPORT explicit ECValue (DPoint3dCR point3d);
213 
216  ECOBJECTS_EXPORT explicit ECValue (bool value);
217 
220  ECOBJECTS_EXPORT explicit ECValue (DateTimeCR dateTime);
221 
224  ECOBJECTS_EXPORT void SetIsReadOnly(bool isReadOnly);
225 
228  ECOBJECTS_EXPORT bool IsReadOnly() const;
229 
232  ECOBJECTS_EXPORT void SetIsNull(bool isNull);
233 
236  ECOBJECTS_EXPORT bool IsNull() const;
237 
240  ECOBJECTS_EXPORT void SetIsLoaded(bool isLoaded);
241 
244  ECOBJECTS_EXPORT bool IsLoaded() const;
245 
247  ECOBJECTS_EXPORT void SetToNull();
248 
252 
256  ECOBJECTS_EXPORT bool IsUninitialized () const;
257 
260  ECOBJECTS_EXPORT bool IsString () const;
282  ECOBJECTS_EXPORT bool IsUtf8 () const;
285  ECOBJECTS_EXPORT bool IsInteger () const;
288  ECOBJECTS_EXPORT bool IsLong () const;
291  ECOBJECTS_EXPORT bool IsDouble () const;
294  ECOBJECTS_EXPORT bool IsBinary () const;
297  ECOBJECTS_EXPORT bool IsBoolean () const;
298 
301  ECOBJECTS_EXPORT bool IsPoint2D () const;
304  ECOBJECTS_EXPORT bool IsPoint3D () const;
307  ECOBJECTS_EXPORT bool IsDateTime () const;
310  ECOBJECTS_EXPORT bool IsIGeometry() const;
311 
314  ECOBJECTS_EXPORT bool IsArray () const;
317  ECOBJECTS_EXPORT bool IsStruct () const;
320  ECOBJECTS_EXPORT bool IsPrimitive () const;
323 
327 
329 
334 
339  ECOBJECTS_EXPORT ECObjectsStatus SetPrimitiveArrayInfo (PrimitiveType primitiveElementtype, uint32_t count, bool isFixedSize);
340 
343 
350 
357 
359  ECOBJECTS_EXPORT bool GetBoolean () const;
364 
366  ECOBJECTS_EXPORT double GetDouble () const;
370  ECOBJECTS_EXPORT BentleyStatus SetDouble (double value);
371 
383  ECOBJECTS_EXPORT Utf16CP GetUtf16CP () const; // the only real caller of this should be ECDBuffer
384 
389  ECOBJECTS_EXPORT BentleyStatus SetString (WCharCP string, bool holdADuplicate = true);
394  ECOBJECTS_EXPORT BentleyStatus SetUtf8CP (Utf8CP string, bool holdADuplicate = true);
399  ECOBJECTS_EXPORT BentleyStatus SetUtf16CP (Utf16CP string, bool holdADuplicate = true); // primarily for use by ECDBuffer
400 
403  ECOBJECTS_EXPORT const Byte * GetBinary (size_t& size) const;
404 
410  ECOBJECTS_EXPORT BentleyStatus SetBinary (const Byte * data, size_t size, bool holdADuplicate = false);
411 
414 
415 
417 
425 
429 
434 
441 
448 
455  ECOBJECTS_EXPORT int64_t GetDateTimeTicks (bool& hasMetadata, DateTime::Info& metadata) const;
456 
465 
472  ECOBJECTS_EXPORT BentleyStatus SetDateTimeTicks (int64_t ceTicks, DateTime::Info const& dateTimeMetadata);
473 
474 //
481 
488 
492  static uint32_t GetFixedPrimitiveValueSize (PrimitiveType primitiveType);
493 
496 
498  ECOBJECTS_EXPORT bool Equals (ECValueCR v) const;
499  };
500 
501 
502 //=======================================================================================
512 //=======================================================================================
514  {
515 public:
516 
517  const static int INDEX_ROOT = -1;
518  struct Location
519  {
520  private:
521  ECEnablerCP m_enabler;
522  int m_propertyIndex;
523  int m_arrayIndex;
524  mutable ECPropertyCP m_cachedProperty;
525  public:
530  Location (ECEnablerCP enabler, int propIdx, int arrayIdx) : m_enabler(enabler), m_propertyIndex(propIdx), m_arrayIndex(arrayIdx), m_cachedProperty(NULL) { }
531 
533  Location () : m_enabler(NULL), m_propertyIndex(-1), m_arrayIndex(INDEX_ROOT), m_cachedProperty(NULL) { }
534 
538  Location (const Location& loc) : m_enabler(loc.m_enabler), m_propertyIndex(loc.m_propertyIndex), m_arrayIndex(loc.m_arrayIndex), m_cachedProperty(loc.m_cachedProperty) { }
539  public:
542  ECEnablerCP GetEnabler() const { return m_enabler; }
545  int GetPropertyIndex() const { return m_propertyIndex; }
546 
549  int GetArrayIndex() const { return m_arrayIndex; }
550 
554  };
555 
556  typedef bvector<Location> LocationVector;
557 
558 private:
559  //"BACK" OF VECTOR IS DEEPEST ELEMENT
560  LocationVector m_locationVector;
561  bool m_isAdhoc;
562 public:
566 
573 
578 
583  ECOBJECTS_EXPORT void PushLocation (ECEnablerCR enabler, int propertyIndex, int arrayIndex=INDEX_ROOT);
584 
590  ECOBJECTS_EXPORT bool PushLocation (ECEnablerCR enabler, WCharCP accessString, int arrayIndex=INDEX_ROOT);
591 
596  ECOBJECTS_EXPORT void PushLocation (IECInstanceCR instance, int propertyIndex, int arrayIndex=INDEX_ROOT);
597 
603  ECOBJECTS_EXPORT bool PushLocation (IECInstanceCR instance, WCharCP accessString, int arrayIndex=INDEX_ROOT);
604 
607 
611 
615 
617  ECOBJECTS_EXPORT void Clear ();
618 
622 
624  ECOBJECTS_EXPORT ECValueAccessor () : m_isAdhoc (false) { }
625 
629 
635 
639  ECOBJECTS_EXPORT bool operator!=(ECValueAccessorCR accessor) const;
640 
644  ECOBJECTS_EXPORT bool operator==(ECValueAccessorCR accessor) const;
645 
651  ECOBJECTS_EXPORT static ECObjectsStatus PopulateValueAccessor (ECValueAccessor& va, IECInstanceCR instance, WCharCP managedPropertyAccessor);
652 
658  ECOBJECTS_EXPORT static ECObjectsStatus PopulateValueAccessor (ECValueAccessor& va, ECEnablerCR enabler, WCharCP managedPropertyAccessor);
659  };
660 
661 
662 //=======================================================================================
665 //=======================================================================================
667  {
668 public:
672 
676 
680 
682  ECOBJECTS_EXPORT bool HasChildValues () const;
683 
686 
691  ECOBJECTS_EXPORT static ECPropertyValuePtr GetPropertyValue (IECInstanceCR instance, WCharCP propertyAccessor);
692  };
693 
694 //=======================================================================================
698 //=======================================================================================
699 struct ECValuesCollectionIterator : RefCountedBase, std::iterator<std::forward_iterator_tag, ECPropertyValue const>
700  {
701 
702 public:
707 
710 
714  };
715 
716 //=======================================================================================
719 //=======================================================================================
721  {
722 public:
727 
731 
736 
742 
746  };
747 
750 
BentleyStatus SetUtf8CP(Utf8CP string, bool holdADuplicate=true)
Sets the value of this ECValue to the given string.
ECEnablerCP GetEnabler() const
Get the enabler associated with this Location.
Definition: ECValue.h:542
bool operator!=(ECValueAccessorCR accessor) const
Performs inequality comparison against the specified ECValueAccessor.
void ConstructUninitialized()
Constructs an uninitialized ECValue object.
ValueKind m_valueKind
Definition: ECValue.h:81
ECObjectsStatus
General purpose result codes.
Definition: ECObjects.h:128
void InitializePrimitiveArray(PrimitiveType elementPrimitiveType, uint32_t count, bool isFixedCount)
Initialize the array as a primitive array with the given number of entries.
BentleyStatus SetUtf16CP(Utf16CP string, bool holdADuplicate=true)
Sets the value of this ECValue to the given string.
BentleyStatus SetBinary(const Byte *data, size_t size, bool holdADuplicate=false)
Sets the value of this ECValue to the given byte array.
DPoint3d GetPoint3D() const
Returns the DPoint3d value, if this ECValue holds a Point3d.
bool IsLoaded() const
Gets whether this ECValue's value has been loaded.
DateTime GetDateTime() const
Gets the DateTime value.
ECValueAccessorCR GetValueAccessor() const
Gets the ECValueAccessor identifying this property value.
BentleyStatus SetInteger(int32_t integer)
Sets the value of this ECValue to the given integer.
void SetIsReadOnly(bool isReadOnly)
Sets whether this ECValue is read-only.
int GetArrayIndex() const
Gets the array index of the property value associated with this Location.
Definition: ECValue.h:549
bool IsNull() const
Gets whether this ECValue is NULL or not.
bool IsStruct() const
Indicates whether the content of this ECValue is a struct (DgnPlatform::VALUEKIND_Struct).
void InitializeStructArray(uint32_t count, bool isFixedSize)
Initialize the array as a struct array with the given number of entries.
long long int64_t
Definition: Bentley.r.h:94
Provides Bentley specific date/time functions (Bentley/BeAssert.h).
BentleyStatus SetPoint3D(DPoint3dCR value)
Sets the value of this ECValue to the given DPoint3d.
bool IsPoint2D() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Point2D.
uint32_t GetCount() const
Returns the number of entries in this array.
An iterator over the ECPropertyValues contained in an ECValuesCollection.
Definition: ECValue.h:699
~ECValue()
Destructor.
PrimitiveType GetPrimitiveType() const
Gets the PrimitiveType of this ECValue.
DPoint2d m_dPoint2d
If a DPoint2d primitive, holds the DPoint2d value.
Definition: ECValue.h:134
BinaryInfo m_binaryInfo
If a binary value, holds the BinaryInfo struct defining the binary data.
Definition: ECValue.h:138
BentleyStatus SetString(WCharCP string, bool holdADuplicate=true)
Sets the value of this ECValue to the given string.
ECObjectsStatus SetStructArrayInfo(uint32_t count, bool isFixedSize)
Defines the StructArray for this ECValue.
RefCountedPtr< IECInstance > IECInstancePtr
Definition: ECInstance.h:98
Utf16Char const * Utf16CP
Definition: Bentley.h:231
ECValue()
Initializes a new instance of the ECValue type.
ValueKind
Represents the classification of the data type of an ECValue.
Definition: ECObjects.h:302
bool IsReadOnly() const
Gets whether this ECValue is read-only or not.
const_iterator begin() const
Gets an iterator pointing to the beginning of the collection.
BentleyStatus SetIGeometry(IGeometryCR geometry)
bool IsArray() const
Indicates whether the content of this ECValue is an array (DgnPlatform::VALUEKIND_Array).
bool IsIGeometry() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_IGeometry.
ArrayInfo GetArrayInfo() const
Returns the array information defining this ECValue.
bool IsDouble() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Double.
void MoveToNext()
Advances this iterator to the next item in the collection.
void Clear()
Clears all Locations from this ECValueAccessor.
A structure used for describing the complete location of an ECValue within an ECInstance.
Definition: ECValue.h:513
Location()
Constructs an empty Location.
Definition: ECValue.h:533
ArrayKind
Represents the classification of the data type of an EC array element.
Definition: ECObjects.h:313
Structure to hold information about a binary type.
Definition: ECValue.h:97
size_type count(const key_type &__x) const
Definition: stdcxx/bstdmap.h:277
BentleyStatus SetPoint2D(DPoint2dCR value)
Sets the value of this ECValue to the given DPoint2d.
BentleyStatus SetDateTimeTicks(int64_t ceTicks)
Sets the DateTime value as ticks since the beginning of the Common Era epoch.
DateTime const & DateTimeCR
Definition: DateTime.h:443
static ECValuesCollectionPtr Create(IECInstanceCR instance)
Creates an ECValuesCollection representing all of the ECPropertyValues contained in the specified IEC...
int int32_t
Definition: Bentley.r.h:92
ECValue const & ECValueCR
Definition: ECObjects.h:46
ECPropertyValueCR GetParentProperty() const
Gets the ECPropertyValue containing this collection's property values.
void SetToNull()
Frees the values memory, if necessary, and sets the state to NULL.
double m_double
If a double primitive type, holds the double value.
Definition: ECValue.h:131
wchar_t const * WCharCP
Definition: Bentley.h:224
ValueKind GetKind() const
Returns the kind of array this is (primitive or struct)
bool IsInteger() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Integer.
static ECPropertyValuePtr GetPropertyValue(IECInstanceCR instance, WCharCP propertyAccessor)
Create an ECPropertyValue for the property of an IECInstance identified by a managed access string...
const_iterator end() const
Gets an iterator pointing just beyond the end of this collection.
Represents an instant in time, typically expressed as a date and time of day.
Definition: DateTime.h:28
IECInstance * IECInstanceP
Definition: ECObjects.h:67
PrimitiveType m_primitiveType
Definition: ECValue.h:82
#define NULL
Definition: Bentley.h:157
bool IsFixedCount() const
Returns whether this is a fixed size array or not.
WString ToString() const
This is intended for debugging purposes, not for presentation purposes.
ECEnabler const * ECEnablerCP
Definition: ECObjects.h:78
Location(ECEnablerCP enabler, int propIdx, int arrayIdx)
Constructs a Location pointing to a specific property value.
Definition: ECValue.h:530
#define ECOBJECTS_EXPORT
Definition: ECObjects.h:20
ECValueCR GetValue() const
Gets the value of this ECPropertyValue.
bool Equals(ECValueCR v) const
Checks 2 ECValues for equality.
DateTimeInfo m_dateTimeInfo
If a DateTime primitive, holds the DateTime value.
Definition: ECValue.h:135
Definition: ECValue.h:518
bvector< ECValue > * ValuesVectorP
Definition: ECValue.h:94
GeomApi: Bentley::Rounding, Bentley::ValueSizeSize, Bentley::OrderedValueSizeSize, Bentley::IGeometry, Bentley::OrderedIGeometryPtr, Bentley::pointList.
PrimitiveType
Enumeration of primitive datatypes supported by native "ECObjects" implementation.
Definition: ECObjects.h:322
BentleyStatus SetDouble(double value)
Sets the value of this ECValue to the given double.
void SetIsLoaded(bool isLoaded)
Sets whether this ECValue has had its value loaded.
void Clear()
Clears memory, if necessary, and sets the value back to an uninitialized state.
ArrayKind m_arrayKind
Definition: ECValue.h:35
bvector< Location > LocationVector
Definition: ECValue.h:556
void PopLocation()
Removes the deepest Location within this ECValueAccessor.
void From(ECValueCR v)
Does a ShallowCopy of the supplied ECValue.
ECPropertyValue const & ECPropertyValueCR
Definition: ECObjects.h:74
bool IsDateTime() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_DateTime.
IECInstanceP m_structInstance
The ECValue class calls AddRef and Release for the member as needed.
Definition: ECValue.h:139
int32_t GetInteger() const
Returns the integer value, if this ECValue holds an Integer.
BentleyStatus SetDateTime(DateTimeCR dateTime)
Sets the DateTime value.
A collection of all ECPropertyValues contained in an IECInstance or an ECPropertyValue.
Definition: ECValue.h:720
bool m_boolean
If a Boolean primitive type, holds the bool value.
Definition: ECValue.h:128
3d point coordinates.
Definition: dpoint3d.h:19
DPoint2d GetPoint2D() const
Returns the DPoint2d value, if this ECValue holds a Point2d.
BentleyStatus
Definition: Bentley.h:208
ArrayInfo m_arrayInfo
If an array value, holds the ArrayInfo struct defining the array.
Definition: ECValue.h:137
VirtualCollectionIterator< ECValuesCollectionIterator > const_iterator
Definition: ECValue.h:723
int32_t Int32
Definition: Bentley.r.h:119
static ECObjectsStatus PopulateValueAccessor(ECValueAccessor &va, IECInstanceCR instance, WCharCP managedPropertyAccessor)
Populates an ECValueAccessor from an IECInstance and a managed property access string.
Location(const Location &loc)
Copy-constructs a Location.
Definition: ECValue.h:538
ECObjectsStatus SetPrimitiveArrayInfo(PrimitiveType primitiveElementtype, uint32_t count, bool isFixedSize)
Defines the primitive array for this ECValue.
void FreeMemory()
If appropriate for the value type, frees the memory used to store the value.
ValueKind GetKind() const
Returns the ValueKind of this value.
Location & DeepestLocation()
Gets the deepest Location within this ECValueAccessor.
bool IsBoolean() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Boolean.
Component
Specifies whether a DateTime represents a date (without time component) or a date time...
Definition: DateTime.h:53
Location const & DeepestLocationCR() const
Gets the deepest Location within this ECValueAccessor.
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
IECInstance const & IECInstanceCR
Definition: ECObjects.h:67
bool IsDifferent(ECValuesCollectionIterator const &iter) const
Performs inequality comparison against another ECValuesCollectionIterator.
struct DPoint2d const & DPoint2dCR
Definition: msgeomstructs_typedefs.h:78
BentleyStatus SetLong(int64_t long64)
Sets the value of this ECValue to the given long.
WCharCP GetString() const
Gets the string content of this ECValue.
WString GetManagedAccessString() const
Gets the managed-style access string for this Accessor.
bool operator==(ECValueAccessorCR accessor) const
Performs equality comparison against the specified ECValueAccessor.
Variant-like object used to set and retrieve property values in ECInstances.
Definition: ECValue.h:73
Relates an ECProperty with an ECValue.
Definition: ECValue.h:666
ECProperty const * ECPropertyCP
Definition: ECObjects.h:56
int64_t GetDateTimeTicks() const
Gets the DateTime value as ticks since the beginning of the Common Era epoch.
int GetPropertyIndex() const
Get the property index identifying this Location.
Definition: ECValue.h:545
#define END_BENTLEY_ECOBJECT_NAMESPACE
Definition: DgnPlatform.h:41
PrimitiveType GetElementPrimitiveType() const
Returns the primitive type that this array was initialized with.
struct IGeometry const & IGeometryCR
Definition: msgeomstructs_typedefs.h:165
size_t m_size
The size of the data.
Definition: ECValue.h:100
void PushLocation(ECEnablerCR enabler, int propertyIndex, int arrayIndex=INDEX_ROOT)
Appends a Location pointing to the specified property value.
WString GetPropertyName() const
Gets the name of the ECProperty identified by this ECValueAccessor.
BentleyStatus SetPrimitiveType(PrimitiveType primitiveElementType)
Sets the PrimitiveType of this ECValue.
ECPropertyValue const & GetCurrent() const
Gets the ECPropertyValue currently pointed to by this iterator.
IGeometryPtr GetIGeometry() const
Returns the IGeometry, if this ECValue holds a geometry value.
ECValuesCollectionPtr GetChildValues() const
For array and struct values, gets a virtual collection of the embedded values.
DPoint3d m_dPoint3d
If a DPoint3d primitive, holds the DPoint3d value.
Definition: ECValue.h:136
ECValueAccessor const & ECValueAccessorCR
Definition: ECObjects.h:47
BentleyStatus SetBoolean(bool value)
Sets the value of this ECValue to the given bool.
double GetDouble() const
This template is used by iterators that hide their implementation from the published API...
Definition: VirtualCollectionIterator.h:33
bool GetBoolean() const
Returns the boolean value, if this ECValue holds a boolean.
BEGIN_BENTLEY_ECOBJECT_NAMESPACE typedef RefCountedPtr< ECPropertyValue > ECPropertyValuePtr
Definition: ECValue.h:19
int64_t GetDateTimeUnixMillis() const
Returns the DateTime value as milliseconds since the beginning of the Unix epoch. ...
bvector< ECValue > ValuesVector
Definition: ECValue.h:93
PrimitiveType m_elementPrimitiveType
Definition: ECValue.h:36
WCharCP GetAccessString() const
Gets the native-style access string for the deepest Location in this ECValueAccessor.
Utf8CP GetUtf8CP() const
Gets the string content of this ECValue in UTF-8 encoding.
ECValueR operator=(ECValueCR rhs)
Compares two ECValues for equality.
Definition: ECValue.h:115
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
::Int64 m_long64
If an Int64 primitive type, holds the Int64 value.
Definition: ECValue.h:130
RefCountedPtr< ECValuesCollection > ECValuesCollectionPtr
Definition: ECValue.h:20
bool HasChildValues() const
Indicates whether the value is an array or struct.
static uint32_t GetFixedPrimitiveValueSize(PrimitiveType primitiveType)
For fixed primitive types, returns the number of bytes required to represent the type.
Utf8Char const * Utf8CP
Definition: Bentley.h:229
bool IsPrimitive() const
Indicates whether the content of this ECValue is of a primitive type (DgnPlatform::VALUEKIND_Primitiv...
bool IsPoint3D() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Point3D.
bool IsUninitialized() const
Checks whether this ECValue is uninitialized.
Structure to hold information about String values.
Definition: ECValue.h:104
uint32_t GetDepth() const
Gets the depth of this Location within the ECValueAccessor.
ECPropertyCP GetECProperty() const
Gets the ECProperty associated with this Location.
Information about an array in an ECN::IECInstance.
Definition: ECValue.h:30
int64_t Int64
Definition: Bentley.r.h:130
::Int32 m_integer32
If an Int32 primitive type, holds the Int32 value.
Definition: ECValue.h:129
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
BentleyStatus SetStruct(IECInstanceP structInstance)
Sets the specified struct instance in the ECValue.
ECValue & ECValueR
Definition: ECObjects.h:46
Provides the metadata portion of a DateTime object.
Definition: DateTime.h:94
IECInstanceCR GetInstance() const
Gets the root IECInstance containing this ECPropertyValue.
ECEnabler const & ECEnablerCR
Definition: ECObjects.h:78
ECValueAccessor()
Constructs an empty ECValueAccessor.
Definition: ECValue.h:624
void SetIsNull(bool isNull)
Sets whether this ECValue is NULL.
Kind
Specifies whether a DateTime represents a local time, a Coordinated Universal Time (UTC)...
Definition: DateTime.h:36
unsigned char Byte
Definition: Bentley.r.h:143
const Byte * GetBinary(size_t &size) const
Returns the binary value, if this ECValue holds binary data.
unsigned int uint32_t
Definition: Bentley.r.h:93
StringInfo m_stringInfo
If a String primitive type, holds the StringInfo struct defining the string.
Definition: ECValue.h:133
bool IsStructArray() const
Returns whether this is a struct array.
IECInstancePtr GetStruct() const
Gets the struct instance of this ECValue, if the ECValue holds a struct.
int64_t GetLong() const
Returns the long value, if this ECValue holds a long.
bool IsPrimitiveArray() const
Returns whether this is a primitive array.
bool IsLong() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Long.
bool IsString() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_String (regardles...
size_type size() const
Definition: stdcxx/bstdmap.h:214
void ShallowCopy(ECValueCR v)
Performs a shallow copy.
const Byte * m_data
The actual binary data.
Definition: ECValue.h:99
bool IsBinary() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Binary.
static const int INDEX_ROOT
Definition: ECValue.h:517
bool CanConvertToPrimitiveType(PrimitiveType type) const
2d point coordinates.
Definition: dpoint2d.h:23
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
Utf16CP GetUtf16CP() const
Returns the string value as a Utf16CP, if this ECValue holds a string.
unsigned char uint8_t
Definition: Bentley.r.h:89
#define BEGIN_BENTLEY_ECOBJECT_NAMESPACE
Definition: DgnPlatform.h:40
bool IsUtf8() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_String and is enc...

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