inlib  1.2.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
inlib::value Class Reference
Collaboration diagram for inlib::value:
Collaboration graph
[legend]

List of all members.

Public Types

enum  e_type {
  NONE = 0, UNSIGNED_SHORT = 12, SHORT = 13, UNSIGNED_INT = 14,
  INT = 15, UNSIGNED_INT64 = 16, INT64 = 17, FLOAT = 30,
  DOUBLE = 31, BOOL = 50, STRING = 51, VOID_STAR = 100,
  DOUBLE_STAR = 101, FLOAT_STAR = 102, INT_STAR = 103, ARRAY_UNSIGNED_SHORT = 1012,
  ARRAY_SHORT = 1013, ARRAY_UNSIGNED_INT = 1014, ARRAY_INT = 1015, ARRAY_UNSIGNED_INT64 = 1016,
  ARRAY_INT64 = 1017, ARRAY_FLOAT = 1030, ARRAY_DOUBLE = 1031, ARRAY_BOOL = 1050,
  ARRAY_STRING = 1051
}

Public Member Functions

 value ()
 value (bool a_value)
 value (short a_value)
 value (int a_value)
 value (int64 a_value)
 value (uint64 a_value)
 value (float a_value)
 value (double a_value)
 value (unsigned short a_value)
 value (unsigned int a_value)
 value (void *a_value)
 value (double *a_value)
 value (float *a_value)
 value (int *a_value)
 value (const char *a_value)
 value (const std::string &a_value)
virtual ~value ()
 value (const value &a_from)
valueoperator= (const value &a_from)
void set_label (const std::string &a_s)
std::string label () const
e_type type () const
void set_type (e_type a_type)
void set (void *a_value)
unsigned char get_unsigned_char () const
char get_char () const
unsigned int get_unsigned_int () const
int get_int () const
int64 get_int64 () const
uint64 get_unsigned_int64 () const
unsigned short get_unsigned_short () const
short get_short () const
float get_float () const
double get_double () const
void * get_void_star () const
double * get_double_star () const
float * get_float_star () const
int * get_int_star () const
bool get_bool () const
std::string get_string () const
bool s_type (std::string &a_s) const
bool tos (std::string &a_s) const

Static Public Member Functions

static bool s_type (inlib::value::e_type a_type, std::string &a_s)
static bool tos (const value &a_v, std::string &a_s)

Protected Member Functions

void reset ()

Protected Attributes

std::string * m_label
e_type m_type
union {
   bool   m_bool
   char   m_char
   int   m_int
   short   m_short
   int64   m_int64
   float   m_float
   double   m_double
   unsigned char   m_unsigned_char
   unsigned short   m_unsigned_short
   unsigned int   m_unsigned_int
   uint64   m_unsigned_int64
   void *   m_void_star
   double *   m_double_star
   float *   m_float_star
   int *   m_int_star
   std::string *   m_string
   inlib::array< unsigned char > *   m_array_unsigned_char
   inlib::array< char > *   m_array_char
   inlib::array< unsigned short > *   m_array_unsigned_short
   inlib::array< short > *   m_array_short
   inlib::array< uint64 > *   m_array_unsigned_int64
   inlib::array< int64 > *   m_array_int64
   inlib::array< unsigned int > *   m_array_unsigned_int
   inlib::array< int > *   m_array_int
   inlib::array< float > *   m_array_float
   inlib::array< double > *   m_array_double
   inlib::array< bool > *   m_array_bool
   inlib::array< std::string > *   m_array_string
u

Detailed Description

Definition at line 19 of file value.


Member Enumeration Documentation

Enumerator:
NONE 
UNSIGNED_SHORT 
SHORT 
UNSIGNED_INT 
INT 
UNSIGNED_INT64 
INT64 
FLOAT 
DOUBLE 
BOOL 
STRING 
VOID_STAR 
DOUBLE_STAR 
FLOAT_STAR 
INT_STAR 
ARRAY_UNSIGNED_SHORT 
ARRAY_SHORT 
ARRAY_UNSIGNED_INT 
ARRAY_INT 
ARRAY_UNSIGNED_INT64 
ARRAY_INT64 
ARRAY_FLOAT 
ARRAY_DOUBLE 
ARRAY_BOOL 
ARRAY_STRING 

Definition at line 25 of file value.

