CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
OdValue Class Reference

#include <OdValue.h>

Inheritance diagram for OdValue:
OdStaticRxObject< OdRxObject > OdRxObject OdFieldValue

Public Types

enum  DataType {
  kUnknown = 0x00 , kLong = 0x01 , kDouble = 0x02 , kString = 0x04 ,
  kDate = 0x08 , kPoint = 0x10 , k3dPoint = 0x20 , kObjectId = 0x40 ,
  kBuffer = 0x80 , kResbuf = 0x100 , kGeneral = 0x200 , kColor = 0x400
}
 
enum  UnitType {
  kUnitless = 0x00 , kDistance = 0x01 , kAngle = 0x02 , kArea = 0x04 ,
  kVolume = 0x08 , kCurrency = 0x10 , kPercentage = 0x20
}
 
enum  ParseOption {
  kParseOptionNone = 0x00 , kSetDefaultFormat = 0x01 , kPreserveMtextFormat = 0x02 , kConvertTextToValue = 0x04 ,
  kChangeDataType = 0x08 , kParseTextForFieldCode = 0x10
}
 
enum  FormatOption {
  kFormatOptionNone = 0x00 , kForEditing = 0x01 , kForExpression = 0x02 , kUseMaximumPrecision = 0x04 ,
  kIgnoreMtextFormat = 0x08
}
 

Public Member Functions

 ODRX_HEAP_OPERATORS ()
 
 ODRX_DECLARE_MEMBERS (OdValue)
 
 OdValue (void)
 
 ~OdValue (void)
 
 OdValue (const OdValue &value)
 
 OdValue (const OdString &value)
 
 OdValue (OdInt32 value)
 
 OdValue (double value)
 
 OdValue (const OdInt64 &date)
 
 OdValue (double x, double y)
 
 OdValue (double x, double y, double z)
 
 OdValue (const OdDbObjectId &objectId)
 
 OdValue (const OdResBufPtr &resBuf)
 
 OdValue (const OdTimeStamp &time)
 
 OdValue (const void *buffer, OdInt32 bufferSize)
 
bool reset ()
 
OdValue::DataType dataType () const
 
bool isValid () const
 
 operator OdString () const
 
 operator OdInt32 () const
 
 operator double () const
 
 operator OdInt64 () const
 
 operator OdDbObjectId () const
 
OdValueoperator= (const OdValue &value)
 
OdValueoperator= (const OdString &value)
 
OdValueoperator= (OdInt32 value)
 
OdValueoperator= (double value)
 
OdValueoperator= (OdInt64 date)
 
OdValueoperator= (const OdDbObjectId &objectId)
 
OdValueoperator= (const OdResBufPtr &resBuf)
 
bool get (OdString &value) const
 
bool get (OdInt32 &value) const
 
bool get (double &value) const
 
bool get (OdInt64 &date) const
 
bool get (double &x, double &y) const
 
bool get (double &x, double &y, double &z) const
 
bool get (OdDbObjectId &objectId) const
 
bool get (OdResBufPtr &resBuf) const
 
bool get (void *&pBuf, OdInt32 &bufferSize) const
 
bool get (OdTimeStamp &time) const
 
bool set (const OdValue &value)
 
bool set (const OdString &value)
 
bool set (OdInt32 value)
 
bool set (double value)
 
bool set (const OdInt64 &date)
 
bool set (double x, double y)
 
bool set (double x, double y, double z)
 
bool set (const OdDbObjectId &objectId)
 
bool set (const OdResBufPtr &resBuf)
 
bool set (const void *buffer, OdInt32 bufferSize)
 
bool set (const OdTimeStamp &time)
 
bool reset (OdValue::DataType nDataType)
 
OdValue::UnitType unitType (void) const
 
void setUnitType (OdValue::UnitType nUnitType)
 
OdString getFormat (void) const
 
void setFormat (const OdString &pszFormat)
 
OdString format (OdDbDatabase *pDb=0) const
 
OdString format (OdValue::FormatOption nOption, OdDbDatabase *pDb=0)
 
