Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ECValue Struct Reference

Variant-like object used to set and retrieve property values in ECInstances. More...

#include <ECValue.h>

Classes

struct  BinaryInfo
 Structure to hold information about a binary type. More...
 
struct  DateTimeInfo
 
struct  StringInfo
 Structure to hold information about String values. More...
 

Public Member Functions

void ShallowCopy (ECValueCR v)
 Performs a shallow copy. More...
 
void Clear ()
 Clears memory, if necessary, and sets the value back to an uninitialized state. More...
 
ECValueR operator= (ECValueCR rhs)
 Compares two ECValues for equality. More...
 
 ~ECValue ()
 Destructor. More...
 
 ECValue ()
 Initializes a new instance of the ECValue type. More...
 
 ECValue (ECValueCR v)
 Initializes a new instance of the ECValue type from the given ECValue. More...
 
 ECValue (ValueKind classification)
 Constructs an uninitialized ECValue of the specified ValueKind. More...
 
 ECValue (PrimitiveType primitiveType)
 Constructs an uninitialized ECValue of the specified PrimitiveType. More...
 
 ECValue (::Int32 integer32)
 Initializes a new instance of ECValue from the given value. More...
 
 ECValue (::Int64 long64)
 Initializes a new instance of ECValue from the given value. More...
 
 ECValue (double doubleVal)
 Initializes a new instance of ECValue from the given value. More...
 
 ECValue (WCharCP string, bool holdADuplicate=true)
 Initializes a new instance of ECValue from the given value. More...
 
 ECValue (Utf8CP string, bool holdADuplicate=true)
 Initializes a new instance of ECValue from the given value. More...
 
 ECValue (Utf16CP string, bool holdADuplicate=true)
 Initializes a new instance of ECValue from the given value. More...
 
 ECValue (const Byte *blob, size_t size)
 Initializes a new instance of ECValue from the given value. More...
 
 ECValue (DPoint2dCR point2d)
 Initializes a new instance of ECValue from the given value. More...
 
 ECValue (DPoint3dCR point3d)
 Initializes a new instance of ECValue from the given value. More...
 
 ECValue (bool value)
 Initializes a new instance of ECValue from the given value. More...
 
 ECValue (DateTimeCR dateTime)
 Initializes a new instance of the ECValue type. More...
 
void SetIsReadOnly (bool isReadOnly)
 Sets whether this ECValue is read-only. More...
 
bool IsReadOnly () const
 Gets whether this ECValue is read-only or not. More...
 
void SetIsNull (bool isNull)
 Sets whether this ECValue is NULL. More...
 
bool IsNull () const
 Gets whether this ECValue is NULL or not. More...
 
void SetIsLoaded (bool isLoaded)
 Sets whether this ECValue has had its value loaded. More...
 
bool IsLoaded () const
 Gets whether this ECValue's value has been loaded. More...
 
void SetToNull ()
 Frees the values memory, if necessary, and sets the state to NULL. More...
 
void From (ECValueCR v)
 Does a ShallowCopy of the supplied ECValue. More...
 
ValueKind GetKind () const
 Returns the ValueKind of this value. More...
 
bool IsUninitialized () const
 Checks whether this ECValue is uninitialized. More...
 
bool IsString () const
 Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_String (regardless of encoding). More...
 
bool IsUtf8 () const
 Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_String and is encoded in UTF-8. More...
 
bool IsInteger () const
 Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Integer. More...
 
bool IsLong () const
 Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Long. More...
 
bool IsDouble () const
 Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Double. More...
 
bool IsBinary () const
 Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Binary. More...
 
bool IsBoolean () const
 Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Boolean. More...
 
bool IsPoint2D () const
 Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Point2D. More...
 
bool IsPoint3D () const
 Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Point3D. More...
 
bool IsDateTime () const
 Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_DateTime. More...
 
bool IsIGeometry () const
 Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_IGeometry. More...
 
bool IsArray () const
 Indicates whether the content of this ECValue is an array (DgnPlatform::VALUEKIND_Array). More...
 
bool IsStruct () const
 Indicates whether the content of this ECValue is a struct (DgnPlatform::VALUEKIND_Struct). More...
 
bool IsPrimitive () const
 Indicates whether the content of this ECValue is of a primitive type (DgnPlatform::VALUEKIND_Primitive). More...
 