              {
    NONE = 0,
    // integers :
    //UNSIGNED_CHAR = 10,
    //CHAR = 11,
    UNSIGNED_SHORT = 12,
    SHORT = 13,
    UNSIGNED_INT = 14,
    INT = 15,
    UNSIGNED_INT64 = 16,
    INT64 = 17,
    // reals :
    FLOAT = 30,
    DOUBLE = 31,
    // else :
    BOOL = 50,
    STRING = 51,
    // pointers :
    VOID_STAR = 100,
    DOUBLE_STAR = 101,
    FLOAT_STAR = 102,
    INT_STAR = 103,

    // multidimensional vectors (1000+base type) :
    //ARRAY_UNSIGNED_CHAR = 1010,
    //ARRAY_CHAR = 1011,
    ARRAY_UNSIGNED_SHORT = 1012,
    ARRAY_SHORT = 1013,
    ARRAY_UNSIGNED_INT = 1014,
    ARRAY_INT = 1015,
    ARRAY_UNSIGNED_INT64 = 1016,
    ARRAY_INT64 = 1017,
    ARRAY_FLOAT = 1030,
    ARRAY_DOUBLE = 1031,
    ARRAY_BOOL = 1050,
    ARRAY_STRING = 1051
  };

Constructor & Destructor Documentation

inlib::value::value ( ) [inline]

Definition at line 63 of file value.

         :m_label(0){
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = NONE;
    u.m_unsigned_int64 = 0;
  }
inlib::value::value ( bool  a_value) [inline]

Definition at line 71 of file value.

                     :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = BOOL;
    u.m_bool = a_value;
  }
inlib::value::value ( short  a_value) [inline]

Definition at line 85 of file value.

                      :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = SHORT;
    u.m_short = a_value;
  }
inlib::value::value ( int  a_value) [inline]

Definition at line 92 of file value.

                    :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = INT;
    u.m_int = a_value;
  }
inlib::value::value ( int64  a_value) [inline]

Definition at line 99 of file value.

                      :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = INT64;
    u.m_int64 = a_value;
  }
inlib::value::value ( uint64  a_value) [inline]

Definition at line 106 of file value.

                       :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = UNSIGNED_INT64;
    u.m_unsigned_int64 = a_value;
  }
inlib::value::value ( float  a_value) [inline]

Definition at line 113 of file value.

                      :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = FLOAT;
    u.m_float = a_value;
  }
inlib::value::value ( double  a_value) [inline]

Definition at line 120 of file value.

                       :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = DOUBLE;
    u.m_double = a_value;
  }
inlib::value::value ( unsigned short  a_value) [inline]

Definition at line 135 of file value.

                               :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = UNSIGNED_SHORT;
    u.m_unsigned_short = a_value;
  }
inlib::value::value ( unsigned int  a_value) [inline]

Definition at line 142 of file value.

                             :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = UNSIGNED_INT;
    u.m_unsigned_int = a_value;
  }
inlib::value::value ( void *  a_value) [inline]

Definition at line 149 of file value.

                      :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = VOID_STAR;
    u.m_void_star = a_value;
  }
inlib::value::value ( double *  a_value) [inline]

Definition at line 156 of file value.

                        :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = DOUBLE_STAR;
    u.m_double_star = a_value;
  }
inlib::value::value ( float *  a_value) [inline]

Definition at line 163 of file value.

                       :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = FLOAT_STAR;
    u.m_float_star = a_value;
  }
inlib::value::value ( int *  a_value) [inline]

Definition at line 170 of file value.

                     :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = INT_STAR;
    u.m_int_star = a_value;
  }
inlib::value::value ( const char *  a_value) [inline]

Definition at line 178 of file value.

                            :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = STRING;
    u.m_string = new std::string(a_value?a_value:"");
  }
