FDO API Reference Feature Data Objects
Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FdoDecimalValue Class Reference

#include <DecimalValue.h>

Inherits FdoDataValue.

Inheritance diagram for FdoDecimalValue:

[legend]
List of all members.

Detailed Description

The FdoDecimalValue class derives from FdoDataValue and represents a decimal value.

Definition at line 32 of file DecimalValue.h.


Public Member Functions

FDO_API FdoDataType GetDataType ()
 Gets the data type of the FdoDecimalValue.
FDO_API double GetDecimal ()
 Gets the decimal value.
FDO_API operator double ()
 A cast operator to get the decimal value.
FDO_API void Process (FdoIExpressionProcessor *p)
 Overrides FdoExpression.Process to pass the FdoDecimalValue to the appropriate expression processor operation.
FDO_API void SetDecimal (double value)
 Sets the decimal value.
FDO_API FdoStringToString ()
 Returns the well defined text representation of this expression.

Static Public Member Functions

FDO_API FdoDecimalValueCreate (double value)
 Constructs an instance of an FdoDecimalValue using the specified arguments.
FDO_API FdoDecimalValueCreate ()
 Constructs a default instance of an FdoDecimalValue with a value of null.

Protected Member Functions

virtual void Dispose ()
 Dispose this object.
virtual FdoCompareType DoCompare (FdoDataValue *other)
 Type-specific comparison function. Each sub-class has its own implementation.
 FdoDecimalValue (double value)
 Constructs a default instance of an FdoDecimalValue using the specified arguments.
 FdoDecimalValue ()
 Constructs a default instance of an FdoDecimalValue with a value of null.
virtual ~FdoDecimalValue ()
 Default destructor for FdoDecimalValue.

Static Protected Member Functions

FdoDecimalValueCreate (FdoDataValue *src, FdoBoolean truncate=false, FdoBoolean nullIfIncompatible=false)
 DOXYGEN-IGNORE Constructs an instance of an FdoDecimalValue from another FdoDataValue.

Protected Attributes

double m_data

Friends

class FdoByteValue
 DOXYGEN-IGNORE
class FdoInt16Value
class FdoInt32Value
class FdoInt64Value
class FdoSingleValue

Constructor & Destructor Documentation

FdoDecimalValue::FdoDecimalValue  )  [protected]
 

Constructs a default instance of an FdoDecimalValue with a value of null.

Returns:
Returns nothing

FdoDecimalValue::FdoDecimalValue double  value  )  [protected]
 

Constructs a default instance of an FdoDecimalValue using the specified arguments.

Parameters:
value Input a double
Returns:
Returns nothing

virtual FdoDecimalValue::~FdoDecimalValue  )  [protected, virtual]
 

Default destructor for FdoDecimalValue.

Returns:
Returns nothing

Member Function Documentation

FdoDecimalValue* FdoDecimalValue::Create FdoDataValue src,
FdoBoolean  truncate = false,
FdoBoolean  nullIfIncompatible = false
[static, protected]
 

DOXYGEN-IGNORE Constructs an instance of an FdoDecimalValue from another FdoDataValue.

Parameters:
src Input the other FdoDataValue. Must be of one of the following types: FdoDataType_Byte FdoDataType_Decimal FdoDataType_Int16 FdoDataType_Int32 FdoDataType_Single
truncate Input in the future, will determine what to do if source value does not fit in the decimal number range: true - truncate the value to fit. false - throw an exception
nullIfIncompatible Input in the future, will determine what to do if source value type is not compatible with the FDO decimal type: true - return NULL. false - throw an exception
Returns:
Returns an FdoDecimalValue

FDO_API FdoDecimalValue* FdoDecimalValue::Create double  value  )  [static]
 

Constructs an instance of an FdoDecimalValue using the specified arguments.

Parameters:
value Input a double
Returns:
Returns nothing

FDO_API FdoDecimalValue* FdoDecimalValue::Create  )  [static]
 

Constructs a default instance of an FdoDecimalValue with a value of null.

Returns:
Returns nothing

virtual void FdoDecimalValue::Dispose  )  [protected, virtual]
 

Dispose this object.

Returns:
Returns nothing

Implements FdoIDisposable.

virtual FdoCompareType FdoDecimalValue::DoCompare FdoDataValue other  )  [protected, virtual]
 

Type-specific comparison function. Each sub-class has its own implementation.

Parameters:
other Input the other data value
Returns:
Returns: FdoCompareType_Equal when this and the other value are equal or both null. FdoCompareType_Greater when this value is greater than the other value FdoCompareType_Less when this value is less than the other value FdoCompareType_Undefined when these two values cannot be compared. Cases where this happens are:
  • one value is null and the other is not null
  • the values have incompatible types (e.g. Int32 and DateTime).
Base implementation always returns FdoCompareType_Undefined.

Reimplemented from FdoDataValue.

FDO_API FdoDataType FdoDecimalValue::GetDataType  )  [virtual]
 

Gets the data type of the FdoDecimalValue.

Returns:
Returns an FdoDataType

Implements FdoDataValue.

FDO_API double FdoDecimalValue::GetDecimal  ) 
 

Gets the decimal value.

Returns:
Returns a double

FDO_API FdoDecimalValue::operator double  )  [inline]
 

A cast operator to get the decimal value.

Returns:
Returns a double

Definition at line 143 of file DecimalValue.h.

References FDO_API.

FDO_API void FdoDecimalValue::Process FdoIExpressionProcessor p  )  [virtual]
 

Overrides FdoExpression.Process to pass the FdoDecimalValue to the appropriate expression processor operation.

Parameters:
p Input an FdoIExpressionProcessor
Returns:
Returns nothing

Implements FdoExpression.

FDO_API void FdoDecimalValue::SetDecimal double  value  ) 
 

Sets the decimal value.

Parameters:
value Input a double
Returns:
Returns nothing

FDO_API FdoString* FdoDecimalValue::ToString  )  [virtual]
 

Returns the well defined text representation of this expression.

Returns:
Returns a character string

Implements FdoExpression.


Friends And Related Function Documentation

friend class FdoByteValue [friend]
 

DOXYGEN-IGNORE

Reimplemented from FdoDataValue.

Definition at line 35 of file DecimalValue.h.

friend class FdoInt16Value [friend]
 

Reimplemented from FdoDataValue.

Definition at line 36 of file DecimalValue.h.

friend class FdoInt32Value [friend]
 

Reimplemented from FdoDataValue.

Definition at line 37 of file DecimalValue.h.

friend class FdoInt64Value [friend]
 

Reimplemented from FdoDataValue.

Definition at line 38 of file DecimalValue.h.

friend class FdoSingleValue [friend]
 

Reimplemented from FdoDataValue.

Definition at line 39 of file DecimalValue.h.


Member Data Documentation

double FdoDecimalValue::m_data [protected]
 

Definition at line 183 of file DecimalValue.h.


The documentation for this class was generated from the following file:
Comments or suggestions? Send us feedback.