OdString format (const OdString &pszFormat, OdValue::FormatOption nOption, OdDbDatabase *pDb=0)
 
bool format (const OdString &pszFormat, OdString &pszValue, OdDbDatabase *pDb=0) const
 
bool convertTo (OdValue::DataType nDataType, OdValue::UnitType nUnitType)
 
bool convertTo (OdValue::DataType nDataType, OdValue::UnitType nUnitType, bool bResetIfIncompatible)
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
- Public Member Functions inherited from OdStaticRxObject< OdRxObject >
void addRef ()
 
void release ()
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Protected Member Functions

 OdValue (OdValueImpl *pValImpl)
 

Protected Attributes

OdValueImpl * m_pImpl
 

Friends

class OdDbSystemInternals
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

<group Other_Classes>

Definition at line 40 of file OdValue.h.

Member Enumeration Documentation

◆ DataType

Enumerator
kUnknown 
kLong 
kDouble 
kString 
kDate 
kPoint 
k3dPoint 
kObjectId 
kBuffer 
kResbuf 
kGeneral 
kColor 

Definition at line 45 of file OdValue.h.

◆ FormatOption

Enumerator
kFormatOptionNone 
kForEditing 
kForExpression 
kUseMaximumPrecision 
kIgnoreMtextFormat 

Definition at line 82 of file OdValue.h.

◆ ParseOption

Enumerator
kParseOptionNone 
kSetDefaultFormat 
kPreserveMtextFormat 
kConvertTextToValue 
kChangeDataType 
kParseTextForFieldCode 

Definition at line 72 of file OdValue.h.

◆ UnitType

Enumerator
kUnitless 
kDistance 
kAngle 
kArea 
kVolume 
kCurrency 
kPercentage 

Definition at line 61 of file OdValue.h.

Constructor & Destructor Documentation

◆ OdValue() [1/13]

OdValue::OdValue ( void  )

◆ ~OdValue()

OdValue::~OdValue ( void  )

◆ OdValue() [2/13]

OdValue::OdValue ( const OdValue value)

◆ OdValue() [3/13]

OdValue::OdValue ( const OdString value)

◆ OdValue() [4/13]

OdValue::OdValue ( OdInt32  value)

◆ OdValue() [5/13]

OdValue::OdValue ( double  value)

◆ OdValue() [6/13]

OdValue::OdValue ( const OdInt64 date)

◆ OdValue() [7/13]

OdValue::OdValue ( double  x,
double  y 
)

◆ OdValue() [8/13]

OdValue::OdValue ( double  x,
double  y,
double  z 
)

◆ OdValue() [9/13]

OdValue::OdValue ( const OdDbObjectId objectId)

◆ OdValue() [10/13]

OdValue::OdValue ( const OdResBufPtr resBuf)

◆ OdValue() [11/13]

OdValue::OdValue ( const OdTimeStamp time)

◆ OdValue() [12/13]

OdValue::OdValue ( const void buffer,
OdInt32  bufferSize 
)

◆ OdValue() [13/13]

OdValue::OdValue ( OdValueImpl *  pValImpl)
protected

Member Function Documentation

◆ convertTo() [1/2]

bool OdValue::convertTo ( OdValue::DataType  nDataType,
OdValue::UnitType  nUnitType 
)

◆ convertTo() [2/2]

bool OdValue::convertTo ( OdValue::DataType  nDataType,
OdValue::UnitType  nUnitType,
bool  bResetIfIncompatible 
)

◆ dataType()

OdValue::DataType OdValue::dataType ( ) const

Returns the datatype of this FieldValue object.

Remarks
dataType() returns one of the following:

Value kUnknown 0x00 kLong 0x01 kDouble 0x02 kString 0x04 kDate 0x08 kPoint 0x10 k3dPoint 0x20 kObjectId 0x40 kBuffer 0x80 kResbuf 0x100

◆ dwgInFields()

virtual OdResult OdValue::dwgInFields ( OdDbDwgFiler pFiler)
virtual

◆ dwgOutFields()

virtual void OdValue::dwgOutFields ( OdDbDwgFiler pFiler) const
virtual

◆ dxfInFields()

virtual OdResult OdValue::dxfInFields ( OdDbDxfFiler pFiler)
virtual

◆ dxfOutFields()

virtual void OdValue::dxfOutFields ( OdDbDxfFiler pFiler) const
virtual

◆ format() [1/4]

bool OdValue::format ( const OdString pszFormat,
OdString pszValue,
OdDbDatabase pDb = 0 
) const

◆ format() [2/4]

OdString OdValue::format ( const OdString pszFormat,
OdValue::FormatOption  nOption,
OdDbDatabase pDb = 0 
)

◆ format() [3/4]

OdString OdValue::format ( OdDbDatabase pDb = 0) const

◆ format() [4/4]

OdString OdValue::format ( OdValue::FormatOption  nOption,
OdDbDatabase pDb = 0 
)

◆ get() [1/10]

bool OdValue::get ( double &  value) const

Returns the value of this FieldValue object.

Parameters
value[out] Receives the value.
Returns
Returns true if and only if successful.

◆ get() [2/10]

bool OdValue::get ( double &  x,
double &  y 
) const

Returns the value of this FieldValue object.

Parameters
x[out] Receives the X-coordinate of the point.
y[out] Receives the Y-coordinate of the point.
Returns
Returns true if and only if successful.

◆ get() [3/10]

bool OdValue::get ( double &  x,
double &  y,
double &  z 
) const

Returns the value of this FieldValue object.

Parameters
x[out] Receives the X-coordinate of the point.
y[out] Receives the Y-coordinate of the point.
z[out] Receives the Z-coordinate of the point.
Returns
Returns true if and only if successful.

◆ get() [4/10]

bool OdValue::get ( OdDbObjectId objectId) const

Returns the value of this FieldValue object.

Parameters
objectId[in] Object ID.
\returns
Returns true if and only if successful.

◆ get() [5/10]

bool OdValue::get ( OdInt32 value) const

Returns the value of this FieldValue object.

Parameters
value[out] Receives the value.
Returns
Returns true if and only if successful.

◆ get() [6/10]

bool OdValue::get ( OdInt64 date) const

Returns the value of this FieldValue object.

Parameters
date[out] Receives the date value
Returns
Returns true if and only if successful.

◆ get() [7/10]

bool OdValue::get ( OdResBufPtr resBuf) const

Returns the value of this FieldValue object.

Parameters
resBuf[out] Receives the ResBuf list.
Returns
Returns true if and only if successful.

◆ get() [8/10]

bool OdValue::get ( OdString value) const

Returns the value of this FieldValue object.

Parameters
value[out] Receives the value.
Returns
Returns true if and only if successful.

◆ get() [9/10]

bool OdValue::get ( OdTimeStamp time) const

Returns the value of this FieldValue object.

Parameters
time[out] Receives the time value.
Returns
Returns true if and only if successful.

◆ get() [10/10]

bool OdValue::get ( void *&  pBuf,
OdInt32 bufferSize 
) const

Returns the value of this FieldValue object.

\param pBuf [out]  Receives a pointer to the buffer.
Parameters
bufferSize[out] Receives the buffer size.
\returns
Returns true if and only if successful.

◆ getFormat()

OdString OdValue::getFormat ( void  ) const

◆ isValid()

bool OdValue::isValid ( ) const

Returns true if and only if the datatype of this FieldValue is not kUnknown.

◆ ODRX_DECLARE_MEMBERS()

OdValue::ODRX_DECLARE_MEMBERS ( OdValue  )

◆ ODRX_HEAP_OPERATORS()

OdValue::ODRX_HEAP_OPERATORS ( )

◆ operator double()

OdValue::operator double ( ) const

◆ operator OdDbObjectId()

OdValue::operator OdDbObjectId ( ) const

◆ operator OdInt32()

OdValue::operator OdInt32 ( ) const

◆ operator OdInt64()

OdValue::operator OdInt64 ( ) const

◆ operator OdString()

OdValue::operator OdString ( ) const

Returns this object as the specified type.

Remarks
OdInt64 is used for date values.

◆ operator=() [1/7]

OdValue & OdValue::operator= ( const OdDbObjectId objectId)

◆ operator=() [2/7]

OdValue & OdValue::operator= ( const OdResBufPtr resBuf)

◆ operator=() [3/7]

OdValue & OdValue::operator= ( const OdString value)

◆ operator=() [4/7]

OdValue & OdValue::operator= ( const OdValue value)

◆ operator=() [5/7]

OdValue & OdValue::operator= ( double  value)

◆ operator=() [6/7]

OdValue & OdValue::operator= ( OdInt32  value)

◆ operator=() [7/7]

OdValue & OdValue::operator= ( OdInt64  date)

◆ reset() [1/2]

bool OdValue::reset ( )

Sets the datatype of this FieldValue object to kUnknown.

Remarks
This function always returns true.

◆ reset() [2/2]

bool OdValue::reset ( OdValue::DataType  nDataType)

Sets the datatype of this FieldValue object to kUnknown.

\remarks

This function always returns true.

◆ set() [1/11]

bool OdValue::set ( const OdDbObjectId objectId)

Sets the value for this FieldValue object.

Parameters
objectId[in] Object ID.
Returns
Returns true if and only if successful.

◆ set() [2/11]

bool OdValue::set ( const OdInt64 date)

Sets the value for this FieldValue object.

Parameters
date[in] Date value
Returns
Returns true if and only if successful.

◆ set() [3/11]

bool OdValue::set ( const OdResBufPtr resBuf)

Sets the value for this FieldValue object.

Parameters
resBuf[in] ResBuf list.
Returns
Returns true if and only if successful.

◆ set() [4/11]

bool OdValue::set ( const OdString value)

Sets the value for this FieldValue object.

\param value [in]  Value.
Returns
Returns true if and only if successful.

◆ set() [5/11]

bool OdValue::set ( const OdTimeStamp time)

Returns the value of this FieldValue object.

Parameters
time[in] The time value.
Returns
Returns true if and only if successful.

◆ set() [6/11]

bool OdValue::set ( const OdValue value)

Sets the value for this FieldValue object.

Parameters
value[in] Value.
\returns
Returns true if and only if successful.

◆ set() [7/11]

bool OdValue::set ( const void buffer,
OdInt32  bufferSize 
)

Sets the value for this FieldValue object.

Parameters
buffer[in] Buffer.
bufferSize[in] Buffer size.
Returns
Returns true if and only if successful.

◆ set() [8/11]

bool OdValue::set ( double  value)

Sets the value for this FieldValue object.

\param value [in]  Value.

\returns

Returns true if and only if successful.

◆ set() [9/11]

bool OdValue::set ( double  x,
double  y 
)

Sets the value for this FieldValue object.

Parameters
x[in] X-coordinate of the point.
y[in] Y-coordinate of the point.
Returns
Returns true if and only if successful.

◆ set() [10/11]

bool OdValue::set ( double  x,
double  y,
double  z 
)

Sets the value for this FieldValue object.

Parameters
x[in] X-coordinate of the point.
y[in] Y-coordinate of the point.
z[in] Z-coordinate of the point.
Returns
Returns true if and only if successful.

◆ set() [11/11]

bool OdValue::set ( OdInt32  value)

Sets the value for this FieldValue object.

\param value [in]  Value.

\returns

Returns true if and only if successful.

◆ setFormat()

void OdValue::setFormat ( const OdString pszFormat)

◆ setUnitType()

void OdValue::setUnitType ( OdValue::UnitType  nUnitType)

◆ unitType()

OdValue::UnitType OdValue::unitType ( void  ) const

Friends And Related Function Documentation

◆ OdDbSystemInternals

friend class OdDbSystemInternals
friend

Definition at line 418 of file OdValue.h.

Member Data Documentation

◆ m_pImpl

OdValueImpl* OdValue::m_pImpl
protected

Definition at line 419 of file OdValue.h.


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