inlib::value::value ( const std::string &  a_value) [inline]

Definition at line 185 of file value.

                                 :m_label(0) {
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif
    m_type = STRING;
    u.m_string = new std::string(a_value);
  }
virtual inlib::value::~value ( ) [inline, virtual]

Definition at line 228 of file value.

                   {
    delete m_label;
    reset();
#ifdef INLIB_MEM
    mem::decrement(s_class().c_str());
#endif
  }
inlib::value::value ( const value a_from) [inline]

Definition at line 236 of file value.

                            :m_label(0){
#ifdef INLIB_MEM
    mem::increment(s_class().c_str());
#endif

    if(a_from.m_label) m_label = new std::string(*a_from.m_label);
    m_type = a_from.m_type;

    if(a_from.m_type==STRING) {
      u.m_string = new std::string(*a_from.u.m_string);

    //} else if(a_from.m_type==ARRAY_UNSIGNED_CHAR) {
    //  u.m_array_unsigned_char = 
    //    new array<unsigned char>(*a_from.u.m_array_unsigned_char);

    //} else if(a_from.m_type==ARRAY_CHAR) {
    //  u.m_array_char = new array<char>(*a_from.u.m_array_char);

    } else if(a_from.m_type==ARRAY_UNSIGNED_SHORT) {
      u.m_array_unsigned_short = 
        new array<unsigned short>(*a_from.u.m_array_unsigned_short);

    } else if(a_from.m_type==ARRAY_SHORT) {
      u.m_array_short = new array<short>(*a_from.u.m_array_short);

    } else if(a_from.m_type==ARRAY_UNSIGNED_INT) {
      u.m_array_unsigned_int = 
        new array<unsigned int>(*a_from.u.m_array_unsigned_int);

    } else if(a_from.m_type==ARRAY_INT) {
      u.m_array_int = new array<int>(*a_from.u.m_array_int);

    } else if(a_from.m_type==ARRAY_UNSIGNED_INT64) {
      u.m_array_unsigned_int64 = 
        new array<uint64>(*a_from.u.m_array_unsigned_int64);

    } else if(a_from.m_type==ARRAY_INT64) {
      u.m_array_int64 = new array<int64>(*a_from.u.m_array_int64);

    } else if(a_from.m_type==ARRAY_FLOAT) {
      u.m_array_float = new array<float>(*a_from.u.m_array_float);

    } else if(a_from.m_type==ARRAY_DOUBLE) {
      u.m_array_double = new array<double>(*a_from.u.m_array_double);

    } else if(a_from.m_type==ARRAY_BOOL) {
      u.m_array_bool = new array<bool>(*a_from.u.m_array_bool);

    } else if(a_from.m_type==ARRAY_STRING) {
      u.m_array_string = new array<std::string>(*a_from.u.m_array_string);

    } else {
      u = a_from.u;
    }
  }

Member Function Documentation

bool inlib::value::get_bool ( ) const [inline]

Definition at line 422 of file value.

{return u.m_bool;}
char inlib::value::get_char ( ) const [inline]

Definition at line 407 of file value.

{return u.m_char;}
double inlib::value::get_double ( ) const [inline]

Definition at line 417 of file value.

{return u.m_double;}
double* inlib::value::get_double_star ( ) const [inline]

Definition at line 419 of file value.

{return u.m_double_star;}
float inlib::value::get_float ( ) const [inline]

Definition at line 416 of file value.

{return u.m_float;}
float* inlib::value::get_float_star ( ) const [inline]

Definition at line 420 of file value.

{return u.m_float_star;}
int inlib::value::get_int ( ) const [inline]

Definition at line 409 of file value.

{return u.m_int;}
int64 inlib::value::get_int64 ( ) const [inline]

Definition at line 411 of file value.

{return u.m_int64;}
int* inlib::value::get_int_star ( ) const [inline]

Definition at line 421 of file value.

{return u.m_int_star;}
short inlib::value::get_short ( ) const [inline]

Definition at line 415 of file value.

{return u.m_short;}
std::string inlib::value::get_string ( ) const [inline]

