Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/value is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_value
0005 #define tools_value
0006 
0007 #include "array"
0008 #include "typedefs"
0009 #include "num2s"
0010 #include "b2s"
0011 
0012 #ifdef TOOLS_MEM
0013 #include "mem"
0014 #endif
0015 
0016 namespace tools {
0017 
0018 class value {
0019   static const std::string& s_class() {
0020     static const std::string s_v("tools::value");
0021     return s_v;
0022   }
0023 public:
0024   enum e_type {
0025     NONE = 0,
0026     // integers :
0027     //UNSIGNED_CHAR = 10,
0028     //CHAR = 11,
0029     UNSIGNED_SHORT = 12,
0030     SHORT = 13,
0031     UNSIGNED_INT = 14,
0032     INT = 15,
0033     UNSIGNED_INT64 = 16,
0034     INT64 = 17,
0035     // reals :
0036     FLOAT = 30,
0037     DOUBLE = 31,
0038     // else :
0039     BOOL = 50,
0040     STRING = 51,
0041     // pointers :
0042     VOID_STAR = 100,
0043     DOUBLE_STAR = 101,
0044     FLOAT_STAR = 102,
0045     INT_STAR = 103,
0046 
0047     // multidimensional vectors (1000+base type) :
0048     //ARRAY_UNSIGNED_CHAR = 1010,
0049     //ARRAY_CHAR = 1011,
0050     ARRAY_UNSIGNED_SHORT = 1012,
0051     ARRAY_SHORT = 1013,
0052     ARRAY_UNSIGNED_INT = 1014,
0053     ARRAY_INT = 1015,
0054     ARRAY_UNSIGNED_INT64 = 1016,
0055     ARRAY_INT64 = 1017,
0056     ARRAY_FLOAT = 1030,
0057     ARRAY_DOUBLE = 1031,
0058     ARRAY_BOOL = 1050,
0059     ARRAY_STRING = 1051
0060   };
0061 
0062 /*
0063   static e_type type(unsigned short) {return UNSIGNED_SHORT;}
0064   static e_type type(short)          {return SHORT;}
0065   static e_type type(unsigned int)   {return UNSIGNED_INT;}
0066   static e_type type(int)            {return INT;}
0067   static e_type type(uint64)         {return UNSIGNED_INT64;}
0068   static e_type type(int64)          {return INT64;}
0069   static e_type type(float)          {return FLOAT;}
0070   static e_type type(double)         {return DOUBLE;}
0071   static e_type type(bool)           {return BOOL;}
0072   static e_type type(void*)          {return VOID_STAR;}
0073   static e_type type(double*)        {return DOUBLE_STAR;}
0074   static e_type type(float*)         {return FLOAT_STAR;}
0075   static e_type type(int*)           {return INT_STAR;}
0076   //static e_type type(const std::string&) {return STRING;}
0077 */
0078 public:
0079   value():m_label(0),m_itag(0){
0080 #ifdef TOOLS_MEM
0081     mem::increment(s_class().c_str());
0082 #endif
0083     m_type = NONE;
0084     u.m_unsigned_int64 = 0;
0085   }
0086 
0087   value(bool a_value):m_label(0),m_itag(0) {
0088 #ifdef TOOLS_MEM
0089     mem::increment(s_class().c_str());
0090 #endif
0091     m_type = BOOL;
0092     u.m_bool = a_value;
0093   }
0094 //  value(char a_value):m_label(0),m_itag(0) {
0095 //#ifdef TOOLS_MEM
0096 //    mem::increment(s_class().c_str());
0097 //#endif
0098 //    m_type = CHAR;
0099 //    u.m_char = a_value;
0100 //  }
0101   value(short a_value):m_label(0),m_itag(0) {
0102 #ifdef TOOLS_MEM
0103     mem::increment(s_class().c_str());
0104 #endif
0105     m_type = SHORT;
0106     u.m_short = a_value;
0107   }
0108   value(int a_value):m_label(0),m_itag(0) {
0109 #ifdef TOOLS_MEM
0110     mem::increment(s_class().c_str());
0111 #endif
0112     m_type = INT;
0113     u.m_int = a_value;
0114   }
0115   value(int64 a_value):m_label(0),m_itag(0) {
0116 #ifdef TOOLS_MEM
0117     mem::increment(s_class().c_str());
0118 #endif
0119     m_type = INT64;
0120     u.m_int64 = a_value;
0121   }
0122   value(uint64 a_value):m_label(0),m_itag(0) {
0123 #ifdef TOOLS_MEM
0124     mem::increment(s_class().c_str());
0125 #endif
0126     m_type = UNSIGNED_INT64;
0127     u.m_unsigned_int64 = a_value;
0128   }
0129   value(float a_value):m_label(0),m_itag(0) {
0130 #ifdef TOOLS_MEM
0131     mem::increment(s_class().c_str());
0132 #endif
0133     m_type = FLOAT;
0134     u.m_float = a_value;
0135   }
0136   value(double a_value):m_label(0),m_itag(0) {
0137 #ifdef TOOLS_MEM
0138     mem::increment(s_class().c_str());
0139 #endif
0140     m_type = DOUBLE;
0141     u.m_double = a_value;
0142   }
0143 
0144 //  value(unsigned char a_value):m_label(0),m_itag(0) {
0145 //#ifdef TOOLS_MEM
0146 //    mem::increment(s_class().c_str());
0147 //#endif
0148 //    m_type = UNSIGNED_CHAR;
0149 //    u.m_unsigned_char = a_value;
0150 //  }
0151   value(unsigned short a_value):m_label(0),m_itag(0) {
0152 #ifdef TOOLS_MEM
0153     mem::increment(s_class().c_str());
0154 #endif
0155     m_type = UNSIGNED_SHORT;
0156     u.m_unsigned_short = a_value;
0157   }
0158   value(unsigned int a_value):m_label(0),m_itag(0) {
0159 #ifdef TOOLS_MEM
0160     mem::increment(s_class().c_str());
0161 #endif
0162     m_type = UNSIGNED_INT;
0163     u.m_unsigned_int = a_value;
0164   }
0165   value(void* a_value):m_label(0),m_itag(0) {
0166 #ifdef TOOLS_MEM
0167     mem::increment(s_class().c_str());
0168 #endif
0169     m_type = VOID_STAR;
0170     u.m_void_star = a_value;
0171   }
0172   value(double* a_value):m_label(0),m_itag(0) {
0173 #ifdef TOOLS_MEM
0174     mem::increment(s_class().c_str());
0175 #endif
0176     m_type = DOUBLE_STAR;
0177     u.m_double_star = a_value;
0178   }
0179   value(float* a_value):m_label(0),m_itag(0) {
0180 #ifdef TOOLS_MEM
0181     mem::increment(s_class().c_str());
0182 #endif
0183     m_type = FLOAT_STAR;
0184     u.m_float_star = a_value;
0185   }
0186   value(int* a_value):m_label(0),m_itag(0) {
0187 #ifdef TOOLS_MEM
0188     mem::increment(s_class().c_str());
0189 #endif
0190     m_type = INT_STAR;
0191     u.m_int_star = a_value;
0192   }
0193 
0194   value(const char* a_value):m_label(0),m_itag(0) {
0195 #ifdef TOOLS_MEM
0196     mem::increment(s_class().c_str());
0197 #endif
0198     m_type = STRING;
0199     u.m_string = new std::string(a_value?a_value:"");
0200   }
0201   value(const std::string& a_value):m_label(0),m_itag(0) {
0202 #ifdef TOOLS_MEM
0203     mem::increment(s_class().c_str());
0204 #endif
0205     m_type = STRING;
0206     u.m_string = new std::string(a_value);
0207   }
0208 
0209 #ifdef TOOLS_MEM
0210 #define TOOLS_VALUE_CSTOR(a_what,a_m_what,a_type) \
0211   value(const std::vector<a_what>& a_v):m_label(0),m_itag(0){\
0212     mem::increment(s_class().c_str());\
0213     m_type = a_type;\
0214     std::vector<unsigned int> is(1);\
0215     is[0] = (unsigned int)a_v.size();\
0216     u.a_m_what = new array<a_what>(is);\
0217     u.a_m_what->fill(a_v);\
0218   }
0219 #else
0220 #define TOOLS_VALUE_CSTOR(a_what,a_m_what,a_type) \
0221   value(const std::vector<a_what>& a_v):m_label(0),m_itag(0){\
0222     m_type = a_type;\
0223     std::vector<unsigned int> is(1);\
0224     is[0] = (unsigned int)a_v.size();\
0225     u.a_m_what = new array<a_what>(is);\
0226     u.a_m_what->fill(a_v);\
0227   }
0228 #endif
0229 
0230 //TOOLS_VALUE_CSTOR(unsigned char,m_array_unsigned_char,ARRAY_UNSIGNED_CHAR)
0231 //TOOLS_VALUE_CSTOR(char,m_array_char,ARRAY_CHAR)
0232   TOOLS_VALUE_CSTOR(unsigned short,m_array_unsigned_short,ARRAY_UNSIGNED_SHORT)
0233   TOOLS_VALUE_CSTOR(short,m_array_short,ARRAY_SHORT)
0234   TOOLS_VALUE_CSTOR(unsigned int,m_array_unsigned_int,ARRAY_UNSIGNED_INT)
0235   TOOLS_VALUE_CSTOR(int,m_array_int,ARRAY_INT)
0236   TOOLS_VALUE_CSTOR(uint64,m_array_unsigned_int64,ARRAY_UNSIGNED_INT64)
0237   TOOLS_VALUE_CSTOR(int64,m_array_int64,ARRAY_INT64)
0238   TOOLS_VALUE_CSTOR(float,m_array_float,ARRAY_FLOAT)
0239   TOOLS_VALUE_CSTOR(double,m_array_double,ARRAY_DOUBLE)
0240   TOOLS_VALUE_CSTOR(bool,m_array_bool,ARRAY_BOOL)
0241   TOOLS_VALUE_CSTOR(std::string,m_array_string,ARRAY_STRING)
0242 
0243 #undef TOOLS_VALUE_CSTOR
0244 
0245 #ifdef TOOLS_MEM
0246 #define TOOLS_VALUE_CSTORA(a_what,a_m_what,a_type) \
0247   value(const array<a_what>& a_a):m_label(0),m_itag(0){\
0248     mem::increment(s_class().c_str());\
0249     m_type = a_type;\
0250     u.a_m_what = new array<a_what>(a_a);\
0251   }
0252 #else
0253 #define TOOLS_VALUE_CSTORA(a_what,a_m_what,a_type) \
0254   value(const array<a_what>& a_a):m_label(0),m_itag(0){\
0255     m_type = a_type;\
0256     u.a_m_what = new array<a_what>(a_a);\
0257   }
0258 #endif
0259 
0260 //TOOLS_VALUE_CSTORA(unsigned char,m_array_unsigned_char,ARRAY_UNSIGNED_CHAR)
0261 //TOOLS_VALUE_CSTORA(char,m_array_char,ARRAY_CHAR)
0262   TOOLS_VALUE_CSTORA(unsigned short,m_array_unsigned_short,ARRAY_UNSIGNED_SHORT)
0263   TOOLS_VALUE_CSTORA(short,m_array_short,ARRAY_SHORT)
0264   TOOLS_VALUE_CSTORA(unsigned int,m_array_unsigned_int,ARRAY_UNSIGNED_INT)
0265   TOOLS_VALUE_CSTORA(int,m_array_int,ARRAY_INT)
0266   TOOLS_VALUE_CSTORA(uint64,m_array_unsigned_int64,ARRAY_UNSIGNED_INT64)
0267   TOOLS_VALUE_CSTORA(int64,m_array_int64,ARRAY_INT64)
0268   TOOLS_VALUE_CSTORA(float,m_array_float,ARRAY_FLOAT)
0269   TOOLS_VALUE_CSTORA(double,m_array_double,ARRAY_DOUBLE)
0270   TOOLS_VALUE_CSTORA(bool,m_array_bool,ARRAY_BOOL)
0271   TOOLS_VALUE_CSTORA(std::string,m_array_string,ARRAY_STRING)
0272 
0273 #undef TOOLS_VALUE_CSTORA
0274 
0275   virtual ~value() {
0276     delete m_label;
0277     reset();
0278 #ifdef TOOLS_MEM
0279     mem::decrement(s_class().c_str());
0280 #endif
0281   }
0282 public:
0283   value(const value& a_from):m_label(0),m_itag(a_from.m_itag){
0284 #ifdef TOOLS_MEM
0285     mem::increment(s_class().c_str());
0286 #endif
0287 
0288     if(a_from.m_label) m_label = new std::string(*a_from.m_label);
0289     m_type = a_from.m_type;
0290 
0291     if(a_from.m_type==STRING) {
0292       u.m_string = new std::string(*a_from.u.m_string);
0293 
0294     //} else if(a_from.m_type==ARRAY_UNSIGNED_CHAR) {
0295     //  u.m_array_unsigned_char =
0296     //    new array<unsigned char>(*a_from.u.m_array_unsigned_char);
0297 
0298     //} else if(a_from.m_type==ARRAY_CHAR) {
0299     //  u.m_array_char = new array<char>(*a_from.u.m_array_char);
0300 
0301     } else if(a_from.m_type==ARRAY_UNSIGNED_SHORT) {
0302       u.m_array_unsigned_short =
0303         new array<unsigned short>(*a_from.u.m_array_unsigned_short);
0304 
0305     } else if(a_from.m_type==ARRAY_SHORT) {
0306       u.m_array_short = new array<short>(*a_from.u.m_array_short);
0307 
0308     } else if(a_from.m_type==ARRAY_UNSIGNED_INT) {
0309       u.m_array_unsigned_int = new array<unsigned int>(*a_from.u.m_array_unsigned_int);
0310 
0311     } else if(a_from.m_type==ARRAY_INT) {
0312       u.m_array_int = new array<int>(*a_from.u.m_array_int);
0313 
0314     } else if(a_from.m_type==ARRAY_UNSIGNED_INT64) {
0315       u.m_array_unsigned_int64 = new array<uint64>(*a_from.u.m_array_unsigned_int64);
0316 
0317     } else if(a_from.m_type==ARRAY_INT64) {
0318       u.m_array_int64 = new array<int64>(*a_from.u.m_array_int64);
0319 
0320     } else if(a_from.m_type==ARRAY_FLOAT) {
0321       u.m_array_float = new array<float>(*a_from.u.m_array_float);
0322 
0323     } else if(a_from.m_type==ARRAY_DOUBLE) {
0324       u.m_array_double = new array<double>(*a_from.u.m_array_double);
0325 
0326     } else if(a_from.m_type==ARRAY_BOOL) {
0327       u.m_array_bool = new array<bool>(*a_from.u.m_array_bool);
0328 
0329     } else if(a_from.m_type==ARRAY_STRING) {
0330       u.m_array_string = new array<std::string>(*a_from.u.m_array_string);
0331 
0332     } else {
0333       u = a_from.u;
0334     }
0335   }
0336 
0337   value& operator=(const value& a_from) {
0338     if(&a_from==this) return *this;
0339 
0340     delete m_label;m_label = 0;
0341     if(a_from.m_label) m_label = new std::string(*a_from.m_label);
0342 
0343     m_itag = a_from.m_itag;
0344 
0345     reset();
0346 
0347     m_type = a_from.m_type;
0348 
0349     if(a_from.m_type==STRING) {
0350       u.m_string = new std::string(*a_from.u.m_string);
0351 
0352     //} else if(a_from.m_type==ARRAY_UNSIGNED_CHAR) {
0353     //  u.m_array_unsigned_char =
0354     //    new array<unsigned char>(*a_from.u.m_array_unsigned_char);
0355 
0356     //} else if(a_from.m_type==ARRAY_CHAR) {
0357     //  u.m_array_char = new array<char>(*a_from.u.m_array_char);
0358 
0359     } else if(a_from.m_type==ARRAY_UNSIGNED_SHORT) {
0360       u.m_array_unsigned_short = new array<unsigned short>(*a_from.u.m_array_unsigned_short);
0361 
0362     } else if(a_from.m_type==ARRAY_SHORT) {
0363       u.m_array_short = new array<short>(*a_from.u.m_array_short);
0364 
0365     } else if(a_from.m_type==ARRAY_UNSIGNED_INT) {
0366       u.m_array_unsigned_int = new array<unsigned int>(*a_from.u.m_array_unsigned_int);
0367 
0368     } else if(a_from.m_type==ARRAY_INT) {
0369       u.m_array_int = new array<int>(*a_from.u.m_array_int);
0370 
0371     } else if(a_from.m_type==ARRAY_UNSIGNED_INT64) {
0372       u.m_array_unsigned_int64 = new array<uint64>(*a_from.u.m_array_unsigned_int64);
0373 
0374     } else if(a_from.m_type==ARRAY_INT64) {
0375       u.m_array_int64 = new array<int64>(*a_from.u.m_array_int64);
0376 
0377     } else if(a_from.m_type==ARRAY_FLOAT) {
0378       u.m_array_float = new array<float>(*a_from.u.m_array_float);
0379 
0380     } else if(a_from.m_type==ARRAY_DOUBLE) {
0381       u.m_array_double = new array<double>(*a_from.u.m_array_double);
0382 
0383     } else if(a_from.m_type==ARRAY_BOOL) {
0384       u.m_array_bool = new array<bool>(*a_from.u.m_array_bool);
0385 
0386     } else if(a_from.m_type==ARRAY_STRING) {
0387       u.m_array_string = new array<std::string>(*a_from.u.m_array_string);
0388 
0389     } else {
0390       u = a_from.u;
0391     }
0392 
0393     return *this;
0394   }
0395 /* for tests/symbolic.cpp.
0396 public:
0397   value operator*(const value& a_from) const {
0398     value tmp(*this);
0399     std::string serr;
0400     multiply(tmp,a_from,serr);
0401     return tmp;
0402   }
0403   value operator+(const value& a_from) const {
0404     value tmp(*this);
0405     std::string serr;
0406     add(tmp,a_from,serr);
0407     return tmp;
0408   }
0409   value operator-(const value& a_from) const {
0410     value tmp(*this);
0411     std::string serr;
0412     subtract(tmp,a_from,serr);
0413     return tmp;
0414   }
0415   value operator+=(const value& a_from) {
0416     value _s = operator+(a_from);
0417     *this = _s;
0418     return _s;
0419   }
0420   value operator-=(const value& a_from) {
0421     value _s = operator-(a_from);
0422     *this = _s;
0423     return _s;
0424   }
0425 */
0426 private:
0427   static const std::string& s_empty() {
0428     static const std::string s_v("");
0429     return s_v;
0430   }
0431 public:
0432   void set_itag(unsigned int a_itag) {m_itag = a_itag;} //gopaw
0433   unsigned int itag() const {return m_itag;} //gopaw
0434   void set_label(const std::string& a_s) {
0435     delete m_label;
0436     m_label = new std::string(a_s);
0437   }
0438   const std::string& label() const {return m_label?(*m_label):s_empty();}
0439 
0440   e_type type() const {return m_type;}
0441   void set_type(e_type a_type) {
0442     reset();
0443     m_type = a_type;
0444     switch(a_type) {
0445     case NONE:      u.m_unsigned_int64 = 0;break;
0446     //case UNSIGNED_CHAR:    u.m_unsigned_char = 0;break;
0447     //case CHAR:      u.m_char = 0;break;
0448     case UNSIGNED_SHORT:   u.m_unsigned_short = 0;break;
0449     case SHORT:     u.m_short = 0;break;
0450     case UNSIGNED_INT:     u.m_unsigned_int = 0;break;
0451     case INT:       u.m_int = 0;break;
0452     case UNSIGNED_INT64:   u.m_unsigned_int64 =0;break;
0453     case INT64:     u.m_int64 = 0;break;
0454     case FLOAT:     u.m_float = 0;break;
0455     case DOUBLE:    u.m_double = 0;break;
0456     case BOOL:      u.m_bool = false;break;
0457     case VOID_STAR:        u.m_void_star = 0;break;
0458     case DOUBLE_STAR:      u.m_double_star = 0;break;
0459     case FLOAT_STAR:       u.m_float_star = 0;break;
0460     case INT_STAR:         u.m_int_star = 0;break;
0461     case STRING:       u.m_string = new std::string("");break;
0462     //case ARRAY_UNSIGNED_CHAR:
0463     //  u.m_array_unsigned_char = new array<unsigned char>();break;
0464     //case ARRAY_CHAR:u.m_array_char = new array<char>();break;
0465 
0466     case ARRAY_UNSIGNED_SHORT:
0467       u.m_array_unsigned_short = new array<unsigned short>();break;
0468     case ARRAY_SHORT:u.m_array_short = new array<short>();break;
0469 
0470     case ARRAY_UNSIGNED_INT:
0471       u.m_array_unsigned_int = new array<unsigned int>();break;
0472     case ARRAY_INT:u.m_array_int = new array<int>();break;
0473     case ARRAY_UNSIGNED_INT64:
0474       u.m_array_unsigned_int64 = new array<uint64>();break;
0475     case ARRAY_INT64:u.m_array_int64 = new array<int64>();break;
0476 
0477     case ARRAY_FLOAT:u.m_array_float = new array<float>();break;
0478     case ARRAY_DOUBLE:u.m_array_double = new array<double>();break;
0479     case ARRAY_BOOL:u.m_array_bool = new array<bool>();break;
0480     case ARRAY_STRING:u.m_array_string = new array<std::string>();break;
0481     }
0482   }
0483 
0484   void set_none() {
0485     reset();
0486     m_type = NONE;
0487     u.m_unsigned_int64 = 0;
0488   }
0489   //void set(char a_value) {
0490   //  reset();
0491   //  m_type = CHAR;
0492   //  u.m_char = a_value;
0493   //}
0494   //void set(unsigned char a_value) {
0495   //  reset();
0496   //  m_type = UNSIGNED_CHAR;
0497   //  u.m_unsigned_char = a_value;
0498   //}
0499   void set(short a_value) {
0500     reset();
0501     m_type = SHORT;
0502     u.m_short = a_value;
0503   }
0504   void set(unsigned short a_value) {
0505     reset();
0506     m_type = UNSIGNED_SHORT;
0507     u.m_unsigned_short  = a_value;
0508   }
0509   void set(int a_value) {
0510     reset();
0511     m_type = INT;
0512     u.m_int = a_value;
0513   }
0514   void set(unsigned int a_value) {
0515     reset();
0516     m_type = UNSIGNED_INT;
0517     u.m_unsigned_int  = a_value;
0518   }
0519   void set(int64 a_value) {
0520     reset();
0521     m_type = INT64;
0522     u.m_int64 = a_value;
0523   }
0524   void set(uint64 a_value) {
0525     reset();
0526     m_type = UNSIGNED_INT64;
0527     u.m_unsigned_int64 = a_value;
0528   }
0529   void set(float a_value) {
0530     reset();
0531     m_type = FLOAT;
0532     u.m_float = a_value;
0533   }
0534   void set(double a_value) {
0535     reset();
0536     m_type = DOUBLE;
0537     u.m_double = a_value;
0538   }
0539   void set(bool a_value) {
0540     reset();
0541     m_type = BOOL;
0542     u.m_bool = a_value;
0543   }
0544 
0545   void set(const std::string& a_value) {
0546     reset();
0547     m_type = STRING;
0548     u.m_string = new std::string(a_value);
0549   }
0550   void set(const char* a_value) {
0551     // To avoid the bool, const std::string& and passing "text" problem.
0552     reset();
0553     m_type = STRING;
0554     u.m_string = new std::string(a_value);
0555   }
0556 
0557   void set(void* a_value) {
0558     reset();
0559     m_type = VOID_STAR;
0560     u.m_void_star = a_value;
0561   }
0562 
0563   void set(double* a_value) {
0564     reset();
0565     m_type = DOUBLE_STAR;
0566     u.m_double_star = a_value;
0567   }
0568   void set(float* a_value) {
0569     reset();
0570     m_type = FLOAT_STAR;
0571     u.m_float_star = a_value;
0572   }
0573   void set(int* a_value) {
0574     reset();
0575     m_type = INT_STAR;
0576     u.m_int_star = a_value;
0577   }
0578 
0579   //unsigned char get_unsigned_char() const {return u.m_unsigned_char;}
0580   //char get_char() const {return u.m_char;}
0581   unsigned int get_unsigned_int() const {return u.m_unsigned_int;}
0582   int get_int() const {return u.m_int;}
0583 
0584   int64 get_int64() const {return u.m_int64;}
0585   uint64 get_unsigned_int64() const {return u.m_unsigned_int64;}
0586 
0587   unsigned short get_unsigned_short() const{return u.m_unsigned_short;}
0588   short get_short() const {return u.m_short;}
0589   float get_float() const {return u.m_float;}
0590   double get_double() const {return u.m_double;}
0591   void* get_void_star() const {return u.m_void_star;}
0592   double* get_double_star() const {return u.m_double_star;}
0593   float* get_float_star() const {return u.m_float_star;}
0594   int* get_int_star() const {return u.m_int_star;}
0595   bool get_bool() const {return u.m_bool;}
0596 
0597   const std::string& get_string() const {return *u.m_string;}
0598 
0599 #define TOOLS_VALUE_SET(a_what,a_m_what,a_type) \
0600   void set(const std::vector<unsigned int>& a_orders,const std::vector<a_what>& a_v){\
0601     reset();\
0602     m_type = a_type;\
0603     u.a_m_what = new array<a_what>(a_orders);\
0604     u.a_m_what->fill(a_v);\
0605   }
0606 
0607 //TOOLS_VALUE_SET(unsigned char,m_array_unsigned_char,ARRAY_UNSIGNED_CHAR)
0608 //TOOLS_VALUE_SET(char,m_array_char,ARRAY_CHAR)
0609   TOOLS_VALUE_SET(unsigned short,m_array_unsigned_short,ARRAY_UNSIGNED_SHORT)
0610   TOOLS_VALUE_SET(short,m_array_short,ARRAY_SHORT)
0611   TOOLS_VALUE_SET(unsigned int,m_array_unsigned_int,ARRAY_UNSIGNED_INT)
0612   TOOLS_VALUE_SET(int,m_array_int,ARRAY_INT)
0613   TOOLS_VALUE_SET(uint64,m_array_unsigned_int64,ARRAY_UNSIGNED_INT64)
0614   TOOLS_VALUE_SET(int64,m_array_int64,ARRAY_INT64)
0615   TOOLS_VALUE_SET(float,m_array_float,ARRAY_FLOAT)
0616   TOOLS_VALUE_SET(double,m_array_double,ARRAY_DOUBLE)
0617   TOOLS_VALUE_SET(bool,m_array_bool,ARRAY_BOOL)
0618   TOOLS_VALUE_SET(std::string,m_array_string,ARRAY_STRING)
0619 
0620 #undef TOOLS_VALUE_SET
0621 
0622 #define TOOLS_VALUE_SET2(a_what,a_m_what,a_type) \
0623   void set(const std::vector<a_what>& a_v){\
0624     reset();\
0625     m_type = a_type;\
0626     std::vector<unsigned int> is(1);\
0627     is[0] = (unsigned int)a_v.size();\
0628     u.a_m_what = new array<a_what>(is);\
0629     u.a_m_what->fill(a_v);\
0630   }
0631 
0632 //TOOLS_VALUE_SET2(unsigned char,m_array_unsigned_char,ARRAY_UNSIGNED_CHAR)
0633 //TOOLS_VALUE_SET2(char,m_array_char,ARRAY_CHAR)
0634   TOOLS_VALUE_SET2(unsigned short,m_array_unsigned_short,ARRAY_UNSIGNED_SHORT)
0635   TOOLS_VALUE_SET2(short,m_array_short,ARRAY_SHORT)
0636   TOOLS_VALUE_SET2(unsigned int,m_array_unsigned_int,ARRAY_UNSIGNED_INT)
0637   TOOLS_VALUE_SET2(int,m_array_int,ARRAY_INT)
0638   TOOLS_VALUE_SET2(uint64,m_array_unsigned_int64,ARRAY_UNSIGNED_INT64)
0639   TOOLS_VALUE_SET2(int64,m_array_int64,ARRAY_INT64)
0640   TOOLS_VALUE_SET2(float,m_array_float,ARRAY_FLOAT)
0641   TOOLS_VALUE_SET2(double,m_array_double,ARRAY_DOUBLE)
0642   TOOLS_VALUE_SET2(bool,m_array_bool,ARRAY_BOOL)
0643   TOOLS_VALUE_SET2(std::string,m_array_string,ARRAY_STRING)
0644 
0645 #undef TOOLS_VALUE_SET2
0646 
0647 #define TOOLS_VALUE_GET(a_what,a_get_what,a_m_what) \
0648   const std::vector<a_what>& a_get_what(std::vector<unsigned int>& a_orders) const {\
0649     a_orders = u.a_m_what->orders();\
0650     return u.a_m_what->vector();\
0651   }
0652 
0653 //TOOLS_VALUE_GET(unsigned char,get_array_unsigned_char,m_array_unsigned_char)
0654 //TOOLS_VALUE_GET(char,get_array_char,m_array_char)
0655   TOOLS_VALUE_GET(unsigned short,get_array_unsigned_short,m_array_unsigned_short)
0656   TOOLS_VALUE_GET(short,get_array_short,m_array_short)
0657   TOOLS_VALUE_GET(unsigned int,get_array_unsigned_int,m_array_unsigned_int)
0658   TOOLS_VALUE_GET(int,get_array_int,m_array_int)
0659   TOOLS_VALUE_GET(uint64,get_array_unsigned_int64,m_array_unsigned_int64)
0660   TOOLS_VALUE_GET(int64,get_array_int64,m_array_int64)
0661   TOOLS_VALUE_GET(float,get_array_float,m_array_float)
0662   TOOLS_VALUE_GET(double,get_array_double,m_array_double)
0663   TOOLS_VALUE_GET(bool,get_array_bool,m_array_bool)
0664   TOOLS_VALUE_GET(std::string,get_array_string,m_array_string)
0665 
0666 #undef TOOLS_VALUE_GET
0667 
0668 
0669 public:
0670   bool s_type(std::string& a_s) const {return s_type(m_type,a_s);}
0671 
0672   static bool s_type(value::e_type a_type,std::string& a_s){
0673     switch(a_type) {
0674     case NONE:a_s = "NONE";return true;
0675     case INT:a_s = "INT";return true;
0676     case INT64:a_s = "INT64";return true;
0677     case DOUBLE:a_s = "DOUBLE";return true;
0678     case STRING:a_s = "STRING";return true;
0679     case VOID_STAR:a_s = "VOID_STAR";return true;
0680     case DOUBLE_STAR:a_s = "DOUBLE_STAR";return true;
0681     case FLOAT_STAR:a_s = "FLOAT_STAR";return true;
0682     case INT_STAR:a_s = "INT_STAR";return true;
0683     case BOOL:a_s = "BOOL";return true;
0684     case SHORT:a_s = "SHORT";return true;
0685     case FLOAT:a_s = "FLOAT";return true;
0686     //case CHAR:a_s = "CHAR";return true;
0687     //case UNSIGNED_CHAR:a_s = "UNSIGNED_CHAR";return true;
0688     case UNSIGNED_SHORT:a_s = "UNSIGNED_SHORT";return true;
0689     case UNSIGNED_INT:a_s = "UNSIGNED_INT";return true;
0690     case UNSIGNED_INT64:a_s = "UNSIGNED_INT64";return true;
0691     //case ARRAY_UNSIGNED_CHAR:a_s = "ARRAY_UNSIGNED_CHAR";return true;
0692     //case ARRAY_CHAR:a_s = "ARRAY_CHAR";return true;
0693     case ARRAY_UNSIGNED_SHORT:a_s = "ARRAY_UNSIGNED_SHORT";return true;
0694     case ARRAY_SHORT:a_s = "ARRAY_SHORT";return true;
0695     case ARRAY_UNSIGNED_INT:a_s = "ARRAY_UNSIGNED_INT";return true;
0696     case ARRAY_INT:a_s = "ARRAY_INT";return true;
0697     case ARRAY_UNSIGNED_INT64:a_s = "ARRAY_UNSIGNED_INT64";return true;
0698     case ARRAY_INT64:a_s = "ARRAY_INT64";return true;
0699     case ARRAY_FLOAT:a_s = "ARRAY_FLOAT";return true;
0700     case ARRAY_DOUBLE:a_s = "ARRAY_DOUBLE";return true;
0701     case ARRAY_BOOL:a_s = "ARRAY_BOOL";return true;
0702     case ARRAY_STRING:a_s = "ARRAY_STRING";return true;
0703     default:a_s.clear();return false;
0704     }
0705 
0706   }
0707   bool tos(std::string& a_s) const {return tos(*this,a_s);}
0708 
0709   static bool tos(const value& a_v,std::string& a_s){
0710     switch(a_v.m_type) {
0711     case NONE:
0712       sprintf(a_s,5,"(nil)");
0713       return true;
0714     case BOOL:
0715       sprintf(a_s,5,"%s",a_v.u.m_bool?"true":"false");
0716       return true;
0717   //case UNSIGNED_CHAR:
0718   //  sprintf(a_s,32,"%c",a_v.u.m_unsigned_char);
0719   //  return true;
0720   //case CHAR:
0721   //  sprintf(a_s,32,"%c",a_v.u.m_char);
0722   //  return true;
0723     case UNSIGNED_SHORT:
0724       sprintf(a_s,32,"%u",a_v.u.m_unsigned_short);
0725       return true;
0726     case SHORT:
0727       sprintf(a_s,32,"%d",a_v.u.m_short);
0728       return true;
0729     case UNSIGNED_INT:
0730       sprintf(a_s,32,"%u",a_v.u.m_unsigned_int);
0731       return true;
0732     case INT:
0733       sprintf(a_s,32,"%d",a_v.u.m_int);
0734       return true;
0735     case UNSIGNED_INT64:
0736       sprintf(a_s,32,int64_format(),a_v.u.m_unsigned_int64);
0737       return true;
0738     case INT64:
0739       sprintf(a_s,32,int64_format(),a_v.u.m_int64);
0740       return true;
0741     case FLOAT:
0742       sprintf(a_s,32,"%g",a_v.u.m_float);
0743       return true;
0744     case DOUBLE:
0745       sprintf(a_s,32,"%g",a_v.u.m_double);
0746       return true;
0747     case VOID_STAR:
0748       sprintf(a_s,32,upointer_format_x(),(upointer)a_v.u.m_void_star);
0749       return true;
0750     case DOUBLE_STAR:
0751       sprintf(a_s,32,upointer_format_x(),(upointer)a_v.u.m_double_star);
0752       return true;
0753     case FLOAT_STAR:
0754       sprintf(a_s,32,upointer_format_x(),(upointer)a_v.u.m_float_star);
0755       return true;
0756     case INT_STAR:
0757       sprintf(a_s,32,upointer_format_x(),(upointer)a_v.u.m_int_star);
0758       return true;
0759     case STRING:
0760       a_s = *a_v.u.m_string;
0761       return true;
0762 
0763     //case ARRAY_UNSIGNED_CHAR:
0764     //  a_s = tos<unsigned char>(a_v.u.m_array_unsigned_char->vector());
0765     //  return true;
0766     //case ARRAY_CHAR:
0767     //  a_s = tos<char>(a_v.u.m_array_char->vector());
0768     //  return true;
0769 
0770     case ARRAY_UNSIGNED_SHORT:
0771       return nums2s<unsigned short>(a_v.u.m_array_unsigned_short->vector(),a_s);
0772     case ARRAY_SHORT:
0773       return nums2s<short>(a_v.u.m_array_short->vector(),a_s);
0774 
0775     case ARRAY_UNSIGNED_INT:
0776       return nums2s<unsigned int>(a_v.u.m_array_unsigned_int->vector(),a_s);
0777     case ARRAY_INT:
0778       return nums2s<int>(a_v.u.m_array_int->vector(),a_s);
0779 
0780     case ARRAY_UNSIGNED_INT64:
0781       return nums2s<uint64>(a_v.u.m_array_unsigned_int64->vector(),a_s);
0782     case ARRAY_INT64:
0783       return nums2s<int64>(a_v.u.m_array_int64->vector(),a_s);
0784 
0785     case ARRAY_FLOAT:
0786       return nums2s<float>(a_v.u.m_array_float->vector(),a_s);
0787     case ARRAY_DOUBLE:
0788       return nums2s<double>(a_v.u.m_array_double->vector(),a_s);
0789     case ARRAY_BOOL:
0790       b2s(a_v.u.m_array_bool->vector(),a_s);
0791       return true;
0792     case ARRAY_STRING:
0793       return nums2s<std::string>(a_v.u.m_array_string->vector(),a_s);
0794     default:
0795       a_s.clear();
0796       return false;
0797     }
0798   }
0799 
0800 /*
0801   size_t header_size() const {return header_size(*this);} //used in base_evaluator::dump()
0802   static size_t header_size(const value& a_v){
0803     switch(a_v.m_type) {
0804     case NONE:           return 5;
0805 
0806     case BOOL:           return 5;
0807   //case UNSIGNED_CHAR:  return 1;
0808   //case CHAR:           return 1;
0809 
0810     case INT:
0811     case UNSIGNED_SHORT:
0812     case SHORT:
0813     case FLOAT:
0814     case UNSIGNED_INT:   return 8;
0815 
0816 
0817     case DOUBLE:
0818     case INT64:
0819     case UNSIGNED_INT64:
0820     case VOID_STAR:
0821     case DOUBLE_STAR:
0822     case FLOAT_STAR:
0823     case INT_STAR:
0824     case STRING:         return 12;
0825 
0826     //case ARRAY_UNSIGNED_CHAR:
0827     //case ARRAY_CHAR:
0828 
0829     case ARRAY_UNSIGNED_SHORT:
0830     case ARRAY_SHORT:
0831     case ARRAY_UNSIGNED_INT:
0832     case ARRAY_INT:
0833     case ARRAY_UNSIGNED_INT64:
0834     case ARRAY_INT64:
0835     case ARRAY_FLOAT:
0836     case ARRAY_DOUBLE:
0837     case ARRAY_BOOL:
0838     case ARRAY_STRING:   return 5; //size("array")
0839     default: return 8;
0840     }
0841   }
0842 */
0843 
0844   bool to_double(double& a_d) const {
0845     switch(m_type) {
0846     case INT:
0847       a_d = u.m_int;
0848       return true;
0849     case DOUBLE:
0850       a_d = u.m_double;
0851       return true;
0852     case UNSIGNED_SHORT:
0853       a_d = u.m_unsigned_short;
0854       return true;
0855     case UNSIGNED_INT:
0856       a_d = u.m_unsigned_int;
0857       return true;
0858     case SHORT:
0859       a_d = u.m_short;
0860       return true;
0861     case INT64:
0862       a_d = (double)u.m_int64;
0863       return true;
0864     case UNSIGNED_INT64:
0865       a_d = (double)u.m_unsigned_int64;
0866       return true;
0867     case FLOAT:
0868       a_d = u.m_float;
0869       return true;
0870     //case UNSIGNED_CHAR:
0871     //  a_d = u.m_unsigned_char;
0872     //  return true;
0873     //case CHAR:
0874     //  a_d = u.m_char;
0875     //  return true;
0876     case BOOL:
0877       a_d = u.m_bool?1:0;
0878       return true;
0879     case NONE:
0880     case STRING:
0881     case VOID_STAR:
0882     case DOUBLE_STAR:
0883     case FLOAT_STAR:
0884     case INT_STAR:
0885     //case ARRAY_UNSIGNED_CHAR:
0886     //case ARRAY_CHAR:
0887     case ARRAY_UNSIGNED_SHORT:
0888     case ARRAY_SHORT:
0889     case ARRAY_UNSIGNED_INT:
0890     case ARRAY_INT:
0891     case ARRAY_UNSIGNED_INT64:
0892     case ARRAY_INT64:
0893     case ARRAY_FLOAT:
0894     case ARRAY_DOUBLE:
0895     case ARRAY_BOOL:
0896     case ARRAY_STRING:
0897       break;
0898     }
0899     a_d = 0;
0900     return false;
0901   }
0902 
0903   bool is_array() const {
0904     switch(m_type) {
0905     case INT:
0906     case DOUBLE:
0907     case UNSIGNED_SHORT:
0908     case UNSIGNED_INT:
0909     case SHORT:
0910     case INT64:
0911     case UNSIGNED_INT64:
0912     case FLOAT:
0913     //case UNSIGNED_CHAR:
0914     //case CHAR:
0915     case BOOL:
0916     case NONE:
0917     case STRING:
0918     case VOID_STAR:
0919     case DOUBLE_STAR:
0920     case FLOAT_STAR:
0921     case INT_STAR:
0922       return false;
0923 
0924     //case ARRAY_UNSIGNED_CHAR:
0925     //case ARRAY_CHAR:
0926     case ARRAY_UNSIGNED_SHORT:
0927     case ARRAY_SHORT:
0928     case ARRAY_UNSIGNED_INT:
0929     case ARRAY_INT:
0930     case ARRAY_UNSIGNED_INT64:
0931     case ARRAY_INT64:
0932     case ARRAY_FLOAT:
0933     case ARRAY_DOUBLE:
0934     case ARRAY_BOOL:
0935     case ARRAY_STRING:
0936       return true;
0937     }
0938     return false;
0939   }
0940 
0941   size_t array_size() const {
0942     switch(m_type) {
0943     case INT:
0944     case DOUBLE:
0945     case UNSIGNED_SHORT:
0946     case UNSIGNED_INT:
0947     case SHORT:
0948     case INT64:
0949     case UNSIGNED_INT64:
0950     case FLOAT:
0951     //case UNSIGNED_CHAR:
0952     //case CHAR:
0953     case BOOL:
0954     case NONE:
0955     case STRING:
0956     case VOID_STAR:
0957     case DOUBLE_STAR:
0958     case FLOAT_STAR:
0959     case INT_STAR:
0960       return 0;
0961 
0962     //case ARRAY_UNSIGNED_CHAR:
0963     //case ARRAY_CHAR:
0964     case ARRAY_UNSIGNED_SHORT:
0965       return u.m_array_unsigned_short->size();
0966     case ARRAY_SHORT:
0967       return u.m_array_short->size();
0968     case ARRAY_UNSIGNED_INT:
0969       return u.m_array_unsigned_int->size();
0970     case ARRAY_INT:
0971       return u.m_array_int->size();
0972     case ARRAY_UNSIGNED_INT64:
0973       return u.m_array_unsigned_int64->size();
0974     case ARRAY_INT64:
0975       return u.m_array_int64->size();
0976     case ARRAY_FLOAT:
0977       return u.m_array_float->size();
0978     case ARRAY_DOUBLE:
0979       return u.m_array_double->size();
0980     case ARRAY_BOOL:
0981       return u.m_array_bool->size();
0982     case ARRAY_STRING:
0983       return u.m_array_string->size();
0984     }
0985     return 0;
0986   }
0987 
0988 #define TOOLS_ARRAY_VEC(a_what,a_get_what,a_m_what) \
0989   const std::vector<a_what>& a_get_what() const {return u.a_m_what->vector();}\
0990   std::vector<a_what>& a_get_what() {return u.a_m_what->vector();}
0991 
0992 //TOOLS_ARRAY_VEC(unsigned char,array_unsigned_char,m_array_unsigned_char)
0993 //TOOLS_ARRAY_VEC(char,array_char,m_array_char)
0994   TOOLS_ARRAY_VEC(unsigned short,array_unsigned_short,m_array_unsigned_short)
0995   TOOLS_ARRAY_VEC(short,array_short,m_array_short)
0996   TOOLS_ARRAY_VEC(unsigned int,array_unsigned_int,m_array_unsigned_int)
0997   TOOLS_ARRAY_VEC(int,array_int,m_array_int)
0998   TOOLS_ARRAY_VEC(uint64,array_unsigned_int64,m_array_unsigned_int64)
0999   TOOLS_ARRAY_VEC(int64,array_int64,m_array_int64)
1000   TOOLS_ARRAY_VEC(float,array_float,m_array_float)
1001   TOOLS_ARRAY_VEC(double,array_double,m_array_double)
1002   TOOLS_ARRAY_VEC(bool,array_bool,m_array_bool)
1003   TOOLS_ARRAY_VEC(std::string,array_string,m_array_string)
1004 
1005 #undef TOOLS_ARRAY_VEC
1006 
1007 public: // for valop :
1008 
1009   std::string stype() const {
1010     std::string _s;
1011     if(!s_type(_s)) return "unknown";
1012     return _s;
1013   }
1014 
1015   static std::string stype(e_type a_type) {
1016     std::string _s;
1017     if(!s_type(a_type,_s)) return "unknown";
1018     return _s;
1019   }
1020 
1021   static std::string error_div_zero() {return "divide by zero.";}
1022 
1023   static bool assign(value&,const value&,std::string&);
1024 
1025   // operations in Expression.cxx :
1026   static bool minus(value&,std::string&);
1027   static bool do_not(value&,std::string&);
1028 
1029   static bool add(value&,const value&,std::string&);
1030   static bool subtract(value&,const value&,std::string&);
1031   static bool multiply(value&,const value&,std::string&);
1032   static bool divide(value&,const value&,std::string&);
1033 
1034   static bool if_gt(value&,const value&,std::string&);
1035   static bool if_eq(value&,const value&,std::string&);
1036 
1037   static bool if_ne(value& aThis,const value& aV,
1038                            std::string& aError) {
1039     if(!if_eq(aThis,aV,aError)) return false;
1040     aThis.u.m_bool = (aThis.u.m_bool?false:true);
1041     return true;
1042   }
1043   static bool if_ge(value& aThis,const value& aV,
1044                            std::string& aError){
1045     value tmp(aThis);
1046     if(!if_eq(aThis,aV,aError)) return false;
1047     if(aThis.u.m_bool) return true;
1048     // then not equal, check gt :
1049     if(!if_gt(tmp,aV,aError)) return false;
1050     aThis.u.m_bool = tmp.u.m_bool;
1051     return true;
1052   }
1053 
1054   static bool if_lt(value& aThis,const value& aV,
1055                     std::string& aError){
1056     if(!if_ge(aThis,aV,aError)) return false;
1057     aThis.u.m_bool = (aThis.u.m_bool?false:true);
1058     return true;
1059   }
1060 
1061   static bool if_le(value& aThis,const value& aV,
1062                     std::string& aError){
1063     if(!if_gt(aThis,aV,aError)) return false;
1064     aThis.u.m_bool = (aThis.u.m_bool?false:true);
1065     return true;
1066   }
1067 
1068   static bool if_and(value&,const value&,std::string&);
1069   static bool if_or(value&,const value&,std::string&);
1070 
1071   static bool to_double(const value&,double&);
1072   static bool cxx_type(const value&,std::string&);
1073 
1074   //static bool i_set(value&,const Slash::Core::Ivalue&);
1075   static std::string to_string(const value&);
1076 
1077 protected:
1078   void reset() {
1079     if(m_type==STRING) {
1080       delete u.m_string;
1081       u.m_string = 0;
1082 
1083     //} else if(m_type==ARRAY_UNSIGNED_CHAR) {
1084     //  delete u.m_array_unsigned_char;u.m_array_unsigned_char = 0;
1085 
1086     //} else if(m_type==ARRAY_CHAR) {
1087     //  delete u.m_array_char;u.m_array_char = 0;
1088 
1089     } else if(m_type==ARRAY_UNSIGNED_SHORT) {
1090       delete u.m_array_unsigned_short;u.m_array_unsigned_short = 0;
1091 
1092     } else if(m_type==ARRAY_SHORT) {
1093       delete u.m_array_short;u.m_array_short = 0;
1094 
1095     } else if(m_type==ARRAY_UNSIGNED_INT) {
1096       delete u.m_array_unsigned_int;u.m_array_unsigned_int = 0;
1097 
1098     } else if(m_type==ARRAY_INT) {
1099       delete u.m_array_int;u.m_array_int = 0;
1100 
1101     } else if(m_type==ARRAY_UNSIGNED_INT64) {
1102       delete u.m_array_unsigned_int64;u.m_array_unsigned_int64 = 0;
1103 
1104     } else if(m_type==ARRAY_INT64) {
1105       delete u.m_array_int64;u.m_array_int64 = 0;
1106 
1107     } else if(m_type==ARRAY_FLOAT) {
1108       delete u.m_array_float;u.m_array_float = 0;
1109 
1110     } else if(m_type==ARRAY_DOUBLE) {
1111       delete u.m_array_double;u.m_array_double = 0;
1112 
1113     } else if(m_type==ARRAY_BOOL) {
1114       delete u.m_array_bool;u.m_array_bool = 0;
1115 
1116     } else if(m_type==ARRAY_STRING) {
1117       delete u.m_array_string;u.m_array_string = 0;
1118 
1119     } else {
1120       u.m_unsigned_int64 = 0;
1121     }
1122   }
1123 protected:
1124   std::string* m_label;
1125   unsigned int m_itag;
1126 protected:
1127   e_type m_type;
1128   union {
1129     bool m_bool;
1130     //char m_char;
1131     int m_int;
1132     short m_short;
1133     int64 m_int64;
1134     float m_float;
1135     double m_double;
1136     //unsigned char m_unsigned_char;
1137     unsigned short m_unsigned_short;
1138     unsigned int m_unsigned_int;
1139     uint64 m_unsigned_int64;
1140     void* m_void_star;
1141     double* m_double_star;
1142     float* m_float_star;
1143     int* m_int_star;
1144     std::string* m_string;
1145 
1146     array<unsigned char>* m_array_unsigned_char;
1147     array<char>* m_array_char;
1148     array<unsigned short>* m_array_unsigned_short;
1149     array<short>* m_array_short;
1150     array<uint64>* m_array_unsigned_int64;
1151     array<int64>* m_array_int64;
1152     array<unsigned int>* m_array_unsigned_int;
1153     array<int>* m_array_int;
1154     array<float>* m_array_float;
1155     array<double>* m_array_double;
1156     array<bool>* m_array_bool;
1157     array<std::string>* m_array_string;
1158   } u;
1159 };
1160 
1161 }
1162 
1163 #include "value.icc"
1164 
1165 #endif