HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDGT_Value Class Reference

#include <PDGT_Value.h>

Public Types

enum  DataType {
  eInteger, eFloat, eString, ePythonObject,
  eInvalid
}
 
using Map = UT_ArrayStringMap< PDGT_Value >
 
using Array = UT_Array< PDGT_Value >
 

Public Member Functions

 PDGT_Value ()
 
 PDGT_Value (const PDGT_Value &other)
 
 PDGT_Value (fpreal float_value)
 
 PDGT_Value (exint int_value)
 
 PDGT_Value (bool bool_value)
 
 PDGT_Value (int int_value)
 
 PDGT_Value (const char *str_value)
 
 PDGT_Value (PY_PyObject *py_value)
 
 ~PDGT_Value ()
 
PDGT_Valueoperator= (const PDGT_Value &other)
 
void setDataType (DataType data_type, bool initialize=false)
 
void setFloatValue (fpreal float_value)
 
void setIntValue (exint int_value)
 
void setBoolValue (bool bool_value)
 
void setStringValue (const char *str_value)
 
void setPythonObjectValue (PY_PyObject *py_value)
 
void setValue (const PDGT_Value &value)
 
void setValue (fpreal float_value)
 
void setValue (exint int_value)
 
void setValue (int int_value)
 
void setValue (bool bool_value)
 
void setValue (const char *str_value)
 
void setValue (PY_PyObject *py_object)
 
void loadValue (const UT_JSONValue &json_value, DataType data_type)
 
bool valid () const
 
DataType dataType () const
 
fpreal floatValue () const
 
exint intValue () const
 
bool boolValue () const
 
const UT_StringHolderstringValue () const
 
PY_PyObjectpyObjectValue () const
 
void value (fpreal &value) const
 
void value (exint &value) const
 
void value (int &value) const
 
void value (bool &value) const
 
void value (UT_StringHolder &value) const
 
UT_StringHolder valueAsString (bool quoted=true) const
 
void valueAsString (UT_WorkBuffer &buffer, bool quoted=true) const
 
void valueToJSON (UT_JSONWriter &writer) const
 

Static Public Member Functions

static UT_StringHolder getDataTypeAsString (DataType type)
 
static void fromJSONArray (Array &value_array, const UT_JSONValueArray &json_array, DataType data_type)
 

Detailed Description

Definition at line 23 of file PDGT_Value.h.

Member Typedef Documentation

Definition at line 27 of file PDGT_Value.h.

Definition at line 26 of file PDGT_Value.h.

Member Enumeration Documentation

Enumerator
eInteger 
eFloat 
eString 
ePythonObject 
eInvalid 

Definition at line 29 of file PDGT_Value.h.

Constructor & Destructor Documentation

PDGT_Value::PDGT_Value ( )
PDGT_Value::PDGT_Value ( const PDGT_Value other)
PDGT_Value::PDGT_Value ( fpreal  float_value)
PDGT_Value::PDGT_Value ( exint  int_value)
PDGT_Value::PDGT_Value ( bool  bool_value)
PDGT_Value::PDGT_Value ( int  int_value)
PDGT_Value::PDGT_Value ( const char *  str_value)
PDGT_Value::PDGT_Value ( PY_PyObject py_value)
PDGT_Value::~PDGT_Value ( )

Member Function Documentation

bool PDGT_Value::boolValue ( ) const
DataType PDGT_Value::dataType ( ) const
fpreal PDGT_Value::floatValue ( ) const
static void PDGT_Value::fromJSONArray ( Array value_array,
const UT_JSONValueArray json_array,
DataType  data_type 
)
static
static UT_StringHolder PDGT_Value::getDataTypeAsString ( DataType  type)
static
exint PDGT_Value::intValue ( ) const
void PDGT_Value::loadValue ( const UT_JSONValue json_value,
DataType  data_type 
)
PDGT_Value& PDGT_Value::operator= ( const PDGT_Value other)
PY_PyObject* PDGT_Value::pyObjectValue ( ) const
void PDGT_Value::setBoolValue ( bool  bool_value)
void PDGT_Value::setDataType ( DataType  data_type,
bool  initialize = false 
)
void PDGT_Value::setFloatValue ( fpreal  float_value)
void PDGT_Value::setIntValue ( exint  int_value)
void PDGT_Value::setPythonObjectValue ( PY_PyObject py_value)
void PDGT_Value::setStringValue ( const char *  str_value)
void PDGT_Value::setValue ( const PDGT_Value value)
void PDGT_Value::setValue ( fpreal  float_value)
void PDGT_Value::setValue ( exint  int_value)
void PDGT_Value::setValue ( int  int_value)
void PDGT_Value::setValue ( bool  bool_value)
void PDGT_Value::setValue ( const char *  str_value)
void PDGT_Value::setValue ( PY_PyObject py_object)
const UT_StringHolder& PDGT_Value::stringValue ( ) const
bool PDGT_Value::valid ( ) const
void PDGT_Value::value ( fpreal value) const
void PDGT_Value::value ( exint value) const
void PDGT_Value::value ( int value) const
void PDGT_Value::value ( bool &  value) const
void PDGT_Value::value ( UT_StringHolder value) const
UT_StringHolder PDGT_Value::valueAsString ( bool  quoted = true) const
void PDGT_Value::valueAsString ( UT_WorkBuffer buffer,
bool  quoted = true 
) const
void PDGT_Value::valueToJSON ( UT_JSONWriter writer) const

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