Definition at line 423 of file value.

{return *u.m_string;}
unsigned char inlib::value::get_unsigned_char ( ) const [inline]

Definition at line 406 of file value.

{return u.m_unsigned_char;}
unsigned int inlib::value::get_unsigned_int ( ) const [inline]

Definition at line 408 of file value.

{return u.m_unsigned_int;}
uint64 inlib::value::get_unsigned_int64 ( ) const [inline]

Definition at line 412 of file value.

{return u.m_unsigned_int64;}
unsigned short inlib::value::get_unsigned_short ( ) const [inline]

Definition at line 414 of file value.

{return u.m_unsigned_short;}
void* inlib::value::get_void_star ( ) const [inline]

Definition at line 418 of file value.

{return u.m_void_star;}
std::string inlib::value::label ( ) const [inline]

Definition at line 354 of file value.

{return m_label?(*m_label):"";}
value& inlib::value::operator= ( const value a_from) [inline]

Definition at line 292 of file value.

                                        {
    delete m_label;
    m_label = 0;
    if(a_from.m_label) m_label = new std::string(*a_from.m_label);
    reset();

    m_type = a_from.m_type;

    if(a_from.m_type==STRING) {
      u.m_string = new std::string(*a_from.u.m_string);

    //} else if(a_from.m_type==ARRAY_UNSIGNED_CHAR) {
    //  u.m_array_unsigned_char =
    //    new array<unsigned char>(*a_from.u.m_array_unsigned_char);

    //} else if(a_from.m_type==ARRAY_CHAR) {
    //  u.m_array_char = new array<char>(*a_from.u.m_array_char);

    } else if(a_from.m_type==ARRAY_UNSIGNED_SHORT) {
      u.m_array_unsigned_short = 
        new array<unsigned short>(*a_from.u.m_array_unsigned_short);

    } else if(a_from.m_type==ARRAY_SHORT) {
      u.m_array_short = new array<short>(*a_from.u.m_array_short);

    } else if(a_from.m_type==ARRAY_UNSIGNED_INT) {
      u.m_array_unsigned_int = 
        new array<unsigned int>(*a_from.u.m_array_unsigned_int);

    } else if(a_from.m_type==ARRAY_INT) {
      u.m_array_int = new array<int>(*a_from.u.m_array_int);

    } else if(a_from.m_type==ARRAY_UNSIGNED_INT64) {
      u.m_array_unsigned_int64 = 
        new array<uint64>(*a_from.u.m_array_unsigned_int64);

    } else if(a_from.m_type==ARRAY_INT64) {
      u.m_array_int64 = new array<int64>(*a_from.u.m_array_int64);

    } else if(a_from.m_type==ARRAY_FLOAT) {
      u.m_array_float = new array<float>(*a_from.u.m_array_float);

    } else if(a_from.m_type==ARRAY_DOUBLE) {
      u.m_array_double = new array<double>(*a_from.u.m_array_double);

    } else if(a_from.m_type==ARRAY_BOOL) {
      u.m_array_bool = new array<bool>(*a_from.u.m_array_bool);

    } else if(a_from.m_type==ARRAY_STRING) {
      u.m_array_string = new array<std::string>(*a_from.u.m_array_string);
  
    } else {
      u = a_from.u;
    }

    return *this;
  }
void inlib::value::reset ( ) [inline, protected]

