|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CValue { public: enum { typeVoid, typeFloat, typeDouble, typeLong, typeShort, typeUnsignedLong, typeUnsignedShort, typeChar, typeWchar, typeBoolean, typeOctet, typeString, typeWstring, typeInterface }; public: CValue(); ~CValue(); public: void CreateAny(const CValue &value); void CreateVoid(); void CreateFloat(float fltValue); void CreateDouble(double dblValue); void CreateLong(long lngValue); void CreateShort(short shoValue); void CreateUnsignedLong(unsigned long lngValue); void CreateUnsignedShort(unsigned short shoValue); void CreateChar(char chValue); void CreateWchar(WCHAR chValue); void CreateBoolean(bool bValue); void CreateOctet(BYTE bytValue); void CreateString(const char *pszValue); void CreateWstring(const WCHAR *pszValue); void CreateInterface(CObject *pObject); public: int GetType() const; float GetFloat() const; double GetDouble() const; long GetLong() const; short GetShort() const; unsigned long GetUnsignedLong() const; unsigned short GetUnsignedShort() const; char GetChar() const; WCHAR GetWchar() const; bool GetBoolean() const; BYTE GetOctet() const; char *GetString() const; WCHAR *GetWstring() const; CObject *GetInterface() const; };
The SOM value.
CObject
Constructor/Destructor Summary | |
CValue
();
����������Constructs the value. |
|
~CValue
();
����������Destroys the value. |
Function Summary | |
void
|
CreateAny
(const CValue &value);
����������Reinitializes this value, making a copy of another (source) value. |
void
|
CreateVoid
();
����������Reinitializes this value to typeVoid
. |
void
|
CreateFloat
(float fltValue);
����������Reinitializes this value to typeFloat
. |
void
|
CreateDouble
(double dblValue);
����������Reinitializes this value to typeDouble
. |
void
|
CreateLong
(long lngValue);
����������Reinitializes this value to typeLong
. |
void
|
CreateShort
(short shoValue);
����������Reinitializes this value to typeShort
. |
void
|
CreateUnsignedLong
(unsigned long lngValue);
����������Reinitializes this value to typeUnsignedLong
. |
void
|
CreateUnsignedShort
(unsigned short shoValue);
����������Reinitializes this value to typeUnsignedShort
. |
void
|
CreateChar
(char chValue);
����������Reinitializes this value to typeChar
. |
void
|
CreateWchar
(WCHAR chValue);
����������Reinitializes this value to typeWchar
. |
void
|
CreateBoolean
(bool bValue);
����������Reinitializes this value to typeBoolean
. |
void
|
CreateOctet
(BYTE bytValue);
����������Reinitializes this value to typeOctet
. |
void
|
CreateString
(const char *pszValue);
����������Reinitializes this value to typeString
. |
void
|
CreateWstring
(const WCHAR *pszValue);
����������Reinitializes this value to typeWstring
. |
void
|
CreateInterface
(CObject *pObject);
����������Reinitializes this value to typeInterface
. |
int
|
GetType
() const;
����������Returns the type code of this value. |
float
|
GetFloat
() const;
����������Returns a floating point number associated with this value. |
double
|
GetDouble
() const;
����������Returns a double precision number associated with this value. |
long
|
GetLong
() const;
����������Returns a long integer associated with this value. |
short
|
GetShort
() const;
����������Returns a short integer associated with this value. |
unsigned�long
|
GetUnsignedLong
() const;
����������Returns an unsigned long integer associated with this value. |
unsigned�short
|
GetUnsignedShort
() const;
����������Returns an unsigned short integer associated with this value. |
char
|
GetChar
() const;
����������Returns an 8-bit character code associated with this value. |
WCHAR
|
GetWchar
() const;
����������Returns a 16-bit character code associated with this value. |
bool
|
GetBoolean
() const;
����������Returns a boolean associated with this value. |
BYTE
|
GetOctet
() const;
����������Returns an octet associated with this value. |
char�*
|
GetString
() const;
����������Returns a string of 8-bit characters associated with this value. |
WCHAR�*
|
GetWstring
() const;
����������Returns a string of 16-bit characters associated with this value. |
CObject�*
|
GetInterface
() const;
����������Returns an object associated with this value. |
Constructor/Destructor Detail |
CValue();
Constructs the value.
The value is assigned type
typeVoid
.
~CValue();
Destroys the value.
If this value is of type
typeString
or
typeWstring
, the memory allocated
to hold string data is freed; if this value
is of type
typeInterace
, the SOM object
associated with this value is released (applying
Core::CInterface::Release
to that object).
Function Detail |
void CreateAny(const CValue &value);
Reinitializes this value, making a copy of another (source) value.
If the source value is of type
typeString
or
typeWstring
, the separate block of memory is
allocated to hold a copy of string data for this value.
If the source value is of type
typeInterface
,
the proper reference counting is performed for the corresponding
SOM object.
The previous content of this value is destroyed.
value
- the source valuevoid CreateVoid();
Reinitializes this value to
typeVoid
.
The previous content of this value is destroyed.
void CreateFloat(float fltValue);
Reinitializes this value to
typeFloat
.
The previous content of this value is destroyed.
fltValue
- the floating point number
to be associated with this valuevoid CreateDouble(double dblValue);
Reinitializes this value to
typeDouble
.
The previous content of this value is destroyed.
dblValue
- the double precision number
to be associated with this valuevoid CreateLong(long lngValue);
Reinitializes this value to
typeLong
.
The previous content of this value is destroyed.
lngValue
- the long integer
to be associated with this valuevoid CreateShort(short shoValue);
Reinitializes this value to
typeShort
.
The previous content of this value is destroyed.
shoValue
- the short integer
to be associated with this valuevoid CreateUnsignedLong(unsigned long lngValue);
Reinitializes this value to
typeUnsignedLong
.
The previous content of this value is destroyed.
lngValue
- the unsigned long integer
to be associated with this valuevoid CreateUnsignedShort(unsigned short shoValue);
Reinitializes this value to
typeUnsignedShort
.
The previous content of this value is destroyed.
shoValue
- the unsigned short integer
to be associated with this valuevoid CreateChar(char chValue);
Reinitializes this value to
typeChar
.
The previous content of this value is destroyed.
chValue
- the 8-bit character code
to be associated with this valuevoid CreateWchar(WCHAR chValue);
Reinitializes this value to
typeWchar
.
The previous content of this value is destroyed.
chValue
- the 16-bit character code
to be associated with this valuevoid CreateBoolean(bool bValue);
Reinitializes this value to
typeBoolean
.
The previous content of this value is destroyed.
bValue
- the boolean
to be associated with this valuevoid CreateOctet(BYTE bytValue);
Reinitializes this value to
typeOctet
.
The previous content of this value is destroyed.
bytValue
- the octet
to be associated with this valuevoid CreateString(const char *pszValue);
Reinitializes this value to
typeString
.
The separate block of memory is allocated to hold a copy of string data for this value. The previous content of this value is destroyed.
pszValue
- the string of 8-bit characters
to be associated with this valuevoid CreateWstring(const WCHAR *pszValue);
Reinitializes this value to
typeWstring
.
The separate block of memory is allocated to hold a copy of string data for this value. The previous content of this value is destroyed.
pszValue
- the string of 16-bit characters
to be associated with this valuevoid CreateInterface(CObject *pObject);
Reinitializes this value to
typeInterface
.
The proper reference counting is performed for the specified SOM object. The previous content of this value is destroyed.
pObject
- the SOM object
to be associated with this valueint GetType() const;
Returns the type code of this value.
Allowed type codes are specified by the anonymous enumeration
defined by
CValue
class.
float GetFloat() const;
Returns a floating point number associated with this value.
This value must be of type
typeFloat
;
otherwise the result of calling this function is unspecified.
double GetDouble() const;
Returns a double precision number associated with this value.
This value must be of type
typeDouble
;
otherwise the result of calling this function is unspecified.
long GetLong() const;
Returns a long integer associated with this value.
This value must be of type
typeLong
;
otherwise the result of calling this function is unspecified.
short GetShort() const;
Returns a short integer associated with this value.
This value must be of type
typeShort
;
otherwise the result of calling this function is unspecified.
unsigned long GetUnsignedLong() const;
Returns an unsigned long integer associated with this value.
This value must be of type
typeUnsignedLong
;
otherwise the result of calling this function is unspecified.
unsigned short GetUnsignedShort() const;
Returns an unsigned short integer associated with this value.
This value must be of type
typeUnsignedShort
;
otherwise the result of calling this function is unspecified.
char GetChar() const;
Returns an 8-bit character code associated with this value.
This value must be of type
typeChar
;
otherwise the result of calling this function is unspecified.
WCHAR GetWchar() const;
Returns a 16-bit character code associated with this value.
This value must be of type
typeWchar
;
otherwise the result of calling this function is unspecified.
bool GetBoolean() const;
Returns a boolean associated with this value.
This value must be of type
typeBoolean
;
otherwise the result of calling this function is unspecified.
BYTE GetOctet() const;
Returns an octet associated with this value.
This value must be of type
typeOctet
;
otherwise the result of calling this function is unspecified.
char *GetString() const;
Returns a string of 8-bit characters associated with this value.
The pointer to the string data attached to this value is actually returned.
This value must be of type
typeString
;
otherwise the result of calling this function is unspecified.
WCHAR *GetWstring() const;
Returns a string of 16-bit characters associated with this value.
The pointer to the string data attached to this value is actually returned.
This value must be of type
typeWstring
;
otherwise the result of calling this function is unspecified.
CObject *GetInterface() const;
Returns an object associated with this value.
The reference count of the object is not changed.
This value must be of type
typeInterface
;
otherwise the result of calling this function is unspecified.
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |