CValue::ValueField Union Reference



Your Ad Here

#include <xsi_value.h>

List of all members.

Public Attributes

short  sval
LONG  lval
float  fval
double  dval
bool  bval
wchar_t *  pwval
siPtrType  pval
signed char  cval
unsigned char  ucval
CValueArray paval
unsigned short  usval
ULONG  ulval


Detailed Description

This union is used for storing the value described by the CValue::m_t data member. Instead of accessing the value stored in CValue::m_u directly, it is strongly recommended to use the extractor methods defined by CValue.

Example:
Demonstrates the CValue extractor methods
        CValue val((short)255);

        // good but not recommended
        short wrong = val.sval;

        // right way to do it
        short good = (short)val;

        CComAPIHandler uitoolkit;
        uitoolkit.CreateInstance( L"XSI.UIToolkit");

        CValue dispVal = uitoolkit.GetRef();

        // wrong way of accessing a COM object from a CValue, could return
        // an invalid pointer
        IDispatch* pDisp = dispVal.pval;

        // this is the right way to do it
        IDispatch* pDisp = (IDispatch*)(CValue::siPtrType)dispVal;


Member Data Documentation

short sval

2 bytes signed integer number value (-32768..32767)

LONG lval

4 bytes signed integer number value (-2147483648..2147483647)

float fval

float value

double dval

double value

bool bval

bool value

wchar_t* pwval

CString value

siPtrType pval

pointer value

signed char cval

byte value

unsigned char ucval

unsigned byte value

CValueArray* paval

Array value

unsigned short usval

2 bytes unsigned integer number value (0..65535)

ULONG ulval

4 bytes unsigned integer number value (0..4294967295)


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

Return to Softimage XSI Index


Your Ad Here