Definition at line 566 of file value.

               {
    if(m_type==STRING) {
      delete u.m_string;
      u.m_string = 0;
  
    //} else if(m_type==ARRAY_UNSIGNED_CHAR) {
    //  delete u.m_array_unsigned_char;u.m_array_unsigned_char = 0;

    //} else if(m_type==ARRAY_CHAR) {
    //  delete u.m_array_char;u.m_array_char = 0;

    } else if(m_type==ARRAY_UNSIGNED_SHORT) {
      delete u.m_array_unsigned_short;u.m_array_unsigned_short = 0;

    } else if(m_type==ARRAY_SHORT) {
      delete u.m_array_short;u.m_array_short = 0;

    } else if(m_type==ARRAY_UNSIGNED_INT) {
      delete u.m_array_unsigned_int;u.m_array_unsigned_int = 0;

    } else if(m_type==ARRAY_INT) {
      delete u.m_array_int;u.m_array_int = 0;

    } else if(m_type==ARRAY_UNSIGNED_INT64) {
      delete u.m_array_unsigned_int64;u.m_array_unsigned_int64 = 0;

    } else if(m_type==ARRAY_INT64) {
      delete u.m_array_int64;u.m_array_int64 = 0;

    } else if(m_type==ARRAY_FLOAT) {
      delete u.m_array_float;u.m_array_float = 0;

    } else if(m_type==ARRAY_DOUBLE) {
      delete u.m_array_double;u.m_array_double = 0;

    } else if(m_type==ARRAY_BOOL) {
      delete u.m_array_bool;u.m_array_bool = 0;

    } else if(m_type==ARRAY_STRING) {
      delete u.m_array_string;u.m_array_string = 0;

    } else {
      u.m_unsigned_int64 = 0;
    }
  }
bool inlib::value::s_type ( std::string &  a_s) const [inline]

Definition at line 426 of file value.

{return s_type(m_type,a_s);}
static bool inlib::value::s_type ( inlib::value::e_type  a_type,
std::string &  a_s 
) [inline, static]

Definition at line 427 of file value.

                                                            {
    switch(a_type) {
    case NONE:a_s = "NONE";return true;
    case INT:a_s = "INT";return true;
    case INT64:a_s = "INT64";return true;
    case DOUBLE:a_s = "DOUBLE";return true;
    case STRING:a_s = "STRING";return true;
    case VOID_STAR:a_s = "VOID_STAR";return true;
    case DOUBLE_STAR:a_s = "DOUBLE_STAR";return true;
    case FLOAT_STAR:a_s = "FLOAT_STAR";return true;
    case INT_STAR:a_s = "INT_STAR";return true;
    case BOOL:a_s = "BOOL";return true;
    case SHORT:a_s = "SHORT";return true;
    case FLOAT:a_s = "FLOAT";return true;
    //case CHAR:a_s = "CHAR";return true;
    //case UNSIGNED_CHAR:a_s = "UNSIGNED_CHAR";return true;
    case UNSIGNED_SHORT:a_s = "UNSIGNED_SHORT";return true;
    case UNSIGNED_INT:a_s = "UNSIGNED_INT";return true;
    case UNSIGNED_INT64:a_s = "UNSIGNED_INT64";return true;
    //case ARRAY_UNSIGNED_CHAR:a_s = "ARRAY_UNSIGNED_CHAR";return true;
    //case ARRAY_CHAR:a_s = "ARRAY_CHAR";return true;
    case ARRAY_UNSIGNED_SHORT:a_s = "ARRAY_UNSIGNED_SHORT";return true;
    case ARRAY_SHORT:a_s = "ARRAY_SHORT";return true;
    case ARRAY_UNSIGNED_INT:a_s = "ARRAY_UNSIGNED_INT";return true;
    case ARRAY_INT:a_s = "ARRAY_INT";return true;
    case ARRAY_UNSIGNED_INT64:a_s = "ARRAY_UNSIGNED_INT64";return true;
    case ARRAY_INT64:a_s = "ARRAY_INT64";return true;
    case ARRAY_FLOAT:a_s = "ARRAY_FLOAT";return true;
    case ARRAY_DOUBLE:a_s = "ARRAY_DOUBLE";return true;
    case ARRAY_BOOL:a_s = "ARRAY_BOOL";return true;
    case ARRAY_STRING:a_s = "ARRAY_STRING";return true;
    default:a_s.clear();return false;
    }

  }
void inlib::value::set ( void *  a_value) [inline]

Definition at line 400 of file value.

                          {
    reset();
    m_type = VOID_STAR;
    u.m_void_star = a_value;
  }
void inlib::value::set_label ( const std::string &  a_s) [inline]

Definition at line 350 of file value.

                                       {
    delete m_label;
    m_label = new std::string(a_s);
  }