PrimitiveType GetPrimitiveType () const
 Gets the PrimitiveType of this ECValue. More...
 
BentleyStatus SetPrimitiveType (PrimitiveType primitiveElementType)
 Sets the PrimitiveType of this ECValue. More...
 
bool CanConvertToPrimitiveType (PrimitiveType type) const
 
ECObjectsStatus SetStructArrayInfo (uint32_t count, bool isFixedSize)
 Defines the StructArray for this ECValue. More...
 
ECObjectsStatus SetPrimitiveArrayInfo (PrimitiveType primitiveElementtype, uint32_t count, bool isFixedSize)
 Defines the primitive array for this ECValue. More...
 
ArrayInfo GetArrayInfo () const
 Returns the array information defining this ECValue. More...
 
int32_t GetInteger () const
 Returns the integer value, if this ECValue holds an Integer. More...
 
BentleyStatus SetInteger (int32_t integer)
 Sets the value of this ECValue to the given integer. More...
 
int64_t GetLong () const
 Returns the long value, if this ECValue holds a long. More...
 
BentleyStatus SetLong (int64_t long64)
 Sets the value of this ECValue to the given long. More...
 
bool GetBoolean () const
 Returns the boolean value, if this ECValue holds a boolean. More...
 
BentleyStatus SetBoolean (bool value)
 Sets the value of this ECValue to the given bool. More...
 
double GetDouble () const
 
BentleyStatus SetDouble (double value)
 Sets the value of this ECValue to the given double. More...
 
WCharCP GetString () const
 Gets the string content of this ECValue. More...
 
Utf8CP GetUtf8CP () const
 Gets the string content of this ECValue in UTF-8 encoding. More...
 
Utf16CP GetUtf16CP () const
 Returns the string value as a Utf16CP, if this ECValue holds a string. More...
 
BentleyStatus SetString (WCharCP string, bool holdADuplicate=true)
 Sets the value of this ECValue to the given string. More...
 
BentleyStatus SetUtf8CP (Utf8CP string, bool holdADuplicate=true)
 Sets the value of this ECValue to the given string. More...
 
BentleyStatus SetUtf16CP (Utf16CP string, bool holdADuplicate=true)
 Sets the value of this ECValue to the given string. More...
 
const ByteGetBinary (size_t &size) const
 Returns the binary value, if this ECValue holds binary data. More...
 
BentleyStatus SetBinary (const Byte *data, size_t size, bool holdADuplicate=false)
 Sets the value of this ECValue to the given byte array. More...
 
IGeometryPtr GetIGeometry () const
 Returns the IGeometry, if this ECValue holds a geometry value. More...
 
BentleyStatus SetIGeometry (IGeometryCR geometry)
 
IECInstancePtr GetStruct () const
 Gets the struct instance of this ECValue, if the ECValue holds a struct. More...
 
BentleyStatus SetStruct (IECInstanceP structInstance)
 Sets the specified struct instance in the ECValue. More...
 
DateTime GetDateTime () const
 Gets the DateTime value. More...
 
BentleyStatus SetDateTime (DateTimeCR dateTime)
 Sets the DateTime value. More...
 
int64_t GetDateTimeTicks () const
 Gets the DateTime value as ticks since the beginning of the Common Era epoch. More...
 
int64_t GetDateTimeUnixMillis () const
 Returns the DateTime value as milliseconds since the beginning of the Unix epoch. More...
 
int64_t GetDateTimeTicks (bool &hasMetadata, DateTime::Info &metadata) const
 Gets the DateTime value as ticks since the beginning of the Common Era epoch. More...
 
BentleyStatus SetDateTimeTicks (int64_t ceTicks)
 Sets the DateTime value as ticks since the beginning of the Common Era epoch. More...
 
BentleyStatus SetDateTimeTicks (int64_t ceTicks, DateTime::Info const &dateTimeMetadata)
 Sets the DateTime value as ticks since the beginning of the Common Era epoch. More...
 
DPoint2d GetPoint2D () const
 Returns the DPoint2d value, if this ECValue holds a Point2d. More...
 
BentleyStatus SetPoint2D (DPoint2dCR value)
 Sets the value of this ECValue to the given DPoint2d. More...
 
DPoint3d GetPoint3D () const
 Returns the DPoint3d value, if this ECValue holds a Point3d. More...
 
BentleyStatus SetPoint3D (DPoint3dCR value)
 Sets the value of this ECValue to the given DPoint3d. More...
 
WString ToString () const
 This is intended for debugging purposes, not for presentation purposes. More...
 
bool Equals (ECValueCR v) const
 Checks 2 ECValues for equality. More...
 

Static Public Member Functions

static uint32_t GetFixedPrimitiveValueSize (PrimitiveType primitiveType)
 For fixed primitive types, returns the number of bytes required to represent the type. More...
 

Protected Types

typedef bvector< ECValueValuesVector
 
typedef bvector< ECValue > * ValuesVectorP
 

Protected Member Functions

void ConstructUninitialized ()
 Constructs an uninitialized ECValue object. More...
 
void FreeMemory ()
 If appropriate for the value type, frees the memory used to store the value. More...
 

Protected Attributes

union {
   bool   m_boolean
 If a Boolean primitive type, holds the bool value. More...
 
   ::Int32   m_integer32
 If an Int32 primitive type, holds the Int32 value. More...
 
   ::Int64   m_long64
 If an Int64 primitive type, holds the Int64 value. More...
 
   double   m_double
 If a double primitive type, holds the double value. More...
 
   StringInfo   m_stringInfo
 If a String primitive type, holds the StringInfo struct defining the string. More...
 
   DPoint2d   m_dPoint2d
 If a DPoint2d primitive, holds the DPoint2d value. More...
 
   DateTimeInfo   m_dateTimeInfo
 If a DateTime primitive, holds the DateTime value. More...
 
   DPoint3d   m_dPoint3d
 If a DPoint3d primitive, holds the DPoint3d value. More...
 
   ArrayInfo   m_arrayInfo
 If an array value, holds the ArrayInfo struct defining the array. More...
 
   BinaryInfo   m_binaryInfo
 If a binary value, holds the BinaryInfo struct defining the binary data. More...
 
   IECInstanceP   m_structInstance
 The ECValue class calls AddRef and Release for the member as needed. More...
 
}; 
 The union storing the actual data of this ECValue. More...
 

Detailed Description

Variant-like object used to set and retrieve property values in ECInstances.

Remarks
It does not represent a "live" reference into the underlying ECN::IECInstance (or the object that the ECN::IECInstance represents). Changing the ECValue will not affect the IECInstance unless you subsequently call IECInstance::SetValue with it.

Member Typedef Documentation

typedef bvector<ECValue> ValuesVector
protected
typedef bvector<ECValue>* ValuesVectorP
protected

Constructor & Destructor Documentation

~ECValue ( )

Destructor.

ECValue ( )

Initializes a new instance of the ECValue type.

ECValue ( ECValueCR  v)

Initializes a new instance of the ECValue type from the given ECValue.

Parameters
[in]vECValue to initialize this object from
ECValue ( ValueKind  classification)
explicit

Constructs an uninitialized ECValue of the specified ValueKind.

Parameters
[in]classificationThe type to set this new ECValue to
ECValue ( PrimitiveType  primitiveType)
explicit

Constructs an uninitialized ECValue of the specified PrimitiveType.

Parameters
[in]primitiveTypeThe type to set this new ECValue to
ECValue ( ::Int32  integer32)
explicit

Initializes a new instance of ECValue from the given value.

Type is set to DgnPlatform::PRIMITIVETYPE_Integer

Parameters
[in]integer32Value to initialize this ECValue from
ECValue ( ::Int64  long64)
explicit

Initializes a new instance of ECValue from the given value.

Type is set to DgnPlatform::PRIMITIVETYPE_Long

Parameters
[in]long64Value to initialize this ECValue from
ECValue ( double  doubleVal)
explicit

Initializes a new instance of ECValue from the given value.

Type is set to DgnPlatform::PRIMITIVETYPE_Double

Parameters
[in]doubleValValue to initialize this ECValue from
ECValue ( WCharCP  string,
bool  holdADuplicate = true 
)
explicit

Initializes a new instance of ECValue from the given value.

Type is set to DgnPlatform::PRIMITIVETYPE_String

Parameters
[in]stringValue to initialize this ECValue from
[in]holdADuplicatetrue, if a copy of string should be held in the ECValue object. false, otherwise.
ECValue ( Utf8CP  string,
bool  holdADuplicate = true 
)
explicit

Initializes a new instance of ECValue from the given value.

