86 mutable uint8_t m_ownershipFlags;
88 void InitForString (
void const * str);
90 bool ConvertToPrimitiveFromString (
PrimitiveType primitiveType);
110 #if !defined (_WIN32)
121 bool m_isMetadataSet;
530 Location (
ECEnablerCP enabler,
int propIdx,
int arrayIdx) : m_enabler(enabler), m_propertyIndex(propIdx), m_arrayIndex(arrayIdx), m_cachedProperty(
NULL) { }
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) { }
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
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
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.
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
bool IsUtf8() const
Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_String and is enc...