void inlib::value::set_type ( e_type  a_type) [inline]

Definition at line 357 of file value.

                               {
    reset();
    m_type = a_type;
    switch(a_type) {
    case NONE:      u.m_unsigned_int64 = 0;break;
    //case UNSIGNED_CHAR:    u.m_unsigned_char = 0;break;
    //case CHAR:      u.m_char = 0;break;
    case UNSIGNED_SHORT:   u.m_unsigned_short = 0;break;
    case SHORT:     u.m_short = 0;break;
    case UNSIGNED_INT:     u.m_unsigned_int = 0;break;
    case INT:       u.m_int = 0;break;
    case UNSIGNED_INT64:   u.m_unsigned_int64 =0;break;
    case INT64:     u.m_int64 = 0;break;
    case FLOAT:     u.m_float = 0;break;
    case DOUBLE:    u.m_double = 0;break;
    case BOOL:      u.m_bool = false;break;
    case VOID_STAR:        u.m_void_star = 0;break;
    case DOUBLE_STAR:      u.m_double_star = 0;break;
    case FLOAT_STAR:       u.m_float_star = 0;break;
    case INT_STAR:         u.m_int_star = 0;break;
    case STRING:       u.m_string = new std::string("");break;
    //case ARRAY_UNSIGNED_CHAR:
    //  u.m_array_unsigned_char = new inlib::array<unsigned char>();break;
    //case ARRAY_CHAR:u.m_array_char = new inlib::array<char>();break;
  
    case ARRAY_UNSIGNED_SHORT:
      u.m_array_unsigned_short = new inlib::array<unsigned short>();break;
    case ARRAY_SHORT:u.m_array_short = new inlib::array<short>();break;
  
    case ARRAY_UNSIGNED_INT:
      u.m_array_unsigned_int = new inlib::array<unsigned int>();break;
    case ARRAY_INT:u.m_array_int = new inlib::array<int>();break;
    case ARRAY_UNSIGNED_INT64:
      u.m_array_unsigned_int64 = new inlib::array<uint64>();break;
    case ARRAY_INT64:u.m_array_int64 = new inlib::array<int64>();break;
  
    case ARRAY_FLOAT:u.m_array_float = new inlib::array<float>();break;
    case ARRAY_DOUBLE:u.m_array_double = new inlib::array<double>();break;
    case ARRAY_BOOL:u.m_array_bool = new inlib::array<bool>();break;
    case ARRAY_STRING:u.m_array_string = new inlib::array<std::string>();break;
    }
  }
bool inlib::value::tos ( std::string &  a_s) const [inline]

Definition at line 462 of file value.

{return tos(*this,a_s);}
static bool inlib::value::tos ( const value a_v,
std::string &  a_s 
) [inline, static]