Type is set to DgnPlatform::PRIMITIVETYPE_String

Parameters
[in]stringValue to initialize this ECValue from
[in]holdADuplicatetrue, if a copy of string should be held in the ECValue object. false, otherwise.
ECValue ( Utf16CP  string,
bool  holdADuplicate = true 
)
explicit

Initializes a new instance of ECValue from the given value.

Type is set to DgnPlatform::PRIMITIVETYPE_String

Parameters
[in]stringValue to initialize this ECValue from
[in]holdADuplicatetrue, if a copy of string should be held in the ECValue object. false, otherwise.
ECValue ( const Byte blob,
size_t  size 
)
explicit

Initializes a new instance of ECValue from the given value.

Type is set to DgnPlatform::PRIMITIVETYPE_Binary

Note
No copy of blob is created. Use ECValue::SetBinary otherwise.
See also
ECValue::SetBinary
Parameters
[in]blobValue to initialize this ECValue from
[in]sizeSize in bytes of the blob
ECValue ( DPoint2dCR  point2d)
explicit

Initializes a new instance of ECValue from the given value.

Type is set to DgnPlatform::PRIMITIVETYPE_Point2D

Parameters
[in]point2dValue to initialize this ECValue from
ECValue ( DPoint3dCR  point3d)
explicit

Initializes a new instance of ECValue from the given value.

Type is set to DgnPlatform::PRIMITIVETYPE_Point3D

Parameters
[in]point3dValue to initialize this ECValue from
ECValue ( bool  value)
explicit

Initializes a new instance of ECValue from the given value.

Type is set to DgnPlatform::PRIMITIVETYPE_Boolean

Parameters
[in]valueValue to initialize this ECValue from
ECValue ( DateTimeCR  dateTime)
explicit

Initializes a new instance of the ECValue type.

Parameters
[in]dateTimeDate time value to set.

Member Function Documentation

bool CanConvertToPrimitiveType ( PrimitiveType  type) const
void Clear ( )

Clears memory, if necessary, and sets the value back to an uninitialized state.

void ConstructUninitialized ( )
protected

Constructs an uninitialized ECValue object.

bool Equals ( ECValueCR  v) const

Checks 2 ECValues for equality.

void FreeMemory ( )
protected

If appropriate for the value type, frees the memory used to store the value.

void From ( ECValueCR  v)

Does a ShallowCopy of the supplied ECValue.

Parameters
[in]vThe ECValue to copy from
ArrayInfo GetArrayInfo ( ) const

Returns the array information defining this ECValue.

const Byte* GetBinary ( size_t &  size) const

Returns the binary value, if this ECValue holds binary data.

Parameters
[in]sizeThe size of the binary data
bool GetBoolean ( ) const

Returns the boolean value, if this ECValue holds a boolean.

DateTime GetDateTime ( ) const

Gets the DateTime value.

Returns
DateTime value
int64_t GetDateTimeTicks ( ) const

Gets the DateTime value as ticks since the beginning of the Common Era epoch.

Remarks
Ticks are 100 nanosecond intervals (i.e. 1 tick is 1 hecto-nanosecond). The Common Era epoch begins at 0001-01-01 00:00:00 UTC.
Note
Ignores the date time metadata. Use ECValue::GetDateTime if you need the metadata.
Returns
DateTime value as ticks since the beginning of the Common Era epoch.
int64_t GetDateTimeTicks ( bool &  hasMetadata,
DateTime::Info metadata 
) const

Gets the DateTime value as ticks since the beginning of the Common Era epoch.

Remarks
Ticks are 100 nanosecond intervals (i.e. 1 tick is 1 hecto-nanosecond). The Common Era epoch begins at 0001-01-01 00:00:00 UTC.
Parameters
[out]hasMetadatatrue, if this ECValue objects contains date time metadata. false otherwise
[out]metadataif hasMetadata is true, contains the metadata available in this ECValue.
Returns
DateTime value as ticks since the beginning of the Common Era epoch.
int64_t GetDateTimeUnixMillis ( ) const

Returns the DateTime value as milliseconds since the beginning of the Unix epoch.

The Unix epoch begins at 1970-01-01 00:00:00 UTC. DateTimes before the Unix epoch are negative.

Note
Ignores the date time metadata. Use ECValue::GetDateTime if you need the metadata.
Returns
DateTime as milliseconds since the beginning of the Unix epoch.
double GetDouble ( ) const
Returns
The double held by the ECValue, or std::numeric_limits<double>::quiet_NaN() if it is not a double or IsNull
static uint32_t GetFixedPrimitiveValueSize ( PrimitiveType  primitiveType)
static

For fixed primitive types, returns the number of bytes required to represent the type.

Parameters
[in]primitiveTypeThe type to measure
Returns
The sizeof the given type, if it is a fixed size primitive
IGeometryPtr GetIGeometry ( ) const

Returns the IGeometry, if this ECValue holds a geometry value.

int32_t GetInteger ( ) const

Returns the integer value, if this ECValue holds an Integer.

ValueKind GetKind ( ) const

Returns the ValueKind of this value.

int64_t GetLong ( ) const

Returns the long value, if this ECValue holds a long.

DPoint2d GetPoint2D ( ) const

Returns the DPoint2d value, if this ECValue holds a Point2d.

DPoint3d GetPoint3D ( ) const

Returns the DPoint3d value, if this ECValue holds a Point3d.

PrimitiveType GetPrimitiveType ( ) const

Gets the PrimitiveType of this ECValue.

WCharCP GetString ( ) const

Gets the string content of this ECValue.

Note
If the encoding of the string in the ECValue differs from the encoding of what is to be returned, the string is automatically converted. To avoid string conversions call ECValue::IsUtf8 first.
Returns
string content
IECInstancePtr GetStruct ( ) const

Gets the struct instance of this ECValue, if the ECValue holds a struct.

Utf16CP GetUtf16CP ( ) const

Returns the string value as a Utf16CP, if this ECValue holds a string.

Utf8CP GetUtf8CP ( ) const

Gets the string content of this ECValue in UTF-8 encoding.

Note
If the encoding of the string in the ECValue differs from the encoding of what is to be returned, the string is automatically converted. To avoid string conversions call ECValue::IsUtf8 first.
Returns
string content in UTF-8 encoding
bool IsArray ( ) const

Indicates whether the content of this ECValue is an array (DgnPlatform::VALUEKIND_Array).

Returns
true if the ECValue content is an array. false otherwise.
bool IsBinary ( ) const

Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Binary.

Returns
true if the ECValue content is of type DgnPlatform::PRIMITIVETYPE_Binary. false otherwise.
bool IsBoolean ( ) const

Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Boolean.

Returns
true if the ECValue content is of type DgnPlatform::PRIMITIVETYPE_Boolean. false otherwise.
bool IsDateTime ( ) const

Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_DateTime.

Returns
true if the ECValue content is of type DgnPlatform::PRIMITIVETYPE_DateTime. false otherwise.
bool IsDouble ( ) const

Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Double.

Returns
true if the ECValue content is of type DgnPlatform::PRIMITIVETYPE_Double. false otherwise.
bool IsIGeometry ( ) const

Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_IGeometry.

Returns
true if the ECValue content is of type DgnPlatform::PRIMITIVETYPE_IGeometry. false otherwise.
bool IsInteger ( ) const

Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Integer.

Returns
true if the ECValue content is of type DgnPlatform::PRIMITIVETYPE_Integer. false otherwise.
bool IsLoaded ( ) const

Gets whether this ECValue's value has been loaded.

Returns
true if the value has been loaded, false otherwise
bool IsLong ( ) const

Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Long.

Returns
true if the ECValue content is of type DgnPlatform::PRIMITIVETYPE_Long. false otherwise.
bool IsNull ( ) const

Gets whether this ECValue is NULL or not.

Returns
true if the ECValue is NULL, false otherwise
bool IsPoint2D ( ) const

Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Point2D.

Returns
true if the ECValue content is of type DgnPlatform::PRIMITIVETYPE_Point2D. false otherwise.
bool IsPoint3D ( ) const

Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_Point3D.

Returns
true if the ECValue content is of type DgnPlatform::PRIMITIVETYPE_Point3D. false otherwise.
bool IsPrimitive ( ) const

Indicates whether the content of this ECValue is of a primitive type (DgnPlatform::VALUEKIND_Primitive).

Returns
true if the ECValue content is of a primitive type. false otherwise.
bool IsReadOnly ( ) const

Gets whether this ECValue is read-only or not.

Returns
true if the ECValue is read-only, false otherwise
bool IsString ( ) const

Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_String (regardless of encoding).

Returns
true if the ECValue content is of type DgnPlatform::PRIMITIVETYPE_String. false otherwise.
bool IsStruct ( ) const

Indicates whether the content of this ECValue is a struct (DgnPlatform::VALUEKIND_Struct).

Returns
true if the ECValue content is a struct. false otherwise.
bool IsUninitialized ( ) const

Checks whether this ECValue is uninitialized.

bool IsUtf8 ( ) const

Indicates whether the content of this ECValue is of type DgnPlatform::PRIMITIVETYPE_String and is encoded in UTF-8.

Remarks
Use this method to pick the appropriate Get method to avoid unnecessary string conversions.
ECValue v = ...;
if (v.IsUtf8 ())
{
Utf8CP string = v.GetUtf8CP ();
...
}
else
{
WCharCP string = v.GetString ();
...
}
Returns
true if the ECValue content is encoded in UTF-8. false otherwise.
ECValueR operator= ( ECValueCR  rhs)

Compares two ECValues for equality.

BentleyStatus SetBinary ( const Byte data,
size_t  size,
bool  holdADuplicate = false 
)

Sets the value of this ECValue to the given byte array.

Remarks
This call will always succeed. Previous data is cleared, and the type of the ECValue is set to a binary Primitive
Parameters
[in]dataThe value to set
[in]sizeThe size of the data
[in]holdADuplicateFlag specifying whether the ECValue should make its own copy of the string, or store the actual pointer passed in
BentleyStatus SetBoolean ( bool  value)

Sets the value of this ECValue to the given bool.

Remarks
This call will always succeed. Previous data is cleared, and the type of the ECValue is set to a bool Primitive
Parameters
[in]valueThe value to set
BentleyStatus SetDateTime ( DateTimeCR  dateTime)

Sets the DateTime value.

Parameters
[in]dateTimeDateTime value to set
Returns
SUCCESS or ERROR
BentleyStatus SetDateTimeTicks ( int64_t  ceTicks)

Sets the DateTime value as ticks since the beginning of the Common Era epoch.

Remarks
Ticks are 100 nanosecond intervals (i.e. 1 tick is 1 hecto-nanosecond). The Common Era epoch begins at 0001-01-01 00:00:00 UTC.
Note
If the ECProperty to which this ECValue will be applied contains the DateTimeInfo custom attribute, the ticks will be enriched with the metadata from the custom attribute.
Parameters
[in]ceTicksDateTime Common Era ticks to set
Returns
SUCCESS or ERROR
BentleyStatus SetDateTimeTicks ( int64_t  ceTicks,
DateTime::Info const &  dateTimeMetadata 
)

Sets the DateTime value as ticks since the beginning of the Common Era epoch.

Remarks
Ticks are 100 nanosecond intervals (i.e. 1 tick is 1 hecto-nanosecond). The Common Era epoch begins at 0001-01-01 00:00:00 UTC.
Parameters
[in]ceTicksDateTime Common Era ticks to set
[in]dateTimeMetadataDateTime metadata to set along with the ticks.
Returns
SUCCESS or ERROR
BentleyStatus SetDouble ( double  value)

Sets the value of this ECValue to the given double.

Remarks
This call will always succeed. Previous data is cleared, and the type of the ECValue is set to a double Primitive
Parameters
[in]valueThe value to set
BentleyStatus SetIGeometry ( IGeometryCR  geometry)
BentleyStatus SetInteger ( int32_t  integer)

Sets the value of this ECValue to the given integer.

Remarks
This call will always succeed. Previous data is cleared, and the type of the ECValue is set to an Integer Primitive
Parameters
[in]integerThe value to set
void SetIsLoaded ( bool  isLoaded)

Sets whether this ECValue has had its value loaded.

Parameters
[in]isLoadedIndicates whether the value has been loaded
void SetIsNull ( bool  isNull)

Sets whether this ECValue is NULL.

Parameters
[in]isNullIndicates whether the ECValue is null or not
void SetIsReadOnly ( bool  isReadOnly)

Sets whether this ECValue is read-only.

Parameters
[in]isReadOnlySets the read-only status of the ECValue
BentleyStatus SetLong ( int64_t  long64)

Sets the value of this ECValue to the given long.

Remarks
This call will always succeed. Previous data is cleared, and the type of the ECValue is set to a Long Primitive
Parameters
[in]long64The value to set
BentleyStatus SetPoint2D ( DPoint2dCR  value)

Sets the value of this ECValue to the given DPoint2d.

Remarks
This call will always succeed. Previous data is cleared, and the type of the ECValue is set to a DPoint2d primitive
Parameters
[in]valueThe value to set
BentleyStatus SetPoint3D ( DPoint3dCR  value)

Sets the value of this ECValue to the given DPoint3d.

Remarks
This call will always succeed. Previous data is cleared, and the type of the ECValue is set to a DPoint3d primitive
Parameters
[in]valueThe value to set
ECObjectsStatus SetPrimitiveArrayInfo ( PrimitiveType  primitiveElementtype,
uint32_t  count,
bool  isFixedSize 
)

Defines the primitive array for this ECValue.

Parameters
[in]primitiveElementtypeThe type of primitive the array will hold
[in]countThe initial size of the array
[in]isFixedSizeIndicates whether this array can grow or not
BentleyStatus SetPrimitiveType ( PrimitiveType  primitiveElementType)

Sets the PrimitiveType of this ECValue.

Parameters
[in]primitiveElementTypeThe type of primitive that this ECValue holds.
BentleyStatus SetString ( WCharCP  string,
bool  holdADuplicate = true 
)

Sets the value of this ECValue to the given string.

Remarks
This call will always succeed. Previous data is cleared, and the type of the ECValue is set to a string Primitive
Parameters
[in]stringThe value to set
[in]holdADuplicateFlag specifying whether the ECValue should make its own copy of the string, or store the actual pointer passed in
BentleyStatus SetStruct ( IECInstanceP  structInstance)

Sets the specified struct instance in the ECValue.

Note
ECValue doesn't create a copy of structInstance. Its ref-count is incremented by this method though.
Parameters
[in]structInstanceThe value to set
Returns
SUCCESS or ERROR
ECObjectsStatus SetStructArrayInfo ( uint32_t  count,
bool  isFixedSize 
)

Defines the StructArray for this ECValue.

Parameters
[in]countThe initial size of the array
[in]isFixedSizeIndicates whether this array can grow or not
void SetToNull ( )

Frees the values memory, if necessary, and sets the state to NULL.

BentleyStatus SetUtf16CP ( Utf16CP  string,
bool  holdADuplicate = true 
)

Sets the value of this ECValue to the given string.

Remarks
This call will always succeed. Previous data is cleared, and the type of the ECValue is set to a string Primitive
Parameters
[in]stringThe value to set
[in]holdADuplicateFlag specifying whether the ECValue should make its own copy of the string, or store the actual pointer passed in
BentleyStatus SetUtf8CP ( Utf8CP  string,
bool  holdADuplicate = true 
)

Sets the value of this ECValue to the given string.

Remarks
This call will always succeed. Previous data is cleared, and the type of the ECValue is set to a string Primitive
Parameters
[in]stringThe value to set
[in]holdADuplicateFlag specifying whether the ECValue should make its own copy of the string, or store the actual pointer passed in
void ShallowCopy ( ECValueCR  v)

Performs a shallow copy.

WString ToString ( ) const

This is intended for debugging purposes, not for presentation purposes.

Member Data Documentation

union { ... }

The union storing the actual data of this ECValue.

ArrayInfo m_arrayInfo

If an array value, holds the ArrayInfo struct defining the array.

BinaryInfo m_binaryInfo

If a binary value, holds the BinaryInfo struct defining the binary data.

bool m_boolean

If a Boolean primitive type, holds the bool value.

DateTimeInfo m_dateTimeInfo

If a DateTime primitive, holds the DateTime value.

double m_double

If a double primitive type, holds the double value.

DPoint2d m_dPoint2d

If a DPoint2d primitive, holds the DPoint2d value.

DPoint3d m_dPoint3d

If a DPoint3d primitive, holds the DPoint3d value.

::Int32 m_integer32

If an Int32 primitive type, holds the Int32 value.

::Int64 m_long64

If an Int64 primitive type, holds the Int64 value.

PrimitiveType m_primitiveType
StringInfo m_stringInfo
mutable

If a String primitive type, holds the StringInfo struct defining the string.

IECInstanceP m_structInstance

The ECValue class calls AddRef and Release for the member as needed.

ValueKind m_valueKind

The documentation for this struct was generated from the following file:

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