Definition at line 464 of file value.

                                                  {
    switch(a_v.m_type) {
    case NONE:
      inlib::sprintf(a_s,5,"(nil)");
      return true;
    case INT:
      inlib::sprintf(a_s,16,"%d",a_v.u.m_int);
      return true;
    case DOUBLE:
      inlib::sprintf(a_s,16,"%g",a_v.u.m_double);
      return true;
    case VOID_STAR:
      inlib::sprintf(a_s,16,"0x%lx",(unsigned long)a_v.u.m_void_star);
      return true;
    case UNSIGNED_SHORT:
      inlib::sprintf(a_s,16,"%u",a_v.u.m_unsigned_short);
      return true;
    case UNSIGNED_INT:
      inlib::sprintf(a_s,16,"%u",a_v.u.m_unsigned_int);
      return true;
    case BOOL:
      inlib::sprintf(a_s,5,"%s",a_v.u.m_bool?"true":"false");
      return true;
    case SHORT:
      inlib::sprintf(a_s,16,"%d",a_v.u.m_short);
      return true;
    case INT64:
      inlib::sprintf(a_s,16,inlib::int64_format(),a_v.u.m_int64);
      return true;
    case UNSIGNED_INT64:
      inlib::sprintf(a_s,16,inlib::int64_format(),a_v.u.m_unsigned_int64);
      return true;
    case FLOAT:
      inlib::sprintf(a_s,16,"%g",a_v.u.m_float);
      return true;
    //case UNSIGNED_CHAR:
    //  inlib::sprintf(a_s,16,"%c",a_v.u.m_unsigned_char);
    //  return true;
    //case CHAR:
    //  inlib::sprintf(a_s,16,"%c",a_v.u.m_char);
    //  return true;
    case DOUBLE_STAR:
      inlib::sprintf(a_s,16,"0x%lx",(unsigned long)a_v.u.m_double_star);
      return true;
    case FLOAT_STAR:
      inlib::sprintf(a_s,16,"0x%lx",(unsigned long)a_v.u.m_float_star);
      return true;
    case INT_STAR:
      inlib::sprintf(a_s,16,"0x%lx",(unsigned long)a_v.u.m_int_star);
      return true;
    case STRING:
      a_s = *a_v.u.m_string;
      return true;

    //case ARRAY_UNSIGNED_CHAR:
    //  a_s = inlib::tos<unsigned char>(a_v.u.m_array_unsigned_char->vector());
    //  return true;
    //case ARRAY_CHAR:
    //  a_s = inlib::tos<char>(a_v.u.m_array_char->vector());
    //  return true;
  
    case ARRAY_UNSIGNED_SHORT:
      a_s = inlib::tos<unsigned short>(a_v.u.m_array_unsigned_short->vector());
      return true;
    case ARRAY_SHORT:
      a_s = inlib::tos<short>(a_v.u.m_array_short->vector());
      return true;
  
    case ARRAY_UNSIGNED_INT:
      a_s = inlib::tos<unsigned int>(a_v.u.m_array_unsigned_int->vector());
      return true;
    case ARRAY_INT:
      a_s = inlib::tos<int>(a_v.u.m_array_int->vector());
      return true;
  
    case ARRAY_UNSIGNED_INT64:
      a_s = inlib::tos<uint64>(a_v.u.m_array_unsigned_int64->vector());
      return true;
    case ARRAY_INT64:
      a_s = inlib::tos<int64>(a_v.u.m_array_int64->vector());
      return true;
  
    case ARRAY_FLOAT:
      a_s = inlib::tos<float>(a_v.u.m_array_float->vector());
      return true;
    case ARRAY_DOUBLE:
      a_s = inlib::tos<double>(a_v.u.m_array_double->vector());
      return true;
    case ARRAY_BOOL:
      a_s = inlib::tos<bool>(a_v.u.m_array_bool->vector());
      return true;
    case ARRAY_STRING:
      a_s = inlib::tos<std::string>(a_v.u.m_array_string->vector());
      return true;
    default:
      a_s.clear();  
      return false;
    }
  }
e_type inlib::value::type ( ) const [inline]

Definition at line 356 of file value.

{return m_type;}

Member Data Documentation

Definition at line 644 of file value.

Definition at line 635 of file value.

Definition at line 643 of file value.

Definition at line 642 of file value.

Definition at line 641 of file value.

Definition at line 639 of file value.

Definition at line 637 of file value.

Definition at line 645 of file value.

Definition at line 634 of file value.

Definition at line 640 of file value.

Definition at line 638 of file value.

Definition at line 636 of file value.

Definition at line 617 of file value.

Definition at line 618 of file value.

Definition at line 623 of file value.

Definition at line 629 of file value.

Definition at line 622 of file value.

Definition at line 630 of file value.

Definition at line 619 of file value.

Definition at line 621 of file value.

Definition at line 631 of file value.

std::string* inlib::value::m_label [protected]

Definition at line 612 of file value.

Definition at line 620 of file value.

std::string* inlib::value::m_string

Definition at line 632 of file value.

Definition at line 615 of file value.

Definition at line 624 of file value.

Definition at line 626 of file value.

Definition at line 627 of file value.

Definition at line 625 of file value.

Definition at line 628 of file value.

union { ... } inlib::value::u [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines