Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/externals/g4tools/include/tools/value.icc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /externals/g4tools/include/tools/value.icc (Version 11.3.0) and /externals/g4tools/include/tools/value.icc (Version 11.1)


  1                                                     1 
  2 #include "sto"                                      2 #include "sto"
  3                                                     3 
  4 namespace tools {                                   4 namespace tools {
  5                                                     5 
  6 inline bool value::assign(value& aThis,const v      6 inline bool value::assign(value& aThis,const value& aV,std::string& aError){
  7   if(aThis.m_type==aV.m_type) {                     7   if(aThis.m_type==aV.m_type) {
  8     aThis.reset();                                  8     aThis.reset();
  9     if(aV.m_type==value::STRING) {                  9     if(aV.m_type==value::STRING) {
 10       aThis.u.m_string = new std::string(*aV.u     10       aThis.u.m_string = new std::string(*aV.u.m_string);
 11                                                    11 
 12     //} else if(aV.m_type==value::ARRAY_UNSIGN     12     //} else if(aV.m_type==value::ARRAY_UNSIGNED_CHAR) {
 13     //  aThis.u.m_array_unsigned_char =            13     //  aThis.u.m_array_unsigned_char =
 14     //    new array<unsigned char>(*aV.u.m_arr     14     //    new array<unsigned char>(*aV.u.m_array_unsigned_char);
 15     //} else if(aV.m_type==value::ARRAY_CHAR)      15     //} else if(aV.m_type==value::ARRAY_CHAR) {
 16     //  aThis.u.m_array_char = new array<char>     16     //  aThis.u.m_array_char = new array<char>(*aV.u.m_array_char);
 17                                                    17 
 18     } else if(aV.m_type==value::ARRAY_UNSIGNED     18     } else if(aV.m_type==value::ARRAY_UNSIGNED_SHORT) {
 19       aThis.u.m_array_unsigned_short =             19       aThis.u.m_array_unsigned_short =
 20         new array<unsigned short>(*aV.u.m_arra     20         new array<unsigned short>(*aV.u.m_array_unsigned_short);
 21     } else if(aV.m_type==value::ARRAY_SHORT) {     21     } else if(aV.m_type==value::ARRAY_SHORT) {
 22       aThis.u.m_array_short = new array<short>     22       aThis.u.m_array_short = new array<short>(*aV.u.m_array_short);
 23                                                    23 
 24     } else if(aV.m_type==value::ARRAY_UNSIGNED     24     } else if(aV.m_type==value::ARRAY_UNSIGNED_INT) {
 25       aThis.u.m_array_unsigned_int =               25       aThis.u.m_array_unsigned_int =
 26         new array<unsigned int>(*aV.u.m_array_     26         new array<unsigned int>(*aV.u.m_array_unsigned_int);
 27     } else if(aV.m_type==value::ARRAY_INT) {       27     } else if(aV.m_type==value::ARRAY_INT) {
 28       aThis.u.m_array_int = new array<int>(*aV     28       aThis.u.m_array_int = new array<int>(*aV.u.m_array_int);
 29                                                    29 
 30     } else if(aV.m_type==value::ARRAY_UNSIGNED     30     } else if(aV.m_type==value::ARRAY_UNSIGNED_INT64) {
 31       aThis.u.m_array_unsigned_int64 =             31       aThis.u.m_array_unsigned_int64 =
 32         new array<uint64>(*aV.u.m_array_unsign     32         new array<uint64>(*aV.u.m_array_unsigned_int64);
 33     } else if(aV.m_type==value::ARRAY_INT64) {     33     } else if(aV.m_type==value::ARRAY_INT64) {
 34       aThis.u.m_array_int64 =                      34       aThis.u.m_array_int64 =
 35         new array<int64>(*aV.u.m_array_int64);     35         new array<int64>(*aV.u.m_array_int64);
 36                                                    36 
 37     } else if(aV.m_type==value::ARRAY_FLOAT) {     37     } else if(aV.m_type==value::ARRAY_FLOAT) {
 38       aThis.u.m_array_float = new array<float>     38       aThis.u.m_array_float = new array<float>(*aV.u.m_array_float);
 39     } else if(aV.m_type==value::ARRAY_DOUBLE)      39     } else if(aV.m_type==value::ARRAY_DOUBLE) {
 40       aThis.u.m_array_double = new array<doubl     40       aThis.u.m_array_double = new array<double>(*aV.u.m_array_double);
 41     } else if(aV.m_type==value::ARRAY_BOOL) {      41     } else if(aV.m_type==value::ARRAY_BOOL) {
 42       aThis.u.m_array_bool = new array<bool>(*     42       aThis.u.m_array_bool = new array<bool>(*aV.u.m_array_bool);
 43                                                    43 
 44     } else if(aV.m_type==value::ARRAY_STRING)      44     } else if(aV.m_type==value::ARRAY_STRING) {
 45       aThis.u.m_array_string =                     45       aThis.u.m_array_string =
 46         new array<std::string>(*aV.u.m_array_s     46         new array<std::string>(*aV.u.m_array_string);
 47                                                    47 
 48     } else {                                       48     } else {
 49       aThis.u = aV.u;                              49       aThis.u = aV.u;
 50     }                                              50     }
 51     return true;                                   51     return true;
 52   } else {                                         52   } else {
 53     switch(aThis.m_type) {                         53     switch(aThis.m_type) {
 54     case value::INT:                               54     case value::INT:
 55       break;                                       55       break;
 56     case value::DOUBLE:                            56     case value::DOUBLE:
 57       switch(aV.m_type) {                          57       switch(aV.m_type) {
 58       case value::INT:                             58       case value::INT:
 59         aThis.u.m_double = aV.u.m_int;             59         aThis.u.m_double = aV.u.m_int;
 60         return true;                               60         return true;
 61       case value::UNSIGNED_SHORT :                 61       case value::UNSIGNED_SHORT :
 62         aThis.u.m_double = aV.u.m_unsigned_sho     62         aThis.u.m_double = aV.u.m_unsigned_short;
 63         return true;                               63         return true;
 64       case value::UNSIGNED_INT:                    64       case value::UNSIGNED_INT:
 65         aThis.u.m_double = aV.u.m_unsigned_int     65         aThis.u.m_double = aV.u.m_unsigned_int;
 66         return true;                               66         return true;
 67       case value::NONE:                            67       case value::NONE:
 68       case value::DOUBLE:                          68       case value::DOUBLE:
 69       case value::VOID_STAR:                       69       case value::VOID_STAR:
 70       case value::BOOL:                            70       case value::BOOL:
 71       case value::SHORT:                           71       case value::SHORT:
 72       case value::INT64:                           72       case value::INT64:
 73       case value::FLOAT:                           73       case value::FLOAT:
 74       //case value::UNSIGNED_CHAR:                 74       //case value::UNSIGNED_CHAR:
 75       //case value::CHAR:                          75       //case value::CHAR:
 76       case value::UNSIGNED_INT64 :                 76       case value::UNSIGNED_INT64 :
 77       case value::DOUBLE_STAR:                     77       case value::DOUBLE_STAR:
 78       case value::FLOAT_STAR:                      78       case value::FLOAT_STAR:
 79       case value::INT_STAR:                        79       case value::INT_STAR:
 80       case value::STRING:                          80       case value::STRING:
 81       //case value::ARRAY_UNSIGNED_CHAR:           81       //case value::ARRAY_UNSIGNED_CHAR:
 82       //case value::ARRAY_CHAR:                    82       //case value::ARRAY_CHAR:
 83       case value::ARRAY_UNSIGNED_SHORT:            83       case value::ARRAY_UNSIGNED_SHORT:
 84       case value::ARRAY_SHORT:                     84       case value::ARRAY_SHORT:
 85       case value::ARRAY_UNSIGNED_INT:              85       case value::ARRAY_UNSIGNED_INT:
 86       case value::ARRAY_INT:                       86       case value::ARRAY_INT:
 87       case value::ARRAY_UNSIGNED_INT64:            87       case value::ARRAY_UNSIGNED_INT64:
 88       case value::ARRAY_INT64:                     88       case value::ARRAY_INT64:
 89       case value::ARRAY_FLOAT:                     89       case value::ARRAY_FLOAT:
 90       case value::ARRAY_DOUBLE:                    90       case value::ARRAY_DOUBLE:
 91       case value::ARRAY_BOOL:                      91       case value::ARRAY_BOOL:
 92       case value::ARRAY_STRING:                    92       case value::ARRAY_STRING:
 93         break;                                     93         break;
 94       }                                            94       }
 95       break;                                       95       break;
 96     case value::STRING:                            96     case value::STRING:
 97       break;                                       97       break;
 98     case value::VOID_STAR:                         98     case value::VOID_STAR:
 99       break;                                       99       break;
100     case value::UNSIGNED_INT:                     100     case value::UNSIGNED_INT:
101       break;                                      101       break;
102     case value::BOOL:                             102     case value::BOOL:
103       break;                                      103       break;
104     case value::SHORT:                            104     case value::SHORT:
105       switch(aV.m_type) {                         105       switch(aV.m_type) {
106       case value::INT:                            106       case value::INT:
107         aThis.u.m_short = (short)aV.u.m_int;      107         aThis.u.m_short = (short)aV.u.m_int;
108         return true;                              108         return true;
109       case value::NONE:                           109       case value::NONE:
110       case value::DOUBLE:                         110       case value::DOUBLE:
111       case value::VOID_STAR:                      111       case value::VOID_STAR:
112       case value::BOOL:                           112       case value::BOOL:
113       case value::SHORT:                          113       case value::SHORT:
114       case value::INT64:                          114       case value::INT64:
115       case value::FLOAT:                          115       case value::FLOAT:
116       //case value::UNSIGNED_CHAR:                116       //case value::UNSIGNED_CHAR:
117       //case value::CHAR:                         117       //case value::CHAR:
118       case value::UNSIGNED_SHORT :                118       case value::UNSIGNED_SHORT :
119       case value::UNSIGNED_INT:                   119       case value::UNSIGNED_INT:
120       case value::UNSIGNED_INT64 :                120       case value::UNSIGNED_INT64 :
121       case value::DOUBLE_STAR:                    121       case value::DOUBLE_STAR:
122       case value::FLOAT_STAR:                     122       case value::FLOAT_STAR:
123       case value::INT_STAR:                       123       case value::INT_STAR:
124       case value::STRING:                         124       case value::STRING:
125       //case value::ARRAY_UNSIGNED_CHAR:          125       //case value::ARRAY_UNSIGNED_CHAR:
126       //case value::ARRAY_CHAR:                   126       //case value::ARRAY_CHAR:
127       case value::ARRAY_UNSIGNED_SHORT:           127       case value::ARRAY_UNSIGNED_SHORT:
128       case value::ARRAY_SHORT:                    128       case value::ARRAY_SHORT:
129       case value::ARRAY_UNSIGNED_INT:             129       case value::ARRAY_UNSIGNED_INT:
130       case value::ARRAY_INT:                      130       case value::ARRAY_INT:
131       case value::ARRAY_UNSIGNED_INT64:           131       case value::ARRAY_UNSIGNED_INT64:
132       case value::ARRAY_INT64:                    132       case value::ARRAY_INT64:
133       case value::ARRAY_FLOAT:                    133       case value::ARRAY_FLOAT:
134       case value::ARRAY_DOUBLE:                   134       case value::ARRAY_DOUBLE:
135       case value::ARRAY_BOOL:                     135       case value::ARRAY_BOOL:
136       case value::ARRAY_STRING:                   136       case value::ARRAY_STRING:
137         break;                                    137         break;
138       }                                           138       }
139       break;                                      139       break;
140     case value::FLOAT:                            140     case value::FLOAT:
141       switch(aV.m_type) {                         141       switch(aV.m_type) {
142       case value::INT:                            142       case value::INT:
143         aThis.u.m_float = (float)aV.u.m_int;      143         aThis.u.m_float = (float)aV.u.m_int;
144         return true;                              144         return true;
145       case value::DOUBLE:                         145       case value::DOUBLE:
146         aThis.u.m_float = (float)aV.u.m_double    146         aThis.u.m_float = (float)aV.u.m_double;
147         return true;                              147         return true;
148       case value::NONE:                           148       case value::NONE:
149       case value::VOID_STAR:                      149       case value::VOID_STAR:
150       case value::BOOL:                           150       case value::BOOL:
151       case value::SHORT:                          151       case value::SHORT:
152       case value::INT64:                          152       case value::INT64:
153       case value::FLOAT:                          153       case value::FLOAT:
154       //case value::UNSIGNED_CHAR:                154       //case value::UNSIGNED_CHAR:
155       //case value::CHAR:                         155       //case value::CHAR:
156       case value::UNSIGNED_SHORT :                156       case value::UNSIGNED_SHORT :
157       case value::UNSIGNED_INT:                   157       case value::UNSIGNED_INT:
158       case value::UNSIGNED_INT64 :                158       case value::UNSIGNED_INT64 :
159       case value::DOUBLE_STAR:                    159       case value::DOUBLE_STAR:
160       case value::FLOAT_STAR:                     160       case value::FLOAT_STAR:
161       case value::INT_STAR:                       161       case value::INT_STAR:
162       case value::STRING:                         162       case value::STRING:
163       //case value::ARRAY_UNSIGNED_CHAR:          163       //case value::ARRAY_UNSIGNED_CHAR:
164       //case value::ARRAY_CHAR:                   164       //case value::ARRAY_CHAR:
165       case value::ARRAY_UNSIGNED_SHORT:           165       case value::ARRAY_UNSIGNED_SHORT:
166       case value::ARRAY_SHORT:                    166       case value::ARRAY_SHORT:
167       case value::ARRAY_UNSIGNED_INT:             167       case value::ARRAY_UNSIGNED_INT:
168       case value::ARRAY_INT:                      168       case value::ARRAY_INT:
169       case value::ARRAY_UNSIGNED_INT64:           169       case value::ARRAY_UNSIGNED_INT64:
170       case value::ARRAY_INT64:                    170       case value::ARRAY_INT64:
171       case value::ARRAY_FLOAT:                    171       case value::ARRAY_FLOAT:
172       case value::ARRAY_DOUBLE:                   172       case value::ARRAY_DOUBLE:
173       case value::ARRAY_BOOL:                     173       case value::ARRAY_BOOL:
174       case value::ARRAY_STRING:                   174       case value::ARRAY_STRING:
175         break;                                    175         break;
176       }                                           176       }
177       break;                                      177       break;
178 /*                                                178 /*
179     case value::UNSIGNED_CHAR:                    179     case value::UNSIGNED_CHAR:
180       switch(aV.m_type) {                         180       switch(aV.m_type) {
181       case value::INT:                            181       case value::INT:
182         aThis.u.m_unsigned_char = (unsigned ch    182         aThis.u.m_unsigned_char = (unsigned char)aV.u.m_int;
183         return true;                              183         return true;
184       case value::NONE:                           184       case value::NONE:
185       case value::DOUBLE:                         185       case value::DOUBLE:
186       case value::VOID_STAR:                      186       case value::VOID_STAR:
187       case value::BOOL:                           187       case value::BOOL:
188       case value::SHORT:                          188       case value::SHORT:
189       case value::INT64:                          189       case value::INT64:
190       case value::FLOAT:                          190       case value::FLOAT:
191       case value::UNSIGNED_CHAR:                  191       case value::UNSIGNED_CHAR:
192       case value::CHAR:                           192       case value::CHAR:
193       case value::UNSIGNED_SHORT :                193       case value::UNSIGNED_SHORT :
194       case value::UNSIGNED_INT:                   194       case value::UNSIGNED_INT:
195       case value::UNSIGNED_INT64 :                195       case value::UNSIGNED_INT64 :
196       case value::DOUBLE_STAR:                    196       case value::DOUBLE_STAR:
197       case value::FLOAT_STAR:                     197       case value::FLOAT_STAR:
198       case value::INT_STAR:                       198       case value::INT_STAR:
199       case value::STRING:                         199       case value::STRING:
200       case value::ARRAY_UNSIGNED_CHAR:            200       case value::ARRAY_UNSIGNED_CHAR:
201       case value::ARRAY_CHAR:                     201       case value::ARRAY_CHAR:
202       case value::ARRAY_UNSIGNED_SHORT:           202       case value::ARRAY_UNSIGNED_SHORT:
203       case value::ARRAY_SHORT:                    203       case value::ARRAY_SHORT:
204       case value::ARRAY_UNSIGNED_INT:             204       case value::ARRAY_UNSIGNED_INT:
205       case value::ARRAY_INT:                      205       case value::ARRAY_INT:
206       case value::ARRAY_UNSIGNED_INT64:           206       case value::ARRAY_UNSIGNED_INT64:
207       case value::ARRAY_INT64:                    207       case value::ARRAY_INT64:
208       case value::ARRAY_FLOAT:                    208       case value::ARRAY_FLOAT:
209       case value::ARRAY_DOUBLE:                   209       case value::ARRAY_DOUBLE:
210       case value::ARRAY_BOOL:                     210       case value::ARRAY_BOOL:
211       case value::ARRAY_STRING:                   211       case value::ARRAY_STRING:
212         break;                                    212         break;
213       }                                           213       }
214       break;                                      214       break;
215     case value::CHAR:                             215     case value::CHAR:
216       switch(aV.m_type) {                         216       switch(aV.m_type) {
217       case value::INT:                            217       case value::INT:
218         aThis.u.m_char = (char)aV.u.m_int;        218         aThis.u.m_char = (char)aV.u.m_int;
219         return true;                              219         return true;
220       case value::STRING:                         220       case value::STRING:
221         if(aV.u.m_string->size()!=1) break;       221         if(aV.u.m_string->size()!=1) break;
222         aThis.u.m_char = (*aV.u.m_string)[0];     222         aThis.u.m_char = (*aV.u.m_string)[0];
223         return true;                              223         return true;
224       case value::NONE:                           224       case value::NONE:
225       case value::DOUBLE:                         225       case value::DOUBLE:
226       case value::VOID_STAR:                      226       case value::VOID_STAR:
227       case value::BOOL:                           227       case value::BOOL:
228       case value::SHORT:                          228       case value::SHORT:
229       case value::INT64:                          229       case value::INT64:
230       case value::FLOAT:                          230       case value::FLOAT:
231       case value::UNSIGNED_CHAR:                  231       case value::UNSIGNED_CHAR:
232       case value::CHAR:                           232       case value::CHAR:
233       case value::UNSIGNED_SHORT :                233       case value::UNSIGNED_SHORT :
234       case value::UNSIGNED_INT:                   234       case value::UNSIGNED_INT:
235       case value::UNSIGNED_INT64 :                235       case value::UNSIGNED_INT64 :
236       case value::DOUBLE_STAR:                    236       case value::DOUBLE_STAR:
237       case value::FLOAT_STAR:                     237       case value::FLOAT_STAR:
238       case value::INT_STAR:                       238       case value::INT_STAR:
239       case value::ARRAY_UNSIGNED_CHAR:            239       case value::ARRAY_UNSIGNED_CHAR:
240       case value::ARRAY_CHAR:                     240       case value::ARRAY_CHAR:
241       case value::ARRAY_UNSIGNED_SHORT:           241       case value::ARRAY_UNSIGNED_SHORT:
242       case value::ARRAY_SHORT:                    242       case value::ARRAY_SHORT:
243       case value::ARRAY_UNSIGNED_INT:             243       case value::ARRAY_UNSIGNED_INT:
244       case value::ARRAY_INT:                      244       case value::ARRAY_INT:
245       case value::ARRAY_UNSIGNED_INT64:           245       case value::ARRAY_UNSIGNED_INT64:
246       case value::ARRAY_INT64:                    246       case value::ARRAY_INT64:
247       case value::ARRAY_FLOAT:                    247       case value::ARRAY_FLOAT:
248       case value::ARRAY_DOUBLE:                   248       case value::ARRAY_DOUBLE:
249       case value::ARRAY_BOOL:                     249       case value::ARRAY_BOOL:
250       case value::ARRAY_STRING:                   250       case value::ARRAY_STRING:
251         break;                                    251         break;
252       }                                           252       }
253       break;                                      253       break;
254 */                                                254 */
255     case value::NONE:                             255     case value::NONE:
256     case value::INT64:                            256     case value::INT64:
257     case value::UNSIGNED_SHORT :                  257     case value::UNSIGNED_SHORT :
258     case value::UNSIGNED_INT64 :                  258     case value::UNSIGNED_INT64 :
259       switch(aV.m_type) {                         259       switch(aV.m_type) {
260       case value::INT:                            260       case value::INT:
261         aThis.u.m_int64 = aV.u.m_int;             261         aThis.u.m_int64 = aV.u.m_int;
262         return true;                              262         return true;
263       case value::UNSIGNED_SHORT :                263       case value::UNSIGNED_SHORT :
264         aThis.u.m_int64 = aV.u.m_unsigned_shor    264         aThis.u.m_int64 = aV.u.m_unsigned_short;
265         return true;                              265         return true;
266       case value::UNSIGNED_INT:                   266       case value::UNSIGNED_INT:
267         aThis.u.m_int64 = aV.u.m_unsigned_int;    267         aThis.u.m_int64 = aV.u.m_unsigned_int;
268         return true;                              268         return true;
269       case value::NONE:                           269       case value::NONE:
270       case value::DOUBLE:                         270       case value::DOUBLE:
271       case value::VOID_STAR:                      271       case value::VOID_STAR:
272       case value::BOOL:                           272       case value::BOOL:
273       case value::SHORT:                          273       case value::SHORT:
274       case value::INT64:                          274       case value::INT64:
275       case value::FLOAT:                          275       case value::FLOAT:
276       //case value::UNSIGNED_CHAR:                276       //case value::UNSIGNED_CHAR:
277       //case value::CHAR:                         277       //case value::CHAR:
278       case value::UNSIGNED_INT64 :                278       case value::UNSIGNED_INT64 :
279       case value::DOUBLE_STAR:                    279       case value::DOUBLE_STAR:
280       case value::FLOAT_STAR:                     280       case value::FLOAT_STAR:
281       case value::INT_STAR:                       281       case value::INT_STAR:
282       case value::STRING:                         282       case value::STRING:
283       //case value::ARRAY_UNSIGNED_CHAR:          283       //case value::ARRAY_UNSIGNED_CHAR:
284       //case value::ARRAY_CHAR:                   284       //case value::ARRAY_CHAR:
285       case value::ARRAY_UNSIGNED_SHORT:           285       case value::ARRAY_UNSIGNED_SHORT:
286       case value::ARRAY_SHORT:                    286       case value::ARRAY_SHORT:
287       case value::ARRAY_UNSIGNED_INT:             287       case value::ARRAY_UNSIGNED_INT:
288       case value::ARRAY_INT:                      288       case value::ARRAY_INT:
289       case value::ARRAY_UNSIGNED_INT64:           289       case value::ARRAY_UNSIGNED_INT64:
290       case value::ARRAY_INT64:                    290       case value::ARRAY_INT64:
291       case value::ARRAY_FLOAT:                    291       case value::ARRAY_FLOAT:
292       case value::ARRAY_DOUBLE:                   292       case value::ARRAY_DOUBLE:
293       case value::ARRAY_BOOL:                     293       case value::ARRAY_BOOL:
294       case value::ARRAY_STRING:                   294       case value::ARRAY_STRING:
295         break;                                    295         break;
296       }                                           296       }
297       break;                                      297       break;
298     case value::DOUBLE_STAR:                      298     case value::DOUBLE_STAR:
299     case value::FLOAT_STAR:                       299     case value::FLOAT_STAR:
300     case value::INT_STAR:                         300     case value::INT_STAR:
301     //case value::ARRAY_UNSIGNED_CHAR:            301     //case value::ARRAY_UNSIGNED_CHAR:
302     //case value::ARRAY_CHAR:                     302     //case value::ARRAY_CHAR:
303     case value::ARRAY_UNSIGNED_SHORT:             303     case value::ARRAY_UNSIGNED_SHORT:
304     case value::ARRAY_SHORT:                      304     case value::ARRAY_SHORT:
305     case value::ARRAY_UNSIGNED_INT:               305     case value::ARRAY_UNSIGNED_INT:
306     case value::ARRAY_INT:                        306     case value::ARRAY_INT:
307     case value::ARRAY_UNSIGNED_INT64:             307     case value::ARRAY_UNSIGNED_INT64:
308     case value::ARRAY_INT64:                      308     case value::ARRAY_INT64:
309     case value::ARRAY_FLOAT:                      309     case value::ARRAY_FLOAT:
310     case value::ARRAY_DOUBLE:                     310     case value::ARRAY_DOUBLE:
311     case value::ARRAY_BOOL:                       311     case value::ARRAY_BOOL:
312     case value::ARRAY_STRING:                     312     case value::ARRAY_STRING:
313       break;                                      313       break;
314     }                                             314     }
315     aError = std::string("value::assign :")       315     aError = std::string("value::assign :")
316            + " unable to assign " + aV.stype()    316            + " unable to assign " + aV.stype()
317            + " to " + aThis.stype();              317            + " to " + aThis.stype();
318     aThis.set_none();                             318     aThis.set_none();
319     return false;                                 319     return false;
320   }                                               320   }
321 }                                                 321 }
322                                                   322 
323 inline bool value::minus(value& aThis,std::str    323 inline bool value::minus(value& aThis,std::string& aError){
324   value::e_type oType = aThis.m_type;             324   value::e_type oType = aThis.m_type;
325   switch(aThis.m_type) {                          325   switch(aThis.m_type) {
326   case value::INT:                                326   case value::INT:
327     aThis.u.m_int = -aThis.u.m_int;               327     aThis.u.m_int = -aThis.u.m_int;
328     return true;                                  328     return true;
329   case value::DOUBLE:                             329   case value::DOUBLE:
330     aThis.u.m_double = -aThis.u.m_double;         330     aThis.u.m_double = -aThis.u.m_double;
331     return true;                                  331     return true;
332   case value::SHORT:                              332   case value::SHORT:
333     aThis.u.m_short = -aThis.u.m_short;           333     aThis.u.m_short = -aThis.u.m_short;
334     return true;                                  334     return true;
335   case value::INT64:                              335   case value::INT64:
336     aThis.u.m_int64 = -aThis.u.m_int64;           336     aThis.u.m_int64 = -aThis.u.m_int64;
337     return true;                                  337     return true;
338   case value::FLOAT:                              338   case value::FLOAT:
339     aThis.u.m_float = -1.0F * aThis.u.m_float;    339     aThis.u.m_float = -1.0F * aThis.u.m_float;
340     return true;                                  340     return true;
341   case value::ARRAY_DOUBLE:{                      341   case value::ARRAY_DOUBLE:{
342     std::vector<double>& stdv = aThis.u.m_arra    342     std::vector<double>& stdv = aThis.u.m_array_double->vector();
343     size_t number = stdv.size();                  343     size_t number = stdv.size();
344     for(size_t index=0;index<number;index++) s    344     for(size_t index=0;index<number;index++) stdv[index] = -stdv[index];
345     return true;}                                 345     return true;}
346   //case value::CHAR:                             346   //case value::CHAR:
347   //  aThis.u.m_char = -aThis.u.m_char;           347   //  aThis.u.m_char = -aThis.u.m_char;
348   //  return true;                                348   //  return true;
349   //case value::UNSIGNED_CHAR:{                   349   //case value::UNSIGNED_CHAR:{
350   //  char tmp = -1*aThis.u.m_unsigned_char;      350   //  char tmp = -1*aThis.u.m_unsigned_char;
351   //  aThis.set(tmp); //this becomes a value::    351   //  aThis.set(tmp); //this becomes a value::CHAR.
352   //  return true;}                               352   //  return true;}
353   case value::UNSIGNED_SHORT:{                    353   case value::UNSIGNED_SHORT:{
354     short tmp = -1*aThis.u.m_unsigned_short;      354     short tmp = -1*aThis.u.m_unsigned_short;
355     aThis.set(tmp); //this becomes a value::SH    355     aThis.set(tmp); //this becomes a value::SHORT.
356     return true;}                                 356     return true;}
357   case value::UNSIGNED_INT:{                      357   case value::UNSIGNED_INT:{
358     int tmp = -1*aThis.u.m_unsigned_int;          358     int tmp = -1*aThis.u.m_unsigned_int;
359     aThis.set(tmp); //this becomes a value::IN    359     aThis.set(tmp); //this becomes a value::INT.
360     return true;}                                 360     return true;}
361   case value::UNSIGNED_INT64 :{                   361   case value::UNSIGNED_INT64 :{
362     int64 tmp = -1*aThis.u.m_unsigned_int64;      362     int64 tmp = -1*aThis.u.m_unsigned_int64;
363     aThis.set(tmp); //this becomes a value::IN    363     aThis.set(tmp); //this becomes a value::INT64.
364     return true;}                                 364     return true;}
365   case value::BOOL:                               365   case value::BOOL:
366   case value::NONE:                               366   case value::NONE:
367   case value::STRING:                             367   case value::STRING:
368   case value::VOID_STAR:                          368   case value::VOID_STAR:
369   case value::DOUBLE_STAR:                        369   case value::DOUBLE_STAR:
370   case value::FLOAT_STAR:                         370   case value::FLOAT_STAR:
371   case value::INT_STAR:                           371   case value::INT_STAR:
372   //case value::ARRAY_UNSIGNED_CHAR:              372   //case value::ARRAY_UNSIGNED_CHAR:
373   //case value::ARRAY_CHAR:                       373   //case value::ARRAY_CHAR:
374   case value::ARRAY_UNSIGNED_SHORT:               374   case value::ARRAY_UNSIGNED_SHORT:
375   case value::ARRAY_SHORT:                        375   case value::ARRAY_SHORT:
376   case value::ARRAY_UNSIGNED_INT:                 376   case value::ARRAY_UNSIGNED_INT:
377   case value::ARRAY_INT:                          377   case value::ARRAY_INT:
378   case value::ARRAY_UNSIGNED_INT64:               378   case value::ARRAY_UNSIGNED_INT64:
379   case value::ARRAY_INT64:                        379   case value::ARRAY_INT64:
380   case value::ARRAY_FLOAT:                        380   case value::ARRAY_FLOAT:
381   //case value::ARRAY_DOUBLE:                     381   //case value::ARRAY_DOUBLE:
382   case value::ARRAY_BOOL:                         382   case value::ARRAY_BOOL:
383   case value::ARRAY_STRING:                       383   case value::ARRAY_STRING:
384     break;                                        384     break;
385   }                                               385   }
386   aError = std::string("value::minus :")          386   aError = std::string("value::minus :")
387          + " can't apply on type " + value::st    387          + " can't apply on type " + value::stype(oType);
388   aThis.set_none();                               388   aThis.set_none();
389   return false;                                   389   return false;
390 }                                                 390 }
391                                                   391 
392 inline bool value::do_not(value& aThis,std::st    392 inline bool value::do_not(value& aThis,std::string& aError){
393   value::e_type oType = aThis.m_type;             393   value::e_type oType = aThis.m_type;
394   switch(aThis.m_type) {                          394   switch(aThis.m_type) {
395   case value::BOOL:                               395   case value::BOOL:
396     aThis.u.m_bool = aThis.u.m_bool?false:true    396     aThis.u.m_bool = aThis.u.m_bool?false:true;
397     return true;                                  397     return true;
398   case value::INT:                                398   case value::INT:
399   case value::DOUBLE:                             399   case value::DOUBLE:
400   case value::STRING:                             400   case value::STRING:
401   case value::VOID_STAR:                          401   case value::VOID_STAR:
402   case value::UNSIGNED_SHORT :                    402   case value::UNSIGNED_SHORT :
403   case value::UNSIGNED_INT:                       403   case value::UNSIGNED_INT:
404   case value::SHORT:                              404   case value::SHORT:
405   case value::FLOAT:                              405   case value::FLOAT:
406   //case value::UNSIGNED_CHAR:                    406   //case value::UNSIGNED_CHAR:
407   //case value::CHAR:                             407   //case value::CHAR:
408   case value::NONE:                               408   case value::NONE:
409   case value::INT64:                              409   case value::INT64:
410   case value::UNSIGNED_INT64 :                    410   case value::UNSIGNED_INT64 :
411   case value::DOUBLE_STAR:                        411   case value::DOUBLE_STAR:
412   case value::FLOAT_STAR:                         412   case value::FLOAT_STAR:
413   case value::INT_STAR:                           413   case value::INT_STAR:
414   //case value::ARRAY_UNSIGNED_CHAR:              414   //case value::ARRAY_UNSIGNED_CHAR:
415   //case value::ARRAY_CHAR:                       415   //case value::ARRAY_CHAR:
416   case value::ARRAY_UNSIGNED_SHORT:               416   case value::ARRAY_UNSIGNED_SHORT:
417   case value::ARRAY_SHORT:                        417   case value::ARRAY_SHORT:
418   case value::ARRAY_UNSIGNED_INT:                 418   case value::ARRAY_UNSIGNED_INT:
419   case value::ARRAY_INT:                          419   case value::ARRAY_INT:
420   case value::ARRAY_UNSIGNED_INT64:               420   case value::ARRAY_UNSIGNED_INT64:
421   case value::ARRAY_INT64:                        421   case value::ARRAY_INT64:
422   case value::ARRAY_FLOAT:                        422   case value::ARRAY_FLOAT:
423   case value::ARRAY_DOUBLE:                       423   case value::ARRAY_DOUBLE:
424   case value::ARRAY_BOOL:                         424   case value::ARRAY_BOOL:
425   case value::ARRAY_STRING:                       425   case value::ARRAY_STRING:
426     break;                                        426     break;
427   }                                               427   }
428   aError = std::string("value::do_not :")         428   aError = std::string("value::do_not :")
429          + " can't apply on type " + value::st    429          + " can't apply on type " + value::stype(oType);
430   aThis.set_none();                               430   aThis.set_none();
431   return false;                                   431   return false;
432 }                                                 432 }
433                                                   433 
434 //////////////////////////////////////////////    434 //////////////////////////////////////////////////////////////////////////////
435 //////////////////////////////////////////////    435 //////////////////////////////////////////////////////////////////////////////
436 //////////////////////////////////////////////    436 //////////////////////////////////////////////////////////////////////////////
437                                                   437 
438 inline bool value::add(value& aThis,const valu    438 inline bool value::add(value& aThis,const value& aV,std::string& aError){
439   value::e_type oType = aThis.m_type;             439   value::e_type oType = aThis.m_type;
440   switch(aThis.m_type) {                          440   switch(aThis.m_type) {
441   case value::INT:                                441   case value::INT:
442     switch(aV.m_type) {                           442     switch(aV.m_type) {
443     case value::INT:                              443     case value::INT:
444       aThis.u.m_int += aV.u.m_int;                444       aThis.u.m_int += aV.u.m_int;
445       return true;                                445       return true;
446     case value::FLOAT:{                           446     case value::FLOAT:{
447       float tmp = aThis.u.m_int + aV.u.m_float    447       float tmp = aThis.u.m_int + aV.u.m_float;
448       aThis.set(tmp);                             448       aThis.set(tmp);
449       return true;}                               449       return true;}
450     case value::DOUBLE:{                          450     case value::DOUBLE:{
451       double tmp = aThis.u.m_int + aV.u.m_doub    451       double tmp = aThis.u.m_int + aV.u.m_double;
452       aThis.set(tmp);                             452       aThis.set(tmp);
453       return true;}                               453       return true;}
454     case value::ARRAY_DOUBLE:{                    454     case value::ARRAY_DOUBLE:{
455       int tmp = aThis.u.m_int;                    455       int tmp = aThis.u.m_int;
456       //In the below, this becomes a value::AR    456       //In the below, this becomes a value::ARRAY_DOUBLE.
457       aThis.set(aV.u.m_array_double->orders(),    457       aThis.set(aV.u.m_array_double->orders(),
458                 aV.u.m_array_double->vector())    458                 aV.u.m_array_double->vector());
459       aThis.u.m_array_double->add(double(tmp))    459       aThis.u.m_array_double->add(double(tmp));
460       return true;}                               460       return true;}
461     case value::NONE:                             461     case value::NONE:
462     case value::STRING:                           462     case value::STRING:
463     case value::VOID_STAR:                        463     case value::VOID_STAR:
464     case value::BOOL:                             464     case value::BOOL:
465     case value::SHORT:                            465     case value::SHORT:
466     case value::INT64:                            466     case value::INT64:
467     //case value::UNSIGNED_CHAR:                  467     //case value::UNSIGNED_CHAR:
468     //case value::CHAR:                           468     //case value::CHAR:
469     case value::UNSIGNED_SHORT :                  469     case value::UNSIGNED_SHORT :
470     case value::UNSIGNED_INT64 :                  470     case value::UNSIGNED_INT64 :
471     case value::DOUBLE_STAR:                      471     case value::DOUBLE_STAR:
472     case value::FLOAT_STAR:                       472     case value::FLOAT_STAR:
473     case value::INT_STAR:                         473     case value::INT_STAR:
474     case value::UNSIGNED_INT:                     474     case value::UNSIGNED_INT:
475     //case value::ARRAY_UNSIGNED_CHAR:            475     //case value::ARRAY_UNSIGNED_CHAR:
476     //case value::ARRAY_CHAR:                     476     //case value::ARRAY_CHAR:
477     case value::ARRAY_UNSIGNED_SHORT:             477     case value::ARRAY_UNSIGNED_SHORT:
478     case value::ARRAY_SHORT:                      478     case value::ARRAY_SHORT:
479     case value::ARRAY_UNSIGNED_INT:               479     case value::ARRAY_UNSIGNED_INT:
480     case value::ARRAY_INT:                        480     case value::ARRAY_INT:
481     case value::ARRAY_UNSIGNED_INT64:             481     case value::ARRAY_UNSIGNED_INT64:
482     case value::ARRAY_INT64:                      482     case value::ARRAY_INT64:
483     case value::ARRAY_FLOAT:                      483     case value::ARRAY_FLOAT:
484     //case value::ARRAY_DOUBLE:                   484     //case value::ARRAY_DOUBLE:
485     case value::ARRAY_BOOL:                       485     case value::ARRAY_BOOL:
486     case value::ARRAY_STRING:                     486     case value::ARRAY_STRING:
487       break;                                      487       break;
488     }                                             488     }
489     break;                                        489     break;
490   case value::FLOAT:                              490   case value::FLOAT:
491     switch(aV.m_type) {                           491     switch(aV.m_type) {
492     case value::UNSIGNED_SHORT :                  492     case value::UNSIGNED_SHORT :
493       aThis.u.m_float += aV.u.m_unsigned_short    493       aThis.u.m_float += aV.u.m_unsigned_short;
494       return true;                                494       return true;
495     case value::UNSIGNED_INT:                     495     case value::UNSIGNED_INT:
496       aThis.u.m_float += aV.u.m_unsigned_int;     496       aThis.u.m_float += aV.u.m_unsigned_int;
497       return true;                                497       return true;
498     case value::SHORT:                            498     case value::SHORT:
499       aThis.u.m_float += aV.u.m_short;            499       aThis.u.m_float += aV.u.m_short;
500       return true;                                500       return true;
501     case value::INT:                              501     case value::INT:
502       aThis.u.m_float += aV.u.m_int;              502       aThis.u.m_float += aV.u.m_int;
503       return true;                                503       return true;
504     case value::FLOAT:                            504     case value::FLOAT:
505       aThis.u.m_float += aV.u.m_float;            505       aThis.u.m_float += aV.u.m_float;
506       return true;                                506       return true;
507     case value::DOUBLE:                           507     case value::DOUBLE:
508       aThis.u.m_float += (float)aV.u.m_double;    508       aThis.u.m_float += (float)aV.u.m_double;
509       return true;                                509       return true;
510     case value::ARRAY_DOUBLE:{                    510     case value::ARRAY_DOUBLE:{
511       double tmp = aThis.u.m_float;               511       double tmp = aThis.u.m_float;
512       //In the below this becomes a value::ARR    512       //In the below this becomes a value::ARRAY_DOUBLE.
513       aThis.set(aV.u.m_array_double->orders(),    513       aThis.set(aV.u.m_array_double->orders(),
514                 aV.u.m_array_double->vector())    514                 aV.u.m_array_double->vector());
515       aThis.u.m_array_double->add(tmp);           515       aThis.u.m_array_double->add(tmp);
516       return true;}                               516       return true;}
517     case value::NONE:                             517     case value::NONE:
518     case value::STRING:                           518     case value::STRING:
519     case value::VOID_STAR:                        519     case value::VOID_STAR:
520     case value::BOOL:                             520     case value::BOOL:
521     case value::INT64:                            521     case value::INT64:
522     //case value::UNSIGNED_CHAR:                  522     //case value::UNSIGNED_CHAR:
523     //case value::CHAR:                           523     //case value::CHAR:
524     case value::UNSIGNED_INT64 :                  524     case value::UNSIGNED_INT64 :
525     case value::DOUBLE_STAR:                      525     case value::DOUBLE_STAR:
526     case value::FLOAT_STAR:                       526     case value::FLOAT_STAR:
527     case value::INT_STAR:                         527     case value::INT_STAR:
528     //case value::ARRAY_UNSIGNED_CHAR:            528     //case value::ARRAY_UNSIGNED_CHAR:
529     //case value::ARRAY_CHAR:                     529     //case value::ARRAY_CHAR:
530     case value::ARRAY_UNSIGNED_SHORT:             530     case value::ARRAY_UNSIGNED_SHORT:
531     case value::ARRAY_SHORT:                      531     case value::ARRAY_SHORT:
532     case value::ARRAY_UNSIGNED_INT:               532     case value::ARRAY_UNSIGNED_INT:
533     case value::ARRAY_INT:                        533     case value::ARRAY_INT:
534     case value::ARRAY_UNSIGNED_INT64:             534     case value::ARRAY_UNSIGNED_INT64:
535     case value::ARRAY_INT64:                      535     case value::ARRAY_INT64:
536     case value::ARRAY_FLOAT:                      536     case value::ARRAY_FLOAT:
537     //case value::ARRAY_DOUBLE:                   537     //case value::ARRAY_DOUBLE:
538     case value::ARRAY_BOOL:                       538     case value::ARRAY_BOOL:
539     case value::ARRAY_STRING:                     539     case value::ARRAY_STRING:
540       break;                                      540       break;
541     }                                             541     }
542     break;                                        542     break;
543   case value::DOUBLE:                             543   case value::DOUBLE:
544     switch(aV.m_type) {                           544     switch(aV.m_type) {
545     case value::SHORT:                            545     case value::SHORT:
546       aThis.u.m_double += aV.u.m_short;           546       aThis.u.m_double += aV.u.m_short;
547       return true;                                547       return true;
548     case value::INT:                              548     case value::INT:
549       aThis.u.m_double += aV.u.m_int;             549       aThis.u.m_double += aV.u.m_int;
550       return true;                                550       return true;
551     case value::FLOAT:                            551     case value::FLOAT:
552       aThis.u.m_double += aV.u.m_float;           552       aThis.u.m_double += aV.u.m_float;
553       return true;                                553       return true;
554     case value::DOUBLE:                           554     case value::DOUBLE:
555       aThis.u.m_double += aV.u.m_double;          555       aThis.u.m_double += aV.u.m_double;
556       return true;                                556       return true;
557     case value::UNSIGNED_SHORT :                  557     case value::UNSIGNED_SHORT :
558       aThis.u.m_double += aV.u.m_unsigned_shor    558       aThis.u.m_double += aV.u.m_unsigned_short;
559       return true;                                559       return true;
560     case value::UNSIGNED_INT:                     560     case value::UNSIGNED_INT:
561       aThis.u.m_double += aV.u.m_unsigned_int;    561       aThis.u.m_double += aV.u.m_unsigned_int;
562       return true;                                562       return true;
563     case value::ARRAY_DOUBLE:{                    563     case value::ARRAY_DOUBLE:{
564       double tmp = aThis.u.m_double;              564       double tmp = aThis.u.m_double;
565       //In the below this becomes a value::ARR    565       //In the below this becomes a value::ARRAY_DOUBLE.
566       aThis.set(aV.u.m_array_double->orders(),    566       aThis.set(aV.u.m_array_double->orders(),
567                 aV.u.m_array_double->vector())    567                 aV.u.m_array_double->vector());
568       aThis.u.m_array_double->add(tmp);           568       aThis.u.m_array_double->add(tmp);
569       return true;}                               569       return true;}
570     case value::NONE:                             570     case value::NONE:
571     case value::STRING:                           571     case value::STRING:
572     case value::VOID_STAR:                        572     case value::VOID_STAR:
573     case value::BOOL:                             573     case value::BOOL:
574     case value::INT64:                            574     case value::INT64:
575     //case value::UNSIGNED_CHAR:                  575     //case value::UNSIGNED_CHAR:
576     //case value::CHAR:                           576     //case value::CHAR:
577     case value::UNSIGNED_INT64 :                  577     case value::UNSIGNED_INT64 :
578     case value::DOUBLE_STAR:                      578     case value::DOUBLE_STAR:
579     case value::FLOAT_STAR:                       579     case value::FLOAT_STAR:
580     case value::INT_STAR:                         580     case value::INT_STAR:
581     //case value::ARRAY_UNSIGNED_CHAR:            581     //case value::ARRAY_UNSIGNED_CHAR:
582     //case value::ARRAY_CHAR:                     582     //case value::ARRAY_CHAR:
583     case value::ARRAY_UNSIGNED_SHORT:             583     case value::ARRAY_UNSIGNED_SHORT:
584     case value::ARRAY_SHORT:                      584     case value::ARRAY_SHORT:
585     case value::ARRAY_UNSIGNED_INT:               585     case value::ARRAY_UNSIGNED_INT:
586     case value::ARRAY_INT:                        586     case value::ARRAY_INT:
587     case value::ARRAY_UNSIGNED_INT64:             587     case value::ARRAY_UNSIGNED_INT64:
588     case value::ARRAY_INT64:                      588     case value::ARRAY_INT64:
589     case value::ARRAY_FLOAT:                      589     case value::ARRAY_FLOAT:
590     //case value::ARRAY_DOUBLE:                   590     //case value::ARRAY_DOUBLE:
591     case value::ARRAY_BOOL:                       591     case value::ARRAY_BOOL:
592     case value::ARRAY_STRING:                     592     case value::ARRAY_STRING:
593       break;                                      593       break;
594     }                                             594     }
595     break;                                        595     break;
596   case value::UNSIGNED_INT:                       596   case value::UNSIGNED_INT:
597     switch(aV.m_type) {                           597     switch(aV.m_type) {
598     case value::UNSIGNED_INT:                     598     case value::UNSIGNED_INT:
599       aThis.u.m_unsigned_int += aV.u.m_unsigne    599       aThis.u.m_unsigned_int += aV.u.m_unsigned_int;
600       return true;                                600       return true;
601     case value::INT:{                             601     case value::INT:{
602       int tmp = aThis.u.m_unsigned_int + aV.u.    602       int tmp = aThis.u.m_unsigned_int + aV.u.m_int;
603       aThis.set(tmp);                             603       aThis.set(tmp);
604       return true;}                               604       return true;}
605     case value::FLOAT:{                           605     case value::FLOAT:{
606       float tmp = float(aThis.u.m_unsigned_int    606       float tmp = float(aThis.u.m_unsigned_int) + aV.u.m_float;
607       aThis.set(tmp);                             607       aThis.set(tmp);
608       return true;}                               608       return true;}
609     case value::DOUBLE:{                          609     case value::DOUBLE:{
610       double tmp = double(aThis.u.m_unsigned_i    610       double tmp = double(aThis.u.m_unsigned_int) + aV.u.m_double;
611       aThis.set(tmp);                             611       aThis.set(tmp);
612       return true;}                               612       return true;}
613     case value::ARRAY_DOUBLE:{                    613     case value::ARRAY_DOUBLE:{
614       unsigned int tmp = aThis.u.m_unsigned_in    614       unsigned int tmp = aThis.u.m_unsigned_int;
615       //In the below this becomes a value::ARR    615       //In the below this becomes a value::ARRAY_DOUBLE.
616       aThis.set(aV.u.m_array_double->orders(),    616       aThis.set(aV.u.m_array_double->orders(),
617                 aV.u.m_array_double->vector())    617                 aV.u.m_array_double->vector());
618       aThis.u.m_array_double->add(double(tmp))    618       aThis.u.m_array_double->add(double(tmp));
619       return true;}                               619       return true;}
620     case value::NONE:                             620     case value::NONE:
621     case value::STRING:                           621     case value::STRING:
622     case value::VOID_STAR:                        622     case value::VOID_STAR:
623     case value::BOOL:                             623     case value::BOOL:
624     case value::SHORT:                            624     case value::SHORT:
625     case value::INT64:                            625     case value::INT64:
626     //case value::UNSIGNED_CHAR:                  626     //case value::UNSIGNED_CHAR:
627     //case value::CHAR:                           627     //case value::CHAR:
628     case value::UNSIGNED_SHORT :                  628     case value::UNSIGNED_SHORT :
629     case value::UNSIGNED_INT64 :                  629     case value::UNSIGNED_INT64 :
630     case value::DOUBLE_STAR:                      630     case value::DOUBLE_STAR:
631     case value::FLOAT_STAR:                       631     case value::FLOAT_STAR:
632     case value::INT_STAR:                         632     case value::INT_STAR:
633     //case value::ARRAY_UNSIGNED_CHAR:            633     //case value::ARRAY_UNSIGNED_CHAR:
634     //case value::ARRAY_CHAR:                     634     //case value::ARRAY_CHAR:
635     case value::ARRAY_UNSIGNED_SHORT:             635     case value::ARRAY_UNSIGNED_SHORT:
636     case value::ARRAY_SHORT:                      636     case value::ARRAY_SHORT:
637     case value::ARRAY_UNSIGNED_INT:               637     case value::ARRAY_UNSIGNED_INT:
638     case value::ARRAY_INT:                        638     case value::ARRAY_INT:
639     case value::ARRAY_UNSIGNED_INT64:             639     case value::ARRAY_UNSIGNED_INT64:
640     case value::ARRAY_INT64:                      640     case value::ARRAY_INT64:
641     case value::ARRAY_FLOAT:                      641     case value::ARRAY_FLOAT:
642     //case value::ARRAY_DOUBLE:                   642     //case value::ARRAY_DOUBLE:
643     case value::ARRAY_BOOL:                       643     case value::ARRAY_BOOL:
644     case value::ARRAY_STRING:                     644     case value::ARRAY_STRING:
645       break;                                      645       break;
646     }                                             646     }
647     break;                                        647     break;
648   case value::STRING:                             648   case value::STRING:
649     switch(aV.m_type) {                           649     switch(aV.m_type) {
650     case value::STRING:                           650     case value::STRING:
651       aThis.set((*aThis.u.m_string)+(*aV.u.m_s    651       aThis.set((*aThis.u.m_string)+(*aV.u.m_string));
652       return true;                                652       return true;
653     case value::NONE:                             653     case value::NONE:
654     case value::INT:                              654     case value::INT:
655     case value::DOUBLE:                           655     case value::DOUBLE:
656     case value::VOID_STAR:                        656     case value::VOID_STAR:
657     case value::BOOL:                             657     case value::BOOL:
658     case value::SHORT:                            658     case value::SHORT:
659     case value::INT64:                            659     case value::INT64:
660     case value::FLOAT:                            660     case value::FLOAT:
661     //case value::UNSIGNED_CHAR:                  661     //case value::UNSIGNED_CHAR:
662     //case value::CHAR:                           662     //case value::CHAR:
663     case value::UNSIGNED_SHORT :                  663     case value::UNSIGNED_SHORT :
664     case value::UNSIGNED_INT:                     664     case value::UNSIGNED_INT:
665     case value::UNSIGNED_INT64 :                  665     case value::UNSIGNED_INT64 :
666     case value::DOUBLE_STAR:                      666     case value::DOUBLE_STAR:
667     case value::FLOAT_STAR:                       667     case value::FLOAT_STAR:
668     case value::INT_STAR:                         668     case value::INT_STAR:
669     //case value::ARRAY_UNSIGNED_CHAR:            669     //case value::ARRAY_UNSIGNED_CHAR:
670     //case value::ARRAY_CHAR:                     670     //case value::ARRAY_CHAR:
671     case value::ARRAY_UNSIGNED_SHORT:             671     case value::ARRAY_UNSIGNED_SHORT:
672     case value::ARRAY_SHORT:                      672     case value::ARRAY_SHORT:
673     case value::ARRAY_UNSIGNED_INT:               673     case value::ARRAY_UNSIGNED_INT:
674     case value::ARRAY_INT:                        674     case value::ARRAY_INT:
675     case value::ARRAY_UNSIGNED_INT64:             675     case value::ARRAY_UNSIGNED_INT64:
676     case value::ARRAY_INT64:                      676     case value::ARRAY_INT64:
677     case value::ARRAY_FLOAT:                      677     case value::ARRAY_FLOAT:
678     case value::ARRAY_DOUBLE:                     678     case value::ARRAY_DOUBLE:
679     case value::ARRAY_BOOL:                       679     case value::ARRAY_BOOL:
680     case value::ARRAY_STRING:                     680     case value::ARRAY_STRING:
681       break;                                      681       break;
682     }                                             682     }
683     break;                                        683     break;
684   case value::ARRAY_DOUBLE:                       684   case value::ARRAY_DOUBLE:
685     switch(aV.m_type) {                           685     switch(aV.m_type) {
686     case value::INT:                              686     case value::INT:
687       aThis.u.m_array_double->add(aV.u.m_int);    687       aThis.u.m_array_double->add(aV.u.m_int);
688       return true;                                688       return true;
689     case value::UNSIGNED_INT:                     689     case value::UNSIGNED_INT:
690       aThis.u.m_array_double->add(aV.u.m_unsig    690       aThis.u.m_array_double->add(aV.u.m_unsigned_int);
691       return true;                                691       return true;
692     case value::DOUBLE:                           692     case value::DOUBLE:
693       aThis.u.m_array_double->add(aV.u.m_doubl    693       aThis.u.m_array_double->add(aV.u.m_double);
694       return true;                                694       return true;
695     case value::ARRAY_DOUBLE:                     695     case value::ARRAY_DOUBLE:
696       if(aThis.u.m_array_double->orders()!=aV.    696       if(aThis.u.m_array_double->orders()!=aV.u.m_array_double->orders()) {
697         aError = "Value::add : vector orders m    697         aError = "Value::add : vector orders mismatch.";
698         aThis.set_none();                         698         aThis.set_none();
699         return false;                             699         return false;
700       }                                           700       }
701       aThis.u.m_array_double->add(*aV.u.m_arra    701       aThis.u.m_array_double->add(*aV.u.m_array_double);
702       return true;                                702       return true;
703     case value::NONE:                             703     case value::NONE:
704     case value::VOID_STAR:                        704     case value::VOID_STAR:
705     case value::BOOL:                             705     case value::BOOL:
706     case value::SHORT:                            706     case value::SHORT:
707     case value::INT64:                            707     case value::INT64:
708     case value::FLOAT:                            708     case value::FLOAT:
709     //case value::UNSIGNED_CHAR:                  709     //case value::UNSIGNED_CHAR:
710     //case value::CHAR:                           710     //case value::CHAR:
711     case value::UNSIGNED_SHORT :                  711     case value::UNSIGNED_SHORT :
712     case value::UNSIGNED_INT64 :                  712     case value::UNSIGNED_INT64 :
713     case value::DOUBLE_STAR:                      713     case value::DOUBLE_STAR:
714     case value::FLOAT_STAR:                       714     case value::FLOAT_STAR:
715     case value::INT_STAR:                         715     case value::INT_STAR:
716     case value::STRING:                           716     case value::STRING:
717     //case value::ARRAY_UNSIGNED_CHAR:            717     //case value::ARRAY_UNSIGNED_CHAR:
718     //case value::ARRAY_CHAR:                     718     //case value::ARRAY_CHAR:
719     case value::ARRAY_UNSIGNED_SHORT:             719     case value::ARRAY_UNSIGNED_SHORT:
720     case value::ARRAY_SHORT:                      720     case value::ARRAY_SHORT:
721     case value::ARRAY_UNSIGNED_INT:               721     case value::ARRAY_UNSIGNED_INT:
722     case value::ARRAY_INT:                        722     case value::ARRAY_INT:
723     case value::ARRAY_UNSIGNED_INT64:             723     case value::ARRAY_UNSIGNED_INT64:
724     case value::ARRAY_INT64:                      724     case value::ARRAY_INT64:
725     case value::ARRAY_FLOAT:                      725     case value::ARRAY_FLOAT:
726     //case value::ARRAY_DOUBLE:                   726     //case value::ARRAY_DOUBLE:
727     case value::ARRAY_BOOL:                       727     case value::ARRAY_BOOL:
728     case value::ARRAY_STRING:                     728     case value::ARRAY_STRING:
729       break;                                      729       break;
730     }                                             730     }
731     break;                                        731     break;
732   case value::NONE:                               732   case value::NONE:
733   case value::VOID_STAR:                          733   case value::VOID_STAR:
734   case value::BOOL:                               734   case value::BOOL:
735   case value::SHORT:                              735   case value::SHORT:
736   case value::INT64:                              736   case value::INT64:
737   //case value::UNSIGNED_CHAR:                    737   //case value::UNSIGNED_CHAR:
738   //case value::CHAR:                             738   //case value::CHAR:
739   case value::UNSIGNED_SHORT :                    739   case value::UNSIGNED_SHORT :
740   case value::UNSIGNED_INT64 :                    740   case value::UNSIGNED_INT64 :
741   case value::DOUBLE_STAR:                        741   case value::DOUBLE_STAR:
742   case value::FLOAT_STAR:                         742   case value::FLOAT_STAR:
743   case value::INT_STAR:                           743   case value::INT_STAR:
744   //case value::ARRAY_UNSIGNED_CHAR:              744   //case value::ARRAY_UNSIGNED_CHAR:
745   //case value::ARRAY_CHAR:                       745   //case value::ARRAY_CHAR:
746   case value::ARRAY_UNSIGNED_SHORT:               746   case value::ARRAY_UNSIGNED_SHORT:
747   case value::ARRAY_SHORT:                        747   case value::ARRAY_SHORT:
748   case value::ARRAY_UNSIGNED_INT:                 748   case value::ARRAY_UNSIGNED_INT:
749   case value::ARRAY_INT:                          749   case value::ARRAY_INT:
750   case value::ARRAY_UNSIGNED_INT64:               750   case value::ARRAY_UNSIGNED_INT64:
751   case value::ARRAY_INT64:                        751   case value::ARRAY_INT64:
752   case value::ARRAY_FLOAT:                        752   case value::ARRAY_FLOAT:
753   //case value::ARRAY_DOUBLE:                     753   //case value::ARRAY_DOUBLE:
754   case value::ARRAY_BOOL:                         754   case value::ARRAY_BOOL:
755   case value::ARRAY_STRING:                       755   case value::ARRAY_STRING:
756     break;                                        756     break;
757   }                                               757   }
758   aError = std::string("Value::add :" )           758   aError = std::string("Value::add :" )
759          + " can't apply on type " + value::st    759          + " can't apply on type " + value::stype(oType)
760          + " and type " + aV.stype();             760          + " and type " + aV.stype();
761   aThis.set_none();                               761   aThis.set_none();
762   return false;                                   762   return false;
763 }                                                 763 }
764                                                   764 
765 inline bool value::subtract(value& aThis,const    765 inline bool value::subtract(value& aThis,const value& aV,std::string& aError){
766   value::e_type oType = aThis.m_type;             766   value::e_type oType = aThis.m_type;
767   switch(aThis.m_type) {                          767   switch(aThis.m_type) {
768   case value::INT:                                768   case value::INT:
769     switch(aV.m_type) {                           769     switch(aV.m_type) {
770     case value::INT:                              770     case value::INT:
771       aThis.u.m_int -= aV.u.m_int;                771       aThis.u.m_int -= aV.u.m_int;
772       return true;                                772       return true;
773     case value::DOUBLE:{                          773     case value::DOUBLE:{
774       double tmp = aThis.u.m_int - aV.u.m_doub    774       double tmp = aThis.u.m_int - aV.u.m_double;
775       aThis.set(tmp);                             775       aThis.set(tmp);
776       return true;}                               776       return true;}
777     case value::FLOAT:{                           777     case value::FLOAT:{
778       float tmp = aThis.u.m_int - aV.u.m_float    778       float tmp = aThis.u.m_int - aV.u.m_float;
779       aThis.set(tmp);                             779       aThis.set(tmp);
780       return true;}                               780       return true;}
781     case value::ARRAY_DOUBLE:{                    781     case value::ARRAY_DOUBLE:{
782       int tmp = aThis.u.m_int;                    782       int tmp = aThis.u.m_int;
783       //In the below, this becomes a value::AR    783       //In the below, this becomes a value::ARRAY_DOUBLE.
784       aThis.set(aV.u.m_array_double->orders(),    784       aThis.set(aV.u.m_array_double->orders(),
785                 aV.u.m_array_double->vector())    785                 aV.u.m_array_double->vector());
786       aThis.u.m_array_double->multiply(-1);       786       aThis.u.m_array_double->multiply(-1);
787       aThis.u.m_array_double->add(double(tmp))    787       aThis.u.m_array_double->add(double(tmp));
788       return true;}                               788       return true;}
789     case value::NONE:                             789     case value::NONE:
790     case value::VOID_STAR:                        790     case value::VOID_STAR:
791     case value::BOOL:                             791     case value::BOOL:
792     case value::SHORT:                            792     case value::SHORT:
793     case value::INT64:                            793     case value::INT64:
794     //case value::UNSIGNED_CHAR:                  794     //case value::UNSIGNED_CHAR:
795     //case value::CHAR:                           795     //case value::CHAR:
796     case value::UNSIGNED_SHORT :                  796     case value::UNSIGNED_SHORT :
797     case value::UNSIGNED_INT:                     797     case value::UNSIGNED_INT:
798     case value::UNSIGNED_INT64 :                  798     case value::UNSIGNED_INT64 :
799     case value::DOUBLE_STAR:                      799     case value::DOUBLE_STAR:
800     case value::FLOAT_STAR:                       800     case value::FLOAT_STAR:
801     case value::INT_STAR:                         801     case value::INT_STAR:
802     case value::STRING:                           802     case value::STRING:
803     //case value::ARRAY_UNSIGNED_CHAR:            803     //case value::ARRAY_UNSIGNED_CHAR:
804     //case value::ARRAY_CHAR:                     804     //case value::ARRAY_CHAR:
805     case value::ARRAY_UNSIGNED_SHORT:             805     case value::ARRAY_UNSIGNED_SHORT:
806     case value::ARRAY_SHORT:                      806     case value::ARRAY_SHORT:
807     case value::ARRAY_UNSIGNED_INT:               807     case value::ARRAY_UNSIGNED_INT:
808     case value::ARRAY_INT:                        808     case value::ARRAY_INT:
809     case value::ARRAY_UNSIGNED_INT64:             809     case value::ARRAY_UNSIGNED_INT64:
810     case value::ARRAY_INT64:                      810     case value::ARRAY_INT64:
811     case value::ARRAY_FLOAT:                      811     case value::ARRAY_FLOAT:
812     //case value::ARRAY_DOUBLE:                   812     //case value::ARRAY_DOUBLE:
813     case value::ARRAY_BOOL:                       813     case value::ARRAY_BOOL:
814     case value::ARRAY_STRING:                     814     case value::ARRAY_STRING:
815       break;                                      815       break;
816     }                                             816     }
817     break;                                        817     break;
818   case value::FLOAT:                              818   case value::FLOAT:
819     switch(aV.m_type) {                           819     switch(aV.m_type) {
820     case value::DOUBLE:{                          820     case value::DOUBLE:{
821       double tmp = double(aThis.u.m_float) - a    821       double tmp = double(aThis.u.m_float) - aV.u.m_double;
822       aThis.set(tmp);                             822       aThis.set(tmp);
823       return true;}                               823       return true;}
824     case value::UNSIGNED_SHORT :                  824     case value::UNSIGNED_SHORT :
825       aThis.u.m_float -= aV.u.m_unsigned_short    825       aThis.u.m_float -= aV.u.m_unsigned_short;
826       return true;                                826       return true;
827     case value::UNSIGNED_INT:                     827     case value::UNSIGNED_INT:
828       aThis.u.m_float -= aV.u.m_unsigned_int;     828       aThis.u.m_float -= aV.u.m_unsigned_int;
829       return true;                                829       return true;
830     case value::INT:                              830     case value::INT:
831       aThis.u.m_float -= aV.u.m_int;              831       aThis.u.m_float -= aV.u.m_int;
832       return true;                                832       return true;
833     case value::SHORT:                            833     case value::SHORT:
834       aThis.u.m_float -= aV.u.m_short;            834       aThis.u.m_float -= aV.u.m_short;
835       return true;                                835       return true;
836     case value::FLOAT:                            836     case value::FLOAT:
837       aThis.u.m_float -= aV.u.m_float;            837       aThis.u.m_float -= aV.u.m_float;
838       return true;                                838       return true;
839     case value::INT64:{                           839     case value::INT64:{
840       double tmp = double(aThis.u.m_float) - a    840       double tmp = double(aThis.u.m_float) - aV.u.m_int64;
841       aThis.set(tmp);                             841       aThis.set(tmp);
842       return true;}                               842       return true;}
843     case value::UNSIGNED_INT64:{                  843     case value::UNSIGNED_INT64:{
844       double tmp = double(aThis.u.m_float) - a    844       double tmp = double(aThis.u.m_float) - aV.u.m_unsigned_int64;
845       aThis.set(tmp);                             845       aThis.set(tmp);
846       return true;}                               846       return true;}
847     case value::ARRAY_DOUBLE:{                    847     case value::ARRAY_DOUBLE:{
848       double tmp = aThis.u.m_float;               848       double tmp = aThis.u.m_float;
849       //In the below, this becomes a value::AR    849       //In the below, this becomes a value::ARRAY_DOUBLE.
850       aThis.set(aV.u.m_array_double->orders(),    850       aThis.set(aV.u.m_array_double->orders(),
851                 aV.u.m_array_double->vector())    851                 aV.u.m_array_double->vector());
852       aThis.u.m_array_double->multiply(-1);       852       aThis.u.m_array_double->multiply(-1);
853       aThis.u.m_array_double->add(tmp);           853       aThis.u.m_array_double->add(tmp);
854       return true;}                               854       return true;}
855     case value::NONE:                             855     case value::NONE:
856     case value::VOID_STAR:                        856     case value::VOID_STAR:
857     case value::BOOL:                             857     case value::BOOL:
858     //case value::UNSIGNED_CHAR:                  858     //case value::UNSIGNED_CHAR:
859     //case value::CHAR:                           859     //case value::CHAR:
860     case value::DOUBLE_STAR:                      860     case value::DOUBLE_STAR:
861     case value::FLOAT_STAR:                       861     case value::FLOAT_STAR:
862     case value::INT_STAR:                         862     case value::INT_STAR:
863     case value::STRING:                           863     case value::STRING:
864     //case value::ARRAY_UNSIGNED_CHAR:            864     //case value::ARRAY_UNSIGNED_CHAR:
865     //case value::ARRAY_CHAR:                     865     //case value::ARRAY_CHAR:
866     case value::ARRAY_UNSIGNED_SHORT:             866     case value::ARRAY_UNSIGNED_SHORT:
867     case value::ARRAY_SHORT:                      867     case value::ARRAY_SHORT:
868     case value::ARRAY_UNSIGNED_INT:               868     case value::ARRAY_UNSIGNED_INT:
869     case value::ARRAY_INT:                        869     case value::ARRAY_INT:
870     case value::ARRAY_UNSIGNED_INT64:             870     case value::ARRAY_UNSIGNED_INT64:
871     case value::ARRAY_INT64:                      871     case value::ARRAY_INT64:
872     case value::ARRAY_FLOAT:                      872     case value::ARRAY_FLOAT:
873     //case value::ARRAY_DOUBLE:                   873     //case value::ARRAY_DOUBLE:
874     case value::ARRAY_BOOL:                       874     case value::ARRAY_BOOL:
875     case value::ARRAY_STRING:                     875     case value::ARRAY_STRING:
876       break;                                      876       break;
877     }                                             877     }
878     break;                                        878     break;
879   case value::DOUBLE:                             879   case value::DOUBLE:
880     switch(aV.m_type) {                           880     switch(aV.m_type) {
881     case value::DOUBLE:                           881     case value::DOUBLE:
882       aThis.u.m_double -= aV.u.m_double;          882       aThis.u.m_double -= aV.u.m_double;
883       return true;                                883       return true;
884     case value::UNSIGNED_SHORT :                  884     case value::UNSIGNED_SHORT :
885       aThis.u.m_double -= aV.u.m_unsigned_shor    885       aThis.u.m_double -= aV.u.m_unsigned_short;
886       return true;                                886       return true;
887     case value::UNSIGNED_INT:                     887     case value::UNSIGNED_INT:
888       aThis.u.m_double -= aV.u.m_unsigned_int;    888       aThis.u.m_double -= aV.u.m_unsigned_int;
889       return true;                                889       return true;
890     case value::INT:                              890     case value::INT:
891       aThis.u.m_double -= aV.u.m_int;             891       aThis.u.m_double -= aV.u.m_int;
892       return true;                                892       return true;
893     case value::SHORT:                            893     case value::SHORT:
894       aThis.u.m_double -= aV.u.m_short;           894       aThis.u.m_double -= aV.u.m_short;
895       return true;                                895       return true;
896     case value::INT64:                            896     case value::INT64:
897       aThis.u.m_double -= aV.u.m_int64;           897       aThis.u.m_double -= aV.u.m_int64;
898       return true;                                898       return true;
899     case value::FLOAT:                            899     case value::FLOAT:
900       aThis.u.m_double -= aV.u.m_float;           900       aThis.u.m_double -= aV.u.m_float;
901       return true;                                901       return true;
902     case value::UNSIGNED_INT64 :                  902     case value::UNSIGNED_INT64 :
903       aThis.u.m_double -= aV.u.m_unsigned_int6    903       aThis.u.m_double -= aV.u.m_unsigned_int64;
904       return true;                                904       return true;
905     case value::ARRAY_DOUBLE:{                    905     case value::ARRAY_DOUBLE:{
906       double tmp = aThis.u.m_double;              906       double tmp = aThis.u.m_double;
907       //In the below, this becomes a value::AR    907       //In the below, this becomes a value::ARRAY_DOUBLE.
908       aThis.set(aV.u.m_array_double->orders(),    908       aThis.set(aV.u.m_array_double->orders(),
909                 aV.u.m_array_double->vector())    909                 aV.u.m_array_double->vector());
910       aThis.u.m_array_double->multiply(-1);       910       aThis.u.m_array_double->multiply(-1);
911       aThis.u.m_array_double->add(tmp);           911       aThis.u.m_array_double->add(tmp);
912       return true;}                               912       return true;}
913     case value::NONE:                             913     case value::NONE:
914     case value::VOID_STAR:                        914     case value::VOID_STAR:
915     case value::BOOL:                             915     case value::BOOL:
916     //case value::UNSIGNED_CHAR:                  916     //case value::UNSIGNED_CHAR:
917     //case value::CHAR:                           917     //case value::CHAR:
918     case value::DOUBLE_STAR:                      918     case value::DOUBLE_STAR:
919     case value::FLOAT_STAR:                       919     case value::FLOAT_STAR:
920     case value::INT_STAR:                         920     case value::INT_STAR:
921     case value::STRING:                           921     case value::STRING:
922     //case value::ARRAY_UNSIGNED_CHAR:            922     //case value::ARRAY_UNSIGNED_CHAR:
923     //case value::ARRAY_CHAR:                     923     //case value::ARRAY_CHAR:
924     case value::ARRAY_UNSIGNED_SHORT:             924     case value::ARRAY_UNSIGNED_SHORT:
925     case value::ARRAY_SHORT:                      925     case value::ARRAY_SHORT:
926     case value::ARRAY_UNSIGNED_INT:               926     case value::ARRAY_UNSIGNED_INT:
927     case value::ARRAY_INT:                        927     case value::ARRAY_INT:
928     case value::ARRAY_UNSIGNED_INT64:             928     case value::ARRAY_UNSIGNED_INT64:
929     case value::ARRAY_INT64:                      929     case value::ARRAY_INT64:
930     case value::ARRAY_FLOAT:                      930     case value::ARRAY_FLOAT:
931     //case value::ARRAY_DOUBLE:                   931     //case value::ARRAY_DOUBLE:
932     case value::ARRAY_BOOL:                       932     case value::ARRAY_BOOL:
933     case value::ARRAY_STRING:                     933     case value::ARRAY_STRING:
934       break;                                      934       break;
935     }                                             935     }
936     break;                                        936     break;
937   case value::UNSIGNED_INT:                       937   case value::UNSIGNED_INT:
938     switch(aV.m_type) {                           938     switch(aV.m_type) {
939     case value::UNSIGNED_INT:                     939     case value::UNSIGNED_INT:
940       if(aThis.u.m_unsigned_int>=aV.u.m_unsign    940       if(aThis.u.m_unsigned_int>=aV.u.m_unsigned_int) {
941         aThis.u.m_unsigned_int -= aV.u.m_unsig    941         aThis.u.m_unsigned_int -= aV.u.m_unsigned_int;
942       } else {                                    942       } else {
943         int i = int(aThis.u.m_unsigned_int) -     943         int i = int(aThis.u.m_unsigned_int) - aV.u.m_unsigned_int;
944         aThis.set(i);                             944         aThis.set(i);
945       }                                           945       }
946       return true;                                946       return true;
947     case value::DOUBLE:{                          947     case value::DOUBLE:{
948       double d = double(aThis.u.m_unsigned_int    948       double d = double(aThis.u.m_unsigned_int) - aV.u.m_double;
949       aThis.set(d);                               949       aThis.set(d);
950       return true;}                               950       return true;}
951     case value::FLOAT:{                           951     case value::FLOAT:{
952       float d = float(aThis.u.m_unsigned_int)     952       float d = float(aThis.u.m_unsigned_int) - aV.u.m_float;
953       aThis.set(d);                               953       aThis.set(d);
954       return true;}                               954       return true;}
955     case value::INT:{                             955     case value::INT:{
956       int d = int(aThis.u.m_unsigned_int) - aV    956       int d = int(aThis.u.m_unsigned_int) - aV.u.m_int;
957       aThis.set(d);                               957       aThis.set(d);
958       return true;}                               958       return true;}
959     case value::ARRAY_DOUBLE:{                    959     case value::ARRAY_DOUBLE:{
960       unsigned int tmp = aThis.u.m_unsigned_in    960       unsigned int tmp = aThis.u.m_unsigned_int;
961       //In the below, this becomes a value::AR    961       //In the below, this becomes a value::ARRAY_DOUBLE.
962       aThis.set(aV.u.m_array_double->orders(),    962       aThis.set(aV.u.m_array_double->orders(),
963                 aV.u.m_array_double->vector())    963                 aV.u.m_array_double->vector());
964       aThis.u.m_array_double->multiply(-1);       964       aThis.u.m_array_double->multiply(-1);
965       aThis.u.m_array_double->add(double(tmp))    965       aThis.u.m_array_double->add(double(tmp));
966       return true;}                               966       return true;}
967     case value::NONE:                             967     case value::NONE:
968     case value::VOID_STAR:                        968     case value::VOID_STAR:
969     case value::BOOL:                             969     case value::BOOL:
970     case value::SHORT:                            970     case value::SHORT:
971     case value::INT64:                            971     case value::INT64:
972     //case value::UNSIGNED_CHAR:                  972     //case value::UNSIGNED_CHAR:
973     //case value::CHAR:                           973     //case value::CHAR:
974     case value::UNSIGNED_SHORT :                  974     case value::UNSIGNED_SHORT :
975     case value::UNSIGNED_INT64 :                  975     case value::UNSIGNED_INT64 :
976     case value::DOUBLE_STAR:                      976     case value::DOUBLE_STAR:
977     case value::FLOAT_STAR:                       977     case value::FLOAT_STAR:
978     case value::INT_STAR:                         978     case value::INT_STAR:
979     case value::STRING:                           979     case value::STRING:
980     //case value::ARRAY_UNSIGNED_CHAR:            980     //case value::ARRAY_UNSIGNED_CHAR:
981     //case value::ARRAY_CHAR:                     981     //case value::ARRAY_CHAR:
982     case value::ARRAY_UNSIGNED_SHORT:             982     case value::ARRAY_UNSIGNED_SHORT:
983     case value::ARRAY_SHORT:                      983     case value::ARRAY_SHORT:
984     case value::ARRAY_UNSIGNED_INT:               984     case value::ARRAY_UNSIGNED_INT:
985     case value::ARRAY_INT:                        985     case value::ARRAY_INT:
986     case value::ARRAY_UNSIGNED_INT64:             986     case value::ARRAY_UNSIGNED_INT64:
987     case value::ARRAY_INT64:                      987     case value::ARRAY_INT64:
988     case value::ARRAY_FLOAT:                      988     case value::ARRAY_FLOAT:
989     //case value::ARRAY_DOUBLE:                   989     //case value::ARRAY_DOUBLE:
990     case value::ARRAY_BOOL:                       990     case value::ARRAY_BOOL:
991     case value::ARRAY_STRING:                     991     case value::ARRAY_STRING:
992       break;                                      992       break;
993     }                                             993     }
994     break;                                        994     break;
995   case value::ARRAY_DOUBLE:                       995   case value::ARRAY_DOUBLE:
996     switch(aV.m_type) {                           996     switch(aV.m_type) {
997     case value::INT:                              997     case value::INT:
998       aThis.u.m_array_double->add(-aV.u.m_int)    998       aThis.u.m_array_double->add(-aV.u.m_int);
999       return true;                                999       return true;
1000     case value::UNSIGNED_INT:                    1000     case value::UNSIGNED_INT:
1001       aThis.u.m_array_double->add(-((double)a    1001       aThis.u.m_array_double->add(-((double)aV.u.m_unsigned_int));
1002       return true;                               1002       return true;
1003     case value::DOUBLE:                          1003     case value::DOUBLE:
1004       aThis.u.m_array_double->add(-aV.u.m_dou    1004       aThis.u.m_array_double->add(-aV.u.m_double);
1005       return true;                               1005       return true;
1006     case value::ARRAY_DOUBLE:{                   1006     case value::ARRAY_DOUBLE:{
1007       if(aThis.u.m_array_double->orders()!=aV    1007       if(aThis.u.m_array_double->orders()!=aV.u.m_array_double->orders()) {
1008         aError = "Value::subtract : vector or    1008         aError = "Value::subtract : vector orders mismatch.";
1009         aThis.set_none();                        1009         aThis.set_none();
1010         return false;                            1010         return false;
1011       }                                          1011       }
1012       std::vector<double>& stdv = aThis.u.m_a    1012       std::vector<double>& stdv = aThis.u.m_array_double->vector();
1013       const std::vector<double>& stdv2 = aV.u    1013       const std::vector<double>& stdv2 = aV.u.m_array_double->vector();
1014       size_t number = stdv.size();               1014       size_t number = stdv.size();
1015       for(size_t index=0;index<number;index++    1015       for(size_t index=0;index<number;index++) {
1016         stdv[index] -= stdv2[index];             1016         stdv[index] -= stdv2[index];
1017       }                                          1017       }
1018       return true;}                              1018       return true;}
1019     case value::NONE:                            1019     case value::NONE:
1020     case value::VOID_STAR:                       1020     case value::VOID_STAR:
1021     case value::BOOL:                            1021     case value::BOOL:
1022     case value::SHORT:                           1022     case value::SHORT:
1023     case value::INT64:                           1023     case value::INT64:
1024     case value::FLOAT:                           1024     case value::FLOAT:
1025     //case value::UNSIGNED_CHAR:                 1025     //case value::UNSIGNED_CHAR:
1026     //case value::CHAR:                          1026     //case value::CHAR:
1027     case value::UNSIGNED_SHORT :                 1027     case value::UNSIGNED_SHORT :
1028     case value::UNSIGNED_INT64 :                 1028     case value::UNSIGNED_INT64 :
1029     case value::DOUBLE_STAR:                     1029     case value::DOUBLE_STAR:
1030     case value::FLOAT_STAR:                      1030     case value::FLOAT_STAR:
1031     case value::INT_STAR:                        1031     case value::INT_STAR:
1032     case value::STRING:                          1032     case value::STRING:
1033     //case value::ARRAY_UNSIGNED_CHAR:           1033     //case value::ARRAY_UNSIGNED_CHAR:
1034     //case value::ARRAY_CHAR:                    1034     //case value::ARRAY_CHAR:
1035     case value::ARRAY_UNSIGNED_SHORT:            1035     case value::ARRAY_UNSIGNED_SHORT:
1036     case value::ARRAY_SHORT:                     1036     case value::ARRAY_SHORT:
1037     case value::ARRAY_UNSIGNED_INT:              1037     case value::ARRAY_UNSIGNED_INT:
1038     case value::ARRAY_INT:                       1038     case value::ARRAY_INT:
1039     case value::ARRAY_UNSIGNED_INT64:            1039     case value::ARRAY_UNSIGNED_INT64:
1040     case value::ARRAY_INT64:                     1040     case value::ARRAY_INT64:
1041     case value::ARRAY_FLOAT:                     1041     case value::ARRAY_FLOAT:
1042     //case value::ARRAY_DOUBLE:                  1042     //case value::ARRAY_DOUBLE:
1043     case value::ARRAY_BOOL:                      1043     case value::ARRAY_BOOL:
1044     case value::ARRAY_STRING:                    1044     case value::ARRAY_STRING:
1045       break;                                     1045       break;
1046     }                                            1046     }
1047     break;                                       1047     break;
1048   case value::NONE:                              1048   case value::NONE:
1049   case value::VOID_STAR:                         1049   case value::VOID_STAR:
1050   case value::BOOL:                              1050   case value::BOOL:
1051   case value::SHORT:                             1051   case value::SHORT:
1052   case value::INT64:                             1052   case value::INT64:
1053   //case value::UNSIGNED_CHAR:                   1053   //case value::UNSIGNED_CHAR:
1054   //case value::CHAR:                            1054   //case value::CHAR:
1055   case value::UNSIGNED_SHORT :                   1055   case value::UNSIGNED_SHORT :
1056   case value::UNSIGNED_INT64 :                   1056   case value::UNSIGNED_INT64 :
1057   case value::DOUBLE_STAR:                       1057   case value::DOUBLE_STAR:
1058   case value::FLOAT_STAR:                        1058   case value::FLOAT_STAR:
1059   case value::INT_STAR:                          1059   case value::INT_STAR:
1060   case value::STRING:                            1060   case value::STRING:
1061   //case value::ARRAY_UNSIGNED_CHAR:             1061   //case value::ARRAY_UNSIGNED_CHAR:
1062   //case value::ARRAY_CHAR:                      1062   //case value::ARRAY_CHAR:
1063   case value::ARRAY_UNSIGNED_SHORT:              1063   case value::ARRAY_UNSIGNED_SHORT:
1064   case value::ARRAY_SHORT:                       1064   case value::ARRAY_SHORT:
1065   case value::ARRAY_UNSIGNED_INT:                1065   case value::ARRAY_UNSIGNED_INT:
1066   case value::ARRAY_INT:                         1066   case value::ARRAY_INT:
1067   case value::ARRAY_UNSIGNED_INT64:              1067   case value::ARRAY_UNSIGNED_INT64:
1068   case value::ARRAY_INT64:                       1068   case value::ARRAY_INT64:
1069   case value::ARRAY_FLOAT:                       1069   case value::ARRAY_FLOAT:
1070   //case value::ARRAY_DOUBLE:                    1070   //case value::ARRAY_DOUBLE:
1071   case value::ARRAY_BOOL:                        1071   case value::ARRAY_BOOL:
1072   case value::ARRAY_STRING:                      1072   case value::ARRAY_STRING:
1073     break;                                       1073     break;
1074   }                                              1074   }
1075   aError = std::string("Value::subtract :" )     1075   aError = std::string("Value::subtract :" )
1076          + " can't apply on type " + value::s    1076          + " can't apply on type " + value::stype(oType)
1077          + " and type " + aV.stype();            1077          + " and type " + aV.stype();
1078   aThis.set_none();                              1078   aThis.set_none();
1079   return false;                                  1079   return false;
1080 }                                                1080 }
1081                                                  1081 
1082 inline bool value::multiply(value& aThis,cons    1082 inline bool value::multiply(value& aThis,const value& aV,std::string& aError){
1083   value::e_type oType = aThis.m_type;            1083   value::e_type oType = aThis.m_type;
1084   switch(aThis.m_type) {                         1084   switch(aThis.m_type) {
1085   case value::INT:                               1085   case value::INT:
1086     switch(aV.m_type) {                          1086     switch(aV.m_type) {
1087     case value::INT:                             1087     case value::INT:
1088       aThis.u.m_int *= aV.u.m_int;               1088       aThis.u.m_int *= aV.u.m_int;
1089       return true;                               1089       return true;
1090     case value::UNSIGNED_INT:                    1090     case value::UNSIGNED_INT:
1091       aThis.u.m_int *= aV.u.m_unsigned_int;      1091       aThis.u.m_int *= aV.u.m_unsigned_int;
1092       return true;                               1092       return true;
1093     case value::DOUBLE:                          1093     case value::DOUBLE:
1094       aThis.u.m_int *= (int)aV.u.m_double;       1094       aThis.u.m_int *= (int)aV.u.m_double;
1095       return true;                               1095       return true;
1096     case value::FLOAT:                           1096     case value::FLOAT:
1097       aThis.u.m_int *= (int)aV.u.m_float;        1097       aThis.u.m_int *= (int)aV.u.m_float;
1098       return true;                               1098       return true;
1099     case value::ARRAY_DOUBLE:{                   1099     case value::ARRAY_DOUBLE:{
1100       int tmp = aThis.u.m_int;                   1100       int tmp = aThis.u.m_int;
1101       //In the below, this becomes a value::A    1101       //In the below, this becomes a value::ARRAY_DOUBLE.
1102       aThis.set(aV.u.m_array_double->orders()    1102       aThis.set(aV.u.m_array_double->orders(),
1103                 aV.u.m_array_double->vector()    1103                 aV.u.m_array_double->vector());
1104       aThis.u.m_array_double->multiply(double    1104       aThis.u.m_array_double->multiply(double(tmp));
1105       return true;}                              1105       return true;}
1106     case value::NONE:                            1106     case value::NONE:
1107     case value::VOID_STAR:                       1107     case value::VOID_STAR:
1108     case value::BOOL:                            1108     case value::BOOL:
1109     case value::SHORT:                           1109     case value::SHORT:
1110     case value::INT64:                           1110     case value::INT64:
1111     //case value::UNSIGNED_CHAR:                 1111     //case value::UNSIGNED_CHAR:
1112     //case value::CHAR:                          1112     //case value::CHAR:
1113     case value::UNSIGNED_SHORT :                 1113     case value::UNSIGNED_SHORT :
1114     case value::UNSIGNED_INT64 :                 1114     case value::UNSIGNED_INT64 :
1115     case value::DOUBLE_STAR:                     1115     case value::DOUBLE_STAR:
1116     case value::FLOAT_STAR:                      1116     case value::FLOAT_STAR:
1117     case value::INT_STAR:                        1117     case value::INT_STAR:
1118     case value::STRING:                          1118     case value::STRING:
1119     //case value::ARRAY_UNSIGNED_CHAR:           1119     //case value::ARRAY_UNSIGNED_CHAR:
1120     //case value::ARRAY_CHAR:                    1120     //case value::ARRAY_CHAR:
1121     case value::ARRAY_UNSIGNED_SHORT:            1121     case value::ARRAY_UNSIGNED_SHORT:
1122     case value::ARRAY_SHORT:                     1122     case value::ARRAY_SHORT:
1123     case value::ARRAY_UNSIGNED_INT:              1123     case value::ARRAY_UNSIGNED_INT:
1124     case value::ARRAY_INT:                       1124     case value::ARRAY_INT:
1125     case value::ARRAY_UNSIGNED_INT64:            1125     case value::ARRAY_UNSIGNED_INT64:
1126     case value::ARRAY_INT64:                     1126     case value::ARRAY_INT64:
1127     case value::ARRAY_FLOAT:                     1127     case value::ARRAY_FLOAT:
1128     //case value::ARRAY_DOUBLE:                  1128     //case value::ARRAY_DOUBLE:
1129     case value::ARRAY_BOOL:                      1129     case value::ARRAY_BOOL:
1130     case value::ARRAY_STRING:                    1130     case value::ARRAY_STRING:
1131       break;                                     1131       break;
1132     }                                            1132     }
1133     break;                                       1133     break;
1134   case value::FLOAT:                             1134   case value::FLOAT:
1135     switch(aV.m_type) {                          1135     switch(aV.m_type) {
1136     case value::SHORT:                           1136     case value::SHORT:
1137       aThis.u.m_float *= aV.u.m_short;           1137       aThis.u.m_float *= aV.u.m_short;
1138       return true;                               1138       return true;
1139     case value::INT:                             1139     case value::INT:
1140       aThis.u.m_float *= aV.u.m_int;             1140       aThis.u.m_float *= aV.u.m_int;
1141       return true;                               1141       return true;
1142     case value::FLOAT:                           1142     case value::FLOAT:
1143       aThis.u.m_float *= aV.u.m_float;           1143       aThis.u.m_float *= aV.u.m_float;
1144       return true;                               1144       return true;
1145     case value::DOUBLE:                          1145     case value::DOUBLE:
1146       aThis.u.m_float *= (float)aV.u.m_double    1146       aThis.u.m_float *= (float)aV.u.m_double;
1147       return true;                               1147       return true;
1148     case value::UNSIGNED_SHORT :                 1148     case value::UNSIGNED_SHORT :
1149       aThis.u.m_float *= aV.u.m_unsigned_shor    1149       aThis.u.m_float *= aV.u.m_unsigned_short;
1150       return true;                               1150       return true;
1151     case value::UNSIGNED_INT:                    1151     case value::UNSIGNED_INT:
1152       aThis.u.m_float *= aV.u.m_unsigned_int;    1152       aThis.u.m_float *= aV.u.m_unsigned_int;
1153       return true;                               1153       return true;
1154     case value::ARRAY_DOUBLE:{                   1154     case value::ARRAY_DOUBLE:{
1155       double tmp = aThis.u.m_float;              1155       double tmp = aThis.u.m_float;
1156       //In the below, this becomes a value::A    1156       //In the below, this becomes a value::ARRAY_DOUBLE.
1157       aThis.set(aV.u.m_array_double->orders()    1157       aThis.set(aV.u.m_array_double->orders(),
1158                 aV.u.m_array_double->vector()    1158                 aV.u.m_array_double->vector());
1159       aThis.u.m_array_double->multiply(tmp);     1159       aThis.u.m_array_double->multiply(tmp);
1160       return true;}                              1160       return true;}
1161     case value::NONE:                            1161     case value::NONE:
1162     case value::VOID_STAR:                       1162     case value::VOID_STAR:
1163     case value::BOOL:                            1163     case value::BOOL:
1164     case value::INT64:                           1164     case value::INT64:
1165     //case value::UNSIGNED_CHAR:                 1165     //case value::UNSIGNED_CHAR:
1166     //case value::CHAR:                          1166     //case value::CHAR:
1167     case value::UNSIGNED_INT64 :                 1167     case value::UNSIGNED_INT64 :
1168     case value::DOUBLE_STAR:                     1168     case value::DOUBLE_STAR:
1169     case value::FLOAT_STAR:                      1169     case value::FLOAT_STAR:
1170     case value::INT_STAR:                        1170     case value::INT_STAR:
1171     case value::STRING:                          1171     case value::STRING:
1172     //case value::ARRAY_UNSIGNED_CHAR:           1172     //case value::ARRAY_UNSIGNED_CHAR:
1173     //case value::ARRAY_CHAR:                    1173     //case value::ARRAY_CHAR:
1174     case value::ARRAY_UNSIGNED_SHORT:            1174     case value::ARRAY_UNSIGNED_SHORT:
1175     case value::ARRAY_SHORT:                     1175     case value::ARRAY_SHORT:
1176     case value::ARRAY_UNSIGNED_INT:              1176     case value::ARRAY_UNSIGNED_INT:
1177     case value::ARRAY_INT:                       1177     case value::ARRAY_INT:
1178     case value::ARRAY_UNSIGNED_INT64:            1178     case value::ARRAY_UNSIGNED_INT64:
1179     case value::ARRAY_INT64:                     1179     case value::ARRAY_INT64:
1180     case value::ARRAY_FLOAT:                     1180     case value::ARRAY_FLOAT:
1181     //case value::ARRAY_DOUBLE:                  1181     //case value::ARRAY_DOUBLE:
1182     case value::ARRAY_BOOL:                      1182     case value::ARRAY_BOOL:
1183     case value::ARRAY_STRING:                    1183     case value::ARRAY_STRING:
1184       break;                                     1184       break;
1185     }                                            1185     }
1186     break;                                       1186     break;
1187   case value::DOUBLE:                            1187   case value::DOUBLE:
1188     switch(aV.m_type) {                          1188     switch(aV.m_type) {
1189     case value::SHORT:                           1189     case value::SHORT:
1190       aThis.u.m_double *= aV.u.m_short;          1190       aThis.u.m_double *= aV.u.m_short;
1191       return true;                               1191       return true;
1192     case value::INT:                             1192     case value::INT:
1193       aThis.u.m_double *= aV.u.m_int;            1193       aThis.u.m_double *= aV.u.m_int;
1194       return true;                               1194       return true;
1195     case value::INT64:                           1195     case value::INT64:
1196       aThis.u.m_double *= aV.u.m_int64;          1196       aThis.u.m_double *= aV.u.m_int64;
1197       return true;                               1197       return true;
1198     case value::FLOAT:                           1198     case value::FLOAT:
1199       aThis.u.m_double *= aV.u.m_float;          1199       aThis.u.m_double *= aV.u.m_float;
1200       return true;                               1200       return true;
1201     case value::DOUBLE:                          1201     case value::DOUBLE:
1202       aThis.u.m_double *= aV.u.m_double;         1202       aThis.u.m_double *= aV.u.m_double;
1203       return true;                               1203       return true;
1204     case value::UNSIGNED_SHORT :                 1204     case value::UNSIGNED_SHORT :
1205       aThis.u.m_double *= aV.u.m_unsigned_sho    1205       aThis.u.m_double *= aV.u.m_unsigned_short;
1206       return true;                               1206       return true;
1207     case value::UNSIGNED_INT:                    1207     case value::UNSIGNED_INT:
1208       aThis.u.m_double *= aV.u.m_unsigned_int    1208       aThis.u.m_double *= aV.u.m_unsigned_int;
1209       return true;                               1209       return true;
1210     case value::ARRAY_DOUBLE:{                   1210     case value::ARRAY_DOUBLE:{
1211       double tmp = aThis.u.m_double;             1211       double tmp = aThis.u.m_double;
1212       //In the below, this becomes a value::A    1212       //In the below, this becomes a value::ARRAY_DOUBLE.
1213       aThis.set(aV.u.m_array_double->orders()    1213       aThis.set(aV.u.m_array_double->orders(),
1214                 aV.u.m_array_double->vector()    1214                 aV.u.m_array_double->vector());
1215       aThis.u.m_array_double->multiply(tmp);     1215       aThis.u.m_array_double->multiply(tmp);
1216       return true;}                              1216       return true;}
1217     case value::NONE:                            1217     case value::NONE:
1218     case value::VOID_STAR:                       1218     case value::VOID_STAR:
1219     case value::BOOL:                            1219     case value::BOOL:
1220     //case value::UNSIGNED_CHAR:                 1220     //case value::UNSIGNED_CHAR:
1221     //case value::CHAR:                          1221     //case value::CHAR:
1222     case value::UNSIGNED_INT64 :                 1222     case value::UNSIGNED_INT64 :
1223     case value::DOUBLE_STAR:                     1223     case value::DOUBLE_STAR:
1224     case value::FLOAT_STAR:                      1224     case value::FLOAT_STAR:
1225     case value::INT_STAR:                        1225     case value::INT_STAR:
1226     case value::STRING:                          1226     case value::STRING:
1227     //case value::ARRAY_UNSIGNED_CHAR:           1227     //case value::ARRAY_UNSIGNED_CHAR:
1228     //case value::ARRAY_CHAR:                    1228     //case value::ARRAY_CHAR:
1229     case value::ARRAY_UNSIGNED_SHORT:            1229     case value::ARRAY_UNSIGNED_SHORT:
1230     case value::ARRAY_SHORT:                     1230     case value::ARRAY_SHORT:
1231     case value::ARRAY_UNSIGNED_INT:              1231     case value::ARRAY_UNSIGNED_INT:
1232     case value::ARRAY_INT:                       1232     case value::ARRAY_INT:
1233     case value::ARRAY_UNSIGNED_INT64:            1233     case value::ARRAY_UNSIGNED_INT64:
1234     case value::ARRAY_INT64:                     1234     case value::ARRAY_INT64:
1235     case value::ARRAY_FLOAT:                     1235     case value::ARRAY_FLOAT:
1236     //case value::ARRAY_DOUBLE:                  1236     //case value::ARRAY_DOUBLE:
1237     case value::ARRAY_BOOL:                      1237     case value::ARRAY_BOOL:
1238     case value::ARRAY_STRING:                    1238     case value::ARRAY_STRING:
1239       break;                                     1239       break;
1240     }                                            1240     }
1241     break;                                       1241     break;
1242   case value::UNSIGNED_INT:                      1242   case value::UNSIGNED_INT:
1243     switch(aV.m_type) {                          1243     switch(aV.m_type) {
1244     case value::FLOAT:{                          1244     case value::FLOAT:{
1245       float tmp = aThis.u.m_unsigned_int * aV    1245       float tmp = aThis.u.m_unsigned_int * aV.u.m_float;
1246       aThis.set(tmp); //this becomes a value:    1246       aThis.set(tmp); //this becomes a value::FLOAT.
1247       return true;}                              1247       return true;}
1248     case value::DOUBLE:{                         1248     case value::DOUBLE:{
1249       double tmp = aThis.u.m_unsigned_int * a    1249       double tmp = aThis.u.m_unsigned_int * aV.u.m_double;
1250       aThis.set(tmp); //this becomes a value:    1250       aThis.set(tmp); //this becomes a value::DOUBLE.
1251       return true;}                              1251       return true;}
1252     case value::INT:{                            1252     case value::INT:{
1253       int tmp = aThis.u.m_unsigned_int * aV.u    1253       int tmp = aThis.u.m_unsigned_int * aV.u.m_int;
1254       aThis.set(tmp); //this becomes a value:    1254       aThis.set(tmp); //this becomes a value::INT.
1255       return true;}                              1255       return true;}
1256     case value::INT64:{                          1256     case value::INT64:{
1257       int64 tmp = aThis.u.m_unsigned_int * aV    1257       int64 tmp = aThis.u.m_unsigned_int * aV.u.m_int64;
1258       aThis.set(tmp); //this becomes a value:    1258       aThis.set(tmp); //this becomes a value::INT64.
1259       return true;}                              1259       return true;}
1260     case value::UNSIGNED_INT:                    1260     case value::UNSIGNED_INT:
1261       aThis.u.m_unsigned_int *= aV.u.m_unsign    1261       aThis.u.m_unsigned_int *= aV.u.m_unsigned_int;
1262       return true;                               1262       return true;
1263     case value::ARRAY_DOUBLE:{                   1263     case value::ARRAY_DOUBLE:{
1264       unsigned int tmp = aThis.u.m_unsigned_i    1264       unsigned int tmp = aThis.u.m_unsigned_int;
1265       //In the below, this becomes a value::A    1265       //In the below, this becomes a value::ARRAY_DOUBLE.
1266       aThis.set(aV.u.m_array_double->orders()    1266       aThis.set(aV.u.m_array_double->orders(),
1267                 aV.u.m_array_double->vector()    1267                 aV.u.m_array_double->vector());
1268       aThis.u.m_array_double->multiply(double    1268       aThis.u.m_array_double->multiply(double(tmp));
1269       return true;}                              1269       return true;}
1270     case value::NONE:                            1270     case value::NONE:
1271     case value::VOID_STAR:                       1271     case value::VOID_STAR:
1272     case value::BOOL:                            1272     case value::BOOL:
1273     case value::SHORT:                           1273     case value::SHORT:
1274     //case value::UNSIGNED_CHAR:                 1274     //case value::UNSIGNED_CHAR:
1275     //case value::CHAR:                          1275     //case value::CHAR:
1276     case value::UNSIGNED_SHORT :                 1276     case value::UNSIGNED_SHORT :
1277     case value::UNSIGNED_INT64 :                 1277     case value::UNSIGNED_INT64 :
1278     case value::DOUBLE_STAR:                     1278     case value::DOUBLE_STAR:
1279     case value::FLOAT_STAR:                      1279     case value::FLOAT_STAR:
1280     case value::INT_STAR:                        1280     case value::INT_STAR:
1281     case value::STRING:                          1281     case value::STRING:
1282     //case value::ARRAY_UNSIGNED_CHAR:           1282     //case value::ARRAY_UNSIGNED_CHAR:
1283     //case value::ARRAY_CHAR:                    1283     //case value::ARRAY_CHAR:
1284     case value::ARRAY_UNSIGNED_SHORT:            1284     case value::ARRAY_UNSIGNED_SHORT:
1285     case value::ARRAY_SHORT:                     1285     case value::ARRAY_SHORT:
1286     case value::ARRAY_UNSIGNED_INT:              1286     case value::ARRAY_UNSIGNED_INT:
1287     case value::ARRAY_INT:                       1287     case value::ARRAY_INT:
1288     case value::ARRAY_UNSIGNED_INT64:            1288     case value::ARRAY_UNSIGNED_INT64:
1289     case value::ARRAY_INT64:                     1289     case value::ARRAY_INT64:
1290     case value::ARRAY_FLOAT:                     1290     case value::ARRAY_FLOAT:
1291     //case value::ARRAY_DOUBLE:                  1291     //case value::ARRAY_DOUBLE:
1292     case value::ARRAY_BOOL:                      1292     case value::ARRAY_BOOL:
1293     case value::ARRAY_STRING:                    1293     case value::ARRAY_STRING:
1294       break;                                     1294       break;
1295     }                                            1295     }
1296     break;                                       1296     break;
1297   case value::ARRAY_DOUBLE:                      1297   case value::ARRAY_DOUBLE:
1298     switch(aV.m_type) {                          1298     switch(aV.m_type) {
1299     case value::INT:                             1299     case value::INT:
1300       aThis.u.m_array_double->multiply(aV.u.m    1300       aThis.u.m_array_double->multiply(aV.u.m_int);
1301       return true;                               1301       return true;
1302     case value::UNSIGNED_INT:                    1302     case value::UNSIGNED_INT:
1303       aThis.u.m_array_double->multiply(aV.u.m    1303       aThis.u.m_array_double->multiply(aV.u.m_unsigned_int);
1304       return true;                               1304       return true;
1305     case value::DOUBLE:                          1305     case value::DOUBLE:
1306       aThis.u.m_array_double->multiply(aV.u.m    1306       aThis.u.m_array_double->multiply(aV.u.m_double);
1307       return true;                               1307       return true;
1308     case value::ARRAY_DOUBLE:{                   1308     case value::ARRAY_DOUBLE:{
1309       if(aThis.u.m_array_double->orders()!=aV    1309       if(aThis.u.m_array_double->orders()!=aV.u.m_array_double->orders()) {
1310         aError = "Value::multiply : vector or    1310         aError = "Value::multiply : vector orders mismatch.";
1311         aThis.set_none();                        1311         aThis.set_none();
1312         return false;                            1312         return false;
1313       }                                          1313       }
1314       std::vector<double>& stdv = aThis.u.m_a    1314       std::vector<double>& stdv = aThis.u.m_array_double->vector();
1315       const std::vector<double>& stdv2 = aV.u    1315       const std::vector<double>& stdv2 = aV.u.m_array_double->vector();
1316       size_t number = stdv.size();               1316       size_t number = stdv.size();
1317       for(size_t index=0;index<number;index++    1317       for(size_t index=0;index<number;index++) {
1318         stdv[index] *= stdv2[index];             1318         stdv[index] *= stdv2[index];
1319       }                                          1319       }
1320       return true;}                              1320       return true;}
1321     case value::NONE:                            1321     case value::NONE:
1322     case value::VOID_STAR:                       1322     case value::VOID_STAR:
1323     case value::BOOL:                            1323     case value::BOOL:
1324     case value::SHORT:                           1324     case value::SHORT:
1325     case value::INT64:                           1325     case value::INT64:
1326     case value::FLOAT:                           1326     case value::FLOAT:
1327     //case value::UNSIGNED_CHAR:                 1327     //case value::UNSIGNED_CHAR:
1328     //case value::CHAR:                          1328     //case value::CHAR:
1329     case value::UNSIGNED_SHORT :                 1329     case value::UNSIGNED_SHORT :
1330     case value::UNSIGNED_INT64 :                 1330     case value::UNSIGNED_INT64 :
1331     case value::DOUBLE_STAR:                     1331     case value::DOUBLE_STAR:
1332     case value::FLOAT_STAR:                      1332     case value::FLOAT_STAR:
1333     case value::INT_STAR:                        1333     case value::INT_STAR:
1334     case value::STRING:                          1334     case value::STRING:
1335     //case value::ARRAY_UNSIGNED_CHAR:           1335     //case value::ARRAY_UNSIGNED_CHAR:
1336     //case value::ARRAY_CHAR:                    1336     //case value::ARRAY_CHAR:
1337     case value::ARRAY_UNSIGNED_SHORT:            1337     case value::ARRAY_UNSIGNED_SHORT:
1338     case value::ARRAY_SHORT:                     1338     case value::ARRAY_SHORT:
1339     case value::ARRAY_UNSIGNED_INT:              1339     case value::ARRAY_UNSIGNED_INT:
1340     case value::ARRAY_INT:                       1340     case value::ARRAY_INT:
1341     case value::ARRAY_UNSIGNED_INT64:            1341     case value::ARRAY_UNSIGNED_INT64:
1342     case value::ARRAY_INT64:                     1342     case value::ARRAY_INT64:
1343     case value::ARRAY_FLOAT:                     1343     case value::ARRAY_FLOAT:
1344     //case value::ARRAY_DOUBLE:                  1344     //case value::ARRAY_DOUBLE:
1345     case value::ARRAY_BOOL:                      1345     case value::ARRAY_BOOL:
1346     case value::ARRAY_STRING:                    1346     case value::ARRAY_STRING:
1347       break;                                     1347       break;
1348     }                                            1348     }
1349     break;                                       1349     break;
1350   case value::NONE:                              1350   case value::NONE:
1351   case value::STRING:                            1351   case value::STRING:
1352   case value::VOID_STAR:                         1352   case value::VOID_STAR:
1353   case value::BOOL:                              1353   case value::BOOL:
1354   case value::SHORT:                             1354   case value::SHORT:
1355   case value::INT64:                             1355   case value::INT64:
1356   //case value::UNSIGNED_CHAR:                   1356   //case value::UNSIGNED_CHAR:
1357   //case value::CHAR:                            1357   //case value::CHAR:
1358   case value::UNSIGNED_SHORT :                   1358   case value::UNSIGNED_SHORT :
1359   case value::UNSIGNED_INT64 :                   1359   case value::UNSIGNED_INT64 :
1360   case value::DOUBLE_STAR:                       1360   case value::DOUBLE_STAR:
1361   case value::FLOAT_STAR:                        1361   case value::FLOAT_STAR:
1362   case value::INT_STAR:                          1362   case value::INT_STAR:
1363   //case value::ARRAY_UNSIGNED_CHAR:             1363   //case value::ARRAY_UNSIGNED_CHAR:
1364   //case value::ARRAY_CHAR:                      1364   //case value::ARRAY_CHAR:
1365   case value::ARRAY_UNSIGNED_SHORT:              1365   case value::ARRAY_UNSIGNED_SHORT:
1366   case value::ARRAY_SHORT:                       1366   case value::ARRAY_SHORT:
1367   case value::ARRAY_UNSIGNED_INT:                1367   case value::ARRAY_UNSIGNED_INT:
1368   case value::ARRAY_INT:                         1368   case value::ARRAY_INT:
1369   case value::ARRAY_UNSIGNED_INT64:              1369   case value::ARRAY_UNSIGNED_INT64:
1370   case value::ARRAY_INT64:                       1370   case value::ARRAY_INT64:
1371   case value::ARRAY_FLOAT:                       1371   case value::ARRAY_FLOAT:
1372   //case value::ARRAY_DOUBLE:                    1372   //case value::ARRAY_DOUBLE:
1373   case value::ARRAY_BOOL:                        1373   case value::ARRAY_BOOL:
1374   case value::ARRAY_STRING:                      1374   case value::ARRAY_STRING:
1375     break;                                       1375     break;
1376   }                                              1376   }
1377   aError = std::string("Value::multiply :" )     1377   aError = std::string("Value::multiply :" )
1378          + " can't apply on type " + value::s    1378          + " can't apply on type " + value::stype(oType)
1379          + " and type " + aV.stype();            1379          + " and type " + aV.stype();
1380   aThis.set_none();                              1380   aThis.set_none();
1381   return false;                                  1381   return false;
1382 }                                                1382 }
1383                                                  1383 
1384 inline bool value::divide(value& aThis,const     1384 inline bool value::divide(value& aThis,const value& aV,std::string& aError){
1385   value::e_type oType = aThis.m_type;            1385   value::e_type oType = aThis.m_type;
1386   switch(aThis.m_type) {                         1386   switch(aThis.m_type) {
1387   case value::INT:                               1387   case value::INT:
1388     switch(aV.m_type) {                          1388     switch(aV.m_type) {
1389     case value::INT:                             1389     case value::INT:
1390       if(aV.u.m_int==0) {                        1390       if(aV.u.m_int==0) {
1391         aError = value::error_div_zero();        1391         aError = value::error_div_zero();
1392         aThis.set_none();                        1392         aThis.set_none();
1393         return false;                            1393         return false;
1394       } else {                                   1394       } else {
1395         int tmp = aThis.u.m_int/aV.u.m_int;      1395         int tmp = aThis.u.m_int/aV.u.m_int;
1396         aThis.set(tmp);                          1396         aThis.set(tmp);
1397         return true;                             1397         return true;
1398       }                                          1398       }
1399     case value::FLOAT:                           1399     case value::FLOAT:
1400       if(aV.u.m_float==0.0F) {                   1400       if(aV.u.m_float==0.0F) {
1401         aError = value::error_div_zero();        1401         aError = value::error_div_zero();
1402         aThis.set_none();                        1402         aThis.set_none();
1403         return false;                            1403         return false;
1404       } else {                                   1404       } else {
1405         float tmp = float(aThis.u.m_int)/aV.u    1405         float tmp = float(aThis.u.m_int)/aV.u.m_float;
1406         aThis.set(tmp);                          1406         aThis.set(tmp);
1407         return true;                             1407         return true;
1408       }                                          1408       }
1409     case value::DOUBLE:                          1409     case value::DOUBLE:
1410       if(aV.u.m_double==0) {                     1410       if(aV.u.m_double==0) {
1411         aError = value::error_div_zero();        1411         aError = value::error_div_zero();
1412         aThis.set_none();                        1412         aThis.set_none();
1413         return false;                            1413         return false;
1414       } else {                                   1414       } else {
1415         double tmp = double(aThis.u.m_int)/aV    1415         double tmp = double(aThis.u.m_int)/aV.u.m_double;
1416         aThis.set(tmp);                          1416         aThis.set(tmp);
1417         return true;                             1417         return true;
1418       }                                          1418       }
1419     case value::ARRAY_DOUBLE:{                   1419     case value::ARRAY_DOUBLE:{
1420       int tmp = aThis.u.m_int;                   1420       int tmp = aThis.u.m_int;
1421       //In the below, this becomes a value::A    1421       //In the below, this becomes a value::ARRAY_DOUBLE.
1422       aThis.set(aV.u.m_array_double->orders()    1422       aThis.set(aV.u.m_array_double->orders(),
1423                 aV.u.m_array_double->vector()    1423                 aV.u.m_array_double->vector());
1424       if(!aThis.u.m_array_double->invert()) {    1424       if(!aThis.u.m_array_double->invert()) {
1425         aError = value::error_div_zero();        1425         aError = value::error_div_zero();
1426         aThis.set_none();                        1426         aThis.set_none();
1427         return false;                            1427         return false;
1428       }                                          1428       }
1429       aThis.u.m_array_double->multiply((doubl    1429       aThis.u.m_array_double->multiply((double)tmp);
1430       return true;}                              1430       return true;}
1431     case value::NONE:                            1431     case value::NONE:
1432     case value::VOID_STAR:                       1432     case value::VOID_STAR:
1433     case value::BOOL:                            1433     case value::BOOL:
1434     case value::SHORT:                           1434     case value::SHORT:
1435     case value::INT64:                           1435     case value::INT64:
1436     //case value::UNSIGNED_CHAR:                 1436     //case value::UNSIGNED_CHAR:
1437     //case value::CHAR:                          1437     //case value::CHAR:
1438     case value::UNSIGNED_SHORT :                 1438     case value::UNSIGNED_SHORT :
1439     case value::UNSIGNED_INT:                    1439     case value::UNSIGNED_INT:
1440     case value::UNSIGNED_INT64 :                 1440     case value::UNSIGNED_INT64 :
1441     case value::DOUBLE_STAR:                     1441     case value::DOUBLE_STAR:
1442     case value::FLOAT_STAR:                      1442     case value::FLOAT_STAR:
1443     case value::INT_STAR:                        1443     case value::INT_STAR:
1444     case value::STRING:                          1444     case value::STRING:
1445     //case value::ARRAY_UNSIGNED_CHAR:           1445     //case value::ARRAY_UNSIGNED_CHAR:
1446     //case value::ARRAY_CHAR:                    1446     //case value::ARRAY_CHAR:
1447     case value::ARRAY_UNSIGNED_SHORT:            1447     case value::ARRAY_UNSIGNED_SHORT:
1448     case value::ARRAY_SHORT:                     1448     case value::ARRAY_SHORT:
1449     case value::ARRAY_UNSIGNED_INT:              1449     case value::ARRAY_UNSIGNED_INT:
1450     case value::ARRAY_INT:                       1450     case value::ARRAY_INT:
1451     case value::ARRAY_UNSIGNED_INT64:            1451     case value::ARRAY_UNSIGNED_INT64:
1452     case value::ARRAY_INT64:                     1452     case value::ARRAY_INT64:
1453     case value::ARRAY_FLOAT:                     1453     case value::ARRAY_FLOAT:
1454     //case value::ARRAY_DOUBLE:                  1454     //case value::ARRAY_DOUBLE:
1455     case value::ARRAY_BOOL:                      1455     case value::ARRAY_BOOL:
1456     case value::ARRAY_STRING:                    1456     case value::ARRAY_STRING:
1457       break;                                     1457       break;
1458     }                                            1458     }
1459     break;                                       1459     break;
1460   case value::FLOAT:                             1460   case value::FLOAT:
1461     switch(aV.m_type) {                          1461     switch(aV.m_type) {
1462     case value::INT:                             1462     case value::INT:
1463       if(aV.u.m_int==0) {                        1463       if(aV.u.m_int==0) {
1464         aError = value::error_div_zero();        1464         aError = value::error_div_zero();
1465         aThis.set_none();                        1465         aThis.set_none();
1466         return false;                            1466         return false;
1467       } else {                                   1467       } else {
1468         aThis.u.m_float /= aV.u.m_int;           1468         aThis.u.m_float /= aV.u.m_int;
1469         return true;                             1469         return true;
1470       }                                          1470       }
1471     case value::SHORT:                           1471     case value::SHORT:
1472       if(aV.u.m_short==0) {                      1472       if(aV.u.m_short==0) {
1473         aError = value::error_div_zero();        1473         aError = value::error_div_zero();
1474         aThis.set_none();                        1474         aThis.set_none();
1475         return false;                            1475         return false;
1476       } else {                                   1476       } else {
1477         aThis.u.m_float /= aV.u.m_short;         1477         aThis.u.m_float /= aV.u.m_short;
1478         return true;                             1478         return true;
1479       }                                          1479       }
1480     case value::FLOAT:                           1480     case value::FLOAT:
1481       if(aV.u.m_float==0.0F) {                   1481       if(aV.u.m_float==0.0F) {
1482         aError = value::error_div_zero();        1482         aError = value::error_div_zero();
1483         aThis.set_none();                        1483         aThis.set_none();
1484         return false;                            1484         return false;
1485       } else {                                   1485       } else {
1486         aThis.u.m_float /= aV.u.m_float;         1486         aThis.u.m_float /= aV.u.m_float;
1487         return true;                             1487         return true;
1488       }                                          1488       }
1489     case value::DOUBLE:                          1489     case value::DOUBLE:
1490       if(aV.u.m_double==0.0F) {                  1490       if(aV.u.m_double==0.0F) {
1491         aError = value::error_div_zero();        1491         aError = value::error_div_zero();
1492         aThis.set_none();                        1492         aThis.set_none();
1493         return false;                            1493         return false;
1494       } else {                                   1494       } else {
1495         double tmp = double(aThis.u.m_float)/    1495         double tmp = double(aThis.u.m_float)/aV.u.m_double;
1496         aThis.set(tmp);                          1496         aThis.set(tmp);
1497         return true;                             1497         return true;
1498       }                                          1498       }
1499     case value::UNSIGNED_INT:                    1499     case value::UNSIGNED_INT:
1500       if(aV.u.m_unsigned_int==0) {               1500       if(aV.u.m_unsigned_int==0) {
1501         aError = value::error_div_zero();        1501         aError = value::error_div_zero();
1502         aThis.set_none();                        1502         aThis.set_none();
1503         return false;                            1503         return false;
1504       } else {                                   1504       } else {
1505         aThis.u.m_float /= aV.u.m_unsigned_in    1505         aThis.u.m_float /= aV.u.m_unsigned_int;
1506         return true;                             1506         return true;
1507       }                                          1507       }
1508     case value::UNSIGNED_SHORT:                  1508     case value::UNSIGNED_SHORT:
1509       if(aV.u.m_unsigned_short==0) {             1509       if(aV.u.m_unsigned_short==0) {
1510         aError = value::error_div_zero();        1510         aError = value::error_div_zero();
1511         aThis.set_none();                        1511         aThis.set_none();
1512         return false;                            1512         return false;
1513       } else {                                   1513       } else {
1514         aThis.u.m_float /= aV.u.m_unsigned_sh    1514         aThis.u.m_float /= aV.u.m_unsigned_short;
1515         return true;                             1515         return true;
1516       }                                          1516       }
1517     case value::UNSIGNED_INT64:                  1517     case value::UNSIGNED_INT64:
1518       if(aV.u.m_unsigned_int64==0) {             1518       if(aV.u.m_unsigned_int64==0) {
1519         aError = value::error_div_zero();        1519         aError = value::error_div_zero();
1520         aThis.set_none();                        1520         aThis.set_none();
1521         return false;                            1521         return false;
1522       } else {                                   1522       } else {
1523         double tmp = double(aThis.u.m_float)/    1523         double tmp = double(aThis.u.m_float)/aV.u.m_unsigned_int64;
1524         aThis.set(tmp);                          1524         aThis.set(tmp);
1525         return true;                             1525         return true;
1526       }                                          1526       }
1527     case value::INT64:                           1527     case value::INT64:
1528       if(aV.u.m_int64==0) {                      1528       if(aV.u.m_int64==0) {
1529         aError = value::error_div_zero();        1529         aError = value::error_div_zero();
1530         aThis.set_none();                        1530         aThis.set_none();
1531         return false;                            1531         return false;
1532       } else {                                   1532       } else {
1533         double tmp = double(aThis.u.m_float)/    1533         double tmp = double(aThis.u.m_float)/aV.u.m_int64;
1534         aThis.set(tmp);                          1534         aThis.set(tmp);
1535         return true;                             1535         return true;
1536       }                                          1536       }
1537     case value::ARRAY_DOUBLE:{                   1537     case value::ARRAY_DOUBLE:{
1538       double tmp = aThis.u.m_float;              1538       double tmp = aThis.u.m_float;
1539       //In the below, this becomes a value::A    1539       //In the below, this becomes a value::ARRAY_DOUBLE.
1540       aThis.set(aV.u.m_array_double->orders()    1540       aThis.set(aV.u.m_array_double->orders(),
1541                 aV.u.m_array_double->vector()    1541                 aV.u.m_array_double->vector());
1542       if(!aThis.u.m_array_double->invert()) {    1542       if(!aThis.u.m_array_double->invert()) {
1543         aError = value::error_div_zero();        1543         aError = value::error_div_zero();
1544         aThis.set_none();                        1544         aThis.set_none();
1545         return false;                            1545         return false;
1546       }                                          1546       }
1547       aThis.u.m_array_double->multiply(tmp);     1547       aThis.u.m_array_double->multiply(tmp);
1548       return true;}                              1548       return true;}
1549                                                  1549 
1550     case value::NONE:                            1550     case value::NONE:
1551     case value::VOID_STAR:                       1551     case value::VOID_STAR:
1552     case value::BOOL:                            1552     case value::BOOL:
1553     //case value::UNSIGNED_CHAR:                 1553     //case value::UNSIGNED_CHAR:
1554     //case value::CHAR:                          1554     //case value::CHAR:
1555     case value::DOUBLE_STAR:                     1555     case value::DOUBLE_STAR:
1556     case value::FLOAT_STAR:                      1556     case value::FLOAT_STAR:
1557     case value::INT_STAR:                        1557     case value::INT_STAR:
1558     case value::STRING:                          1558     case value::STRING:
1559     //case value::ARRAY_UNSIGNED_CHAR:           1559     //case value::ARRAY_UNSIGNED_CHAR:
1560     //case value::ARRAY_CHAR:                    1560     //case value::ARRAY_CHAR:
1561     case value::ARRAY_UNSIGNED_SHORT:            1561     case value::ARRAY_UNSIGNED_SHORT:
1562     case value::ARRAY_SHORT:                     1562     case value::ARRAY_SHORT:
1563     case value::ARRAY_UNSIGNED_INT:              1563     case value::ARRAY_UNSIGNED_INT:
1564     case value::ARRAY_INT:                       1564     case value::ARRAY_INT:
1565     case value::ARRAY_UNSIGNED_INT64:            1565     case value::ARRAY_UNSIGNED_INT64:
1566     case value::ARRAY_INT64:                     1566     case value::ARRAY_INT64:
1567     case value::ARRAY_FLOAT:                     1567     case value::ARRAY_FLOAT:
1568     //case value::ARRAY_DOUBLE:                  1568     //case value::ARRAY_DOUBLE:
1569     case value::ARRAY_BOOL:                      1569     case value::ARRAY_BOOL:
1570     case value::ARRAY_STRING:                    1570     case value::ARRAY_STRING:
1571       break;                                     1571       break;
1572     }                                            1572     }
1573     break;                                       1573     break;
1574   case value::DOUBLE:                            1574   case value::DOUBLE:
1575     switch(aV.m_type) {                          1575     switch(aV.m_type) {
1576     case value::SHORT:                           1576     case value::SHORT:
1577       if(aV.u.m_short==0) {                      1577       if(aV.u.m_short==0) {
1578         aError = value::error_div_zero();        1578         aError = value::error_div_zero();
1579         aThis.set_none();                        1579         aThis.set_none();
1580         return false;                            1580         return false;
1581       } else {                                   1581       } else {
1582         aThis.u.m_double /= aV.u.m_short;        1582         aThis.u.m_double /= aV.u.m_short;
1583         return true;                             1583         return true;
1584       }                                          1584       }
1585     case value::INT:                             1585     case value::INT:
1586       if(aV.u.m_int==0) {                        1586       if(aV.u.m_int==0) {
1587         aError = value::error_div_zero();        1587         aError = value::error_div_zero();
1588         aThis.set_none();                        1588         aThis.set_none();
1589         return false;                            1589         return false;
1590       } else {                                   1590       } else {
1591         aThis.u.m_double /= aV.u.m_int;          1591         aThis.u.m_double /= aV.u.m_int;
1592         return true;                             1592         return true;
1593       }                                          1593       }
1594     case value::INT64:                           1594     case value::INT64:
1595       if(aV.u.m_int64==0) {                      1595       if(aV.u.m_int64==0) {
1596         aError = value::error_div_zero();        1596         aError = value::error_div_zero();
1597         aThis.set_none();                        1597         aThis.set_none();
1598         return false;                            1598         return false;
1599       } else {                                   1599       } else {
1600         aThis.u.m_double /= aV.u.m_int64;        1600         aThis.u.m_double /= aV.u.m_int64;
1601         return true;                             1601         return true;
1602       }                                          1602       }
1603     case value::FLOAT:                           1603     case value::FLOAT:
1604       if(aV.u.m_float==0.0F) {                   1604       if(aV.u.m_float==0.0F) {
1605         aError = value::error_div_zero();        1605         aError = value::error_div_zero();
1606         aThis.set_none();                        1606         aThis.set_none();
1607         return false;                            1607         return false;
1608       } else {                                   1608       } else {
1609         aThis.u.m_double /= aV.u.m_float;        1609         aThis.u.m_double /= aV.u.m_float;
1610         return true;                             1610         return true;
1611       }                                          1611       }
1612     case value::DOUBLE:                          1612     case value::DOUBLE:
1613       if(aV.u.m_double==0) {                     1613       if(aV.u.m_double==0) {
1614         aError = value::error_div_zero();        1614         aError = value::error_div_zero();
1615         aThis.set_none();                        1615         aThis.set_none();
1616         return false;                            1616         return false;
1617       } else {                                   1617       } else {
1618         aThis.u.m_double /= aV.u.m_double;       1618         aThis.u.m_double /= aV.u.m_double;
1619         return true;                             1619         return true;
1620       }                                          1620       }
1621     case value::UNSIGNED_INT:                    1621     case value::UNSIGNED_INT:
1622       if(aV.u.m_unsigned_int==0) {               1622       if(aV.u.m_unsigned_int==0) {
1623         aError = value::error_div_zero();        1623         aError = value::error_div_zero();
1624         aThis.set_none();                        1624         aThis.set_none();
1625         return false;                            1625         return false;
1626       } else {                                   1626       } else {
1627         aThis.u.m_double /= aV.u.m_unsigned_i    1627         aThis.u.m_double /= aV.u.m_unsigned_int;
1628         return true;                             1628         return true;
1629       }                                          1629       }
1630     case value::UNSIGNED_SHORT:                  1630     case value::UNSIGNED_SHORT:
1631       if(aV.u.m_unsigned_short==0) {             1631       if(aV.u.m_unsigned_short==0) {
1632         aError = value::error_div_zero();        1632         aError = value::error_div_zero();
1633         aThis.set_none();                        1633         aThis.set_none();
1634         return false;                            1634         return false;
1635       } else {                                   1635       } else {
1636         aThis.u.m_double /= aV.u.m_unsigned_s    1636         aThis.u.m_double /= aV.u.m_unsigned_short;
1637         return true;                             1637         return true;
1638       }                                          1638       }
1639     case value::UNSIGNED_INT64:                  1639     case value::UNSIGNED_INT64:
1640       if(aV.u.m_unsigned_int64==0) {             1640       if(aV.u.m_unsigned_int64==0) {
1641         aError = value::error_div_zero();        1641         aError = value::error_div_zero();
1642         aThis.set_none();                        1642         aThis.set_none();
1643         return false;                            1643         return false;
1644       } else {                                   1644       } else {
1645         aThis.u.m_double /= aV.u.m_unsigned_i    1645         aThis.u.m_double /= aV.u.m_unsigned_int64;
1646         return true;                             1646         return true;
1647       }                                          1647       }
1648     case value::ARRAY_DOUBLE:{                   1648     case value::ARRAY_DOUBLE:{
1649       double tmp = aThis.u.m_double;             1649       double tmp = aThis.u.m_double;
1650       //In the below, this becomes a value::A    1650       //In the below, this becomes a value::ARRAY_DOUBLE.
1651       aThis.set(aV.u.m_array_double->orders()    1651       aThis.set(aV.u.m_array_double->orders(),
1652                 aV.u.m_array_double->vector()    1652                 aV.u.m_array_double->vector());
1653       if(!aThis.u.m_array_double->invert()) {    1653       if(!aThis.u.m_array_double->invert()) {
1654         aError = value::error_div_zero();        1654         aError = value::error_div_zero();
1655         aThis.set_none();                        1655         aThis.set_none();
1656         return false;                            1656         return false;
1657       }                                          1657       }
1658       aThis.u.m_array_double->multiply(tmp);     1658       aThis.u.m_array_double->multiply(tmp);
1659       return true;}                              1659       return true;}
1660                                                  1660 
1661     case value::NONE:                            1661     case value::NONE:
1662     case value::VOID_STAR:                       1662     case value::VOID_STAR:
1663     case value::BOOL:                            1663     case value::BOOL:
1664     //case value::UNSIGNED_CHAR:                 1664     //case value::UNSIGNED_CHAR:
1665     //case value::CHAR:                          1665     //case value::CHAR:
1666     case value::DOUBLE_STAR:                     1666     case value::DOUBLE_STAR:
1667     case value::FLOAT_STAR:                      1667     case value::FLOAT_STAR:
1668     case value::INT_STAR:                        1668     case value::INT_STAR:
1669     case value::STRING:                          1669     case value::STRING:
1670     //case value::ARRAY_UNSIGNED_CHAR:           1670     //case value::ARRAY_UNSIGNED_CHAR:
1671     //case value::ARRAY_CHAR:                    1671     //case value::ARRAY_CHAR:
1672     case value::ARRAY_UNSIGNED_SHORT:            1672     case value::ARRAY_UNSIGNED_SHORT:
1673     case value::ARRAY_SHORT:                     1673     case value::ARRAY_SHORT:
1674     case value::ARRAY_UNSIGNED_INT:              1674     case value::ARRAY_UNSIGNED_INT:
1675     case value::ARRAY_INT:                       1675     case value::ARRAY_INT:
1676     case value::ARRAY_UNSIGNED_INT64:            1676     case value::ARRAY_UNSIGNED_INT64:
1677     case value::ARRAY_INT64:                     1677     case value::ARRAY_INT64:
1678     case value::ARRAY_FLOAT:                     1678     case value::ARRAY_FLOAT:
1679     //case value::ARRAY_DOUBLE:                  1679     //case value::ARRAY_DOUBLE:
1680     case value::ARRAY_BOOL:                      1680     case value::ARRAY_BOOL:
1681     case value::ARRAY_STRING:                    1681     case value::ARRAY_STRING:
1682       break;                                     1682       break;
1683     }                                            1683     }
1684     break;                                       1684     break;
1685   case value::UNSIGNED_INT:                      1685   case value::UNSIGNED_INT:
1686     switch(aV.m_type) {                          1686     switch(aV.m_type) {
1687     case value::UNSIGNED_INT:                    1687     case value::UNSIGNED_INT:
1688       if(aV.u.m_unsigned_int==0) {               1688       if(aV.u.m_unsigned_int==0) {
1689         aError = value::error_div_zero();        1689         aError = value::error_div_zero();
1690         aThis.set_none();                        1690         aThis.set_none();
1691         return false;                            1691         return false;
1692       } else {                                   1692       } else {
1693         unsigned int tmp = aThis.u.m_unsigned    1693         unsigned int tmp = aThis.u.m_unsigned_int/aV.u.m_unsigned_int;
1694         aThis.set(tmp);                          1694         aThis.set(tmp);
1695         return true;                             1695         return true;
1696       }                                          1696       }
1697     case value::FLOAT:                           1697     case value::FLOAT:
1698       if(aV.u.m_float==0) {                      1698       if(aV.u.m_float==0) {
1699         aError = value::error_div_zero();        1699         aError = value::error_div_zero();
1700         aThis.set_none();                        1700         aThis.set_none();
1701         return false;                            1701         return false;
1702       } else {                                   1702       } else {
1703         float d = float(aThis.u.m_unsigned_in    1703         float d = float(aThis.u.m_unsigned_int)/aV.u.m_float;
1704         aThis.set(d); //this becomes a value:    1704         aThis.set(d); //this becomes a value::FLOAT.
1705         return true;                             1705         return true;
1706       }                                          1706       }
1707     case value::DOUBLE:                          1707     case value::DOUBLE:
1708       if(aV.u.m_double==0) {                     1708       if(aV.u.m_double==0) {
1709         aError = value::error_div_zero();        1709         aError = value::error_div_zero();
1710         aThis.set_none();                        1710         aThis.set_none();
1711         return false;                            1711         return false;
1712       } else {                                   1712       } else {
1713         double d = double(aThis.u.m_unsigned_    1713         double d = double(aThis.u.m_unsigned_int)/aV.u.m_double;
1714         aThis.set(d); //this becomes a value:    1714         aThis.set(d); //this becomes a value::DOUBLE.
1715         return true;                             1715         return true;
1716       }                                          1716       }
1717     case value::ARRAY_DOUBLE:{                   1717     case value::ARRAY_DOUBLE:{
1718       unsigned int tmp = aThis.u.m_unsigned_i    1718       unsigned int tmp = aThis.u.m_unsigned_int;
1719       //In the below, this becomes a value::A    1719       //In the below, this becomes a value::ARRAY_DOUBLE.
1720       aThis.set(aV.u.m_array_double->orders()    1720       aThis.set(aV.u.m_array_double->orders(),
1721                 aV.u.m_array_double->vector()    1721                 aV.u.m_array_double->vector());
1722       if(!aThis.u.m_array_double->invert()) {    1722       if(!aThis.u.m_array_double->invert()) {
1723         aError = value::error_div_zero();        1723         aError = value::error_div_zero();
1724         aThis.set_none();                        1724         aThis.set_none();
1725         return false;                            1725         return false;
1726       }                                          1726       }
1727       aThis.u.m_array_double->multiply(double    1727       aThis.u.m_array_double->multiply(double(tmp));
1728       return true;}                              1728       return true;}
1729                                                  1729 
1730     case value::NONE:                            1730     case value::NONE:
1731     case value::INT:                             1731     case value::INT:
1732     case value::VOID_STAR:                       1732     case value::VOID_STAR:
1733     case value::BOOL:                            1733     case value::BOOL:
1734     case value::SHORT:                           1734     case value::SHORT:
1735     case value::INT64:                           1735     case value::INT64:
1736     //case value::UNSIGNED_CHAR:                 1736     //case value::UNSIGNED_CHAR:
1737     //case value::CHAR:                          1737     //case value::CHAR:
1738     case value::UNSIGNED_SHORT :                 1738     case value::UNSIGNED_SHORT :
1739     case value::UNSIGNED_INT64 :                 1739     case value::UNSIGNED_INT64 :
1740     case value::DOUBLE_STAR:                     1740     case value::DOUBLE_STAR:
1741     case value::FLOAT_STAR:                      1741     case value::FLOAT_STAR:
1742     case value::INT_STAR:                        1742     case value::INT_STAR:
1743     case value::STRING:                          1743     case value::STRING:
1744     //case value::ARRAY_UNSIGNED_CHAR:           1744     //case value::ARRAY_UNSIGNED_CHAR:
1745     //case value::ARRAY_CHAR:                    1745     //case value::ARRAY_CHAR:
1746     case value::ARRAY_UNSIGNED_SHORT:            1746     case value::ARRAY_UNSIGNED_SHORT:
1747     case value::ARRAY_SHORT:                     1747     case value::ARRAY_SHORT:
1748     case value::ARRAY_UNSIGNED_INT:              1748     case value::ARRAY_UNSIGNED_INT:
1749     case value::ARRAY_INT:                       1749     case value::ARRAY_INT:
1750     case value::ARRAY_UNSIGNED_INT64:            1750     case value::ARRAY_UNSIGNED_INT64:
1751     case value::ARRAY_INT64:                     1751     case value::ARRAY_INT64:
1752     case value::ARRAY_FLOAT:                     1752     case value::ARRAY_FLOAT:
1753     //case value::ARRAY_DOUBLE:                  1753     //case value::ARRAY_DOUBLE:
1754     case value::ARRAY_BOOL:                      1754     case value::ARRAY_BOOL:
1755     case value::ARRAY_STRING:                    1755     case value::ARRAY_STRING:
1756       break;                                     1756       break;
1757     }                                            1757     }
1758     break;                                       1758     break;
1759   case value::ARRAY_DOUBLE:                      1759   case value::ARRAY_DOUBLE:
1760     switch(aV.m_type) {                          1760     switch(aV.m_type) {
1761     case value::INT:                             1761     case value::INT:
1762       if(aV.u.m_int==0) {                        1762       if(aV.u.m_int==0) {
1763         aError = value::error_div_zero();        1763         aError = value::error_div_zero();
1764         aThis.set_none();                        1764         aThis.set_none();
1765         return false;                            1765         return false;
1766       } else {                                   1766       } else {
1767         double value = 1./aV.u.m_int;            1767         double value = 1./aV.u.m_int;
1768         aThis.u.m_array_double->multiply(valu    1768         aThis.u.m_array_double->multiply(value);
1769         return true;                             1769         return true;
1770       }                                          1770       }
1771     case value::UNSIGNED_INT:                    1771     case value::UNSIGNED_INT:
1772       if(aV.u.m_unsigned_int==0) {               1772       if(aV.u.m_unsigned_int==0) {
1773         aError = value::error_div_zero();        1773         aError = value::error_div_zero();
1774         aThis.set_none();                        1774         aThis.set_none();
1775         return false;                            1775         return false;
1776       } else {                                   1776       } else {
1777         double value = 1./aV.u.m_unsigned_int    1777         double value = 1./aV.u.m_unsigned_int;
1778         aThis.u.m_array_double->multiply(valu    1778         aThis.u.m_array_double->multiply(value);
1779         return true;                             1779         return true;
1780       }                                          1780       }
1781     case value::DOUBLE:                          1781     case value::DOUBLE:
1782       if(aV.u.m_double==0) {                     1782       if(aV.u.m_double==0) {
1783         aError = value::error_div_zero();        1783         aError = value::error_div_zero();
1784         aThis.set_none();                        1784         aThis.set_none();
1785         return false;                            1785         return false;
1786       } else {                                   1786       } else {
1787         aThis.u.m_array_double->multiply(1./a    1787         aThis.u.m_array_double->multiply(1./aV.u.m_double);
1788         return true;                             1788         return true;
1789       }                                          1789       }
1790     case value::ARRAY_DOUBLE:{                   1790     case value::ARRAY_DOUBLE:{
1791       if(aThis.u.m_array_double->orders()!=aV    1791       if(aThis.u.m_array_double->orders()!=aV.u.m_array_double->orders()) {
1792         aError = value::error_div_zero(); //F    1792         aError = value::error_div_zero(); //FIXME : error_mismatch_orders
1793         aThis.set_none();                        1793         aThis.set_none();
1794         return false;                            1794         return false;
1795       }                                          1795       }
1796       std::vector<double>& stdv = aThis.u.m_a    1796       std::vector<double>& stdv = aThis.u.m_array_double->vector();
1797       const std::vector<double>& stdv2 = aV.u    1797       const std::vector<double>& stdv2 = aV.u.m_array_double->vector();
1798       bool has_div_zero = false;                 1798       bool has_div_zero = false;
1799       size_t number = stdv.size();               1799       size_t number = stdv.size();
1800       for(size_t index=0;index<number;index++    1800       for(size_t index=0;index<number;index++) {
1801         if(stdv2[index]==0) {                    1801         if(stdv2[index]==0) {
1802           //FIXME : stdv[index] = nan;           1802           //FIXME : stdv[index] = nan;
1803           stdv[index] = 0; //PAW convention.     1803           stdv[index] = 0; //PAW convention.
1804           has_div_zero = true;                   1804           has_div_zero = true;
1805         } else {                                 1805         } else {
1806           stdv[index] /= stdv2[index];           1806           stdv[index] /= stdv2[index];
1807         }                                        1807         }
1808       }                                          1808       }
1809       if(has_div_zero) {                         1809       if(has_div_zero) {
1810         aError = value::error_div_zero();        1810         aError = value::error_div_zero();
1811         // For OpenPAW/pasigm::SIGMA, continu    1811         // For OpenPAW/pasigm::SIGMA, continue anyway in case of /0 errors.
1812         //aThis.set_none();                      1812         //aThis.set_none();
1813         //return false; //FIXME : is so, then    1813         //return false; //FIXME : is so, then it will stop Processor.
1814         return true; //FIXME : do we want tha    1814         return true; //FIXME : do we want that ?
1815       }                                          1815       }
1816                                                  1816 
1817       return true;}                              1817       return true;}
1818                                                  1818 
1819     case value::NONE:                            1819     case value::NONE:
1820     case value::STRING:                          1820     case value::STRING:
1821     case value::VOID_STAR:                       1821     case value::VOID_STAR:
1822     case value::BOOL:                            1822     case value::BOOL:
1823     case value::SHORT:                           1823     case value::SHORT:
1824     case value::FLOAT:                           1824     case value::FLOAT:
1825     //case value::UNSIGNED_CHAR:                 1825     //case value::UNSIGNED_CHAR:
1826     //case value::CHAR:                          1826     //case value::CHAR:
1827     case value::INT64:                           1827     case value::INT64:
1828     case value::UNSIGNED_SHORT :                 1828     case value::UNSIGNED_SHORT :
1829     case value::UNSIGNED_INT64 :                 1829     case value::UNSIGNED_INT64 :
1830     case value::DOUBLE_STAR:                     1830     case value::DOUBLE_STAR:
1831     case value::FLOAT_STAR:                      1831     case value::FLOAT_STAR:
1832     case value::INT_STAR:                        1832     case value::INT_STAR:
1833     //case value::ARRAY_UNSIGNED_CHAR:           1833     //case value::ARRAY_UNSIGNED_CHAR:
1834     //case value::ARRAY_CHAR:                    1834     //case value::ARRAY_CHAR:
1835     case value::ARRAY_UNSIGNED_SHORT:            1835     case value::ARRAY_UNSIGNED_SHORT:
1836     case value::ARRAY_SHORT:                     1836     case value::ARRAY_SHORT:
1837     case value::ARRAY_UNSIGNED_INT:              1837     case value::ARRAY_UNSIGNED_INT:
1838     case value::ARRAY_INT:                       1838     case value::ARRAY_INT:
1839     case value::ARRAY_UNSIGNED_INT64:            1839     case value::ARRAY_UNSIGNED_INT64:
1840     case value::ARRAY_INT64:                     1840     case value::ARRAY_INT64:
1841     case value::ARRAY_FLOAT:                     1841     case value::ARRAY_FLOAT:
1842     //case value::ARRAY_DOUBLE:                  1842     //case value::ARRAY_DOUBLE:
1843     case value::ARRAY_BOOL:                      1843     case value::ARRAY_BOOL:
1844     case value::ARRAY_STRING:                    1844     case value::ARRAY_STRING:
1845       break;                                     1845       break;
1846     }                                            1846     }
1847     break;                                       1847     break;
1848                                                  1848 
1849   case value::NONE:                              1849   case value::NONE:
1850   case value::STRING:                            1850   case value::STRING:
1851   case value::VOID_STAR:                         1851   case value::VOID_STAR:
1852   case value::BOOL:                              1852   case value::BOOL:
1853   case value::SHORT:                             1853   case value::SHORT:
1854   //case value::UNSIGNED_CHAR:                   1854   //case value::UNSIGNED_CHAR:
1855   //case value::CHAR:                            1855   //case value::CHAR:
1856   case value::INT64:                             1856   case value::INT64:
1857   case value::UNSIGNED_SHORT :                   1857   case value::UNSIGNED_SHORT :
1858   case value::UNSIGNED_INT64 :                   1858   case value::UNSIGNED_INT64 :
1859   case value::DOUBLE_STAR:                       1859   case value::DOUBLE_STAR:
1860   case value::FLOAT_STAR:                        1860   case value::FLOAT_STAR:
1861   case value::INT_STAR:                          1861   case value::INT_STAR:
1862   //case value::ARRAY_UNSIGNED_CHAR:             1862   //case value::ARRAY_UNSIGNED_CHAR:
1863   //case value::ARRAY_CHAR:                      1863   //case value::ARRAY_CHAR:
1864   case value::ARRAY_UNSIGNED_SHORT:              1864   case value::ARRAY_UNSIGNED_SHORT:
1865   case value::ARRAY_SHORT:                       1865   case value::ARRAY_SHORT:
1866   case value::ARRAY_UNSIGNED_INT:                1866   case value::ARRAY_UNSIGNED_INT:
1867   case value::ARRAY_INT:                         1867   case value::ARRAY_INT:
1868   case value::ARRAY_UNSIGNED_INT64:              1868   case value::ARRAY_UNSIGNED_INT64:
1869   case value::ARRAY_INT64:                       1869   case value::ARRAY_INT64:
1870   case value::ARRAY_FLOAT:                       1870   case value::ARRAY_FLOAT:
1871   //case value::ARRAY_DOUBLE:                    1871   //case value::ARRAY_DOUBLE:
1872   case value::ARRAY_BOOL:                        1872   case value::ARRAY_BOOL:
1873   case value::ARRAY_STRING:                      1873   case value::ARRAY_STRING:
1874     break;                                       1874     break;
1875   }                                              1875   }
1876   aError = std::string("Value::divide :")        1876   aError = std::string("Value::divide :")
1877          + " can't apply on type " + value::s    1877          + " can't apply on type " + value::stype(oType)
1878          + " and type " + aV.stype();            1878          + " and type " + aV.stype();
1879   aThis.set_none();                              1879   aThis.set_none();
1880   return false;                                  1880   return false;
1881 }                                                1881 }
1882                                                  1882 
1883 /////////////////////////////////////////////    1883 //////////////////////////////////////////////////////////////////////////////
1884 /////////////////////////////////////////////    1884 //////////////////////////////////////////////////////////////////////////////
1885 /////////////////////////////////////////////    1885 //////////////////////////////////////////////////////////////////////////////
1886                                                  1886 
1887 inline bool value::if_gt(value& aThis,const v    1887 inline bool value::if_gt(value& aThis,const value& aV,std::string& aError){
1888   value::e_type oType = aThis.m_type;            1888   value::e_type oType = aThis.m_type;
1889   switch(aThis.m_type) {                         1889   switch(aThis.m_type) {
1890   case value::INT:                               1890   case value::INT:
1891     switch(aV.m_type) {                          1891     switch(aV.m_type) {
1892     case value::INT:                             1892     case value::INT:
1893       aThis.set((bool)(aThis.u.m_int>aV.u.m_i    1893       aThis.set((bool)(aThis.u.m_int>aV.u.m_int?true:false));
1894       return true;                               1894       return true;
1895     case value::FLOAT:                           1895     case value::FLOAT:
1896       aThis.set((bool)(aThis.u.m_int>aV.u.m_f    1896       aThis.set((bool)(aThis.u.m_int>aV.u.m_float?true:false));
1897       return true;                               1897       return true;
1898     case value::DOUBLE:                          1898     case value::DOUBLE:
1899       aThis.set((bool)(aThis.u.m_int>aV.u.m_d    1899       aThis.set((bool)(aThis.u.m_int>aV.u.m_double?true:false));
1900       return true;                               1900       return true;
1901     case value::UNSIGNED_SHORT :                 1901     case value::UNSIGNED_SHORT :
1902       aThis.set((bool)(aThis.u.m_int>(int)aV.    1902       aThis.set((bool)(aThis.u.m_int>(int)aV.u.m_unsigned_short?true:false));
1903       return true;                               1903       return true;
1904     case value::UNSIGNED_INT:                    1904     case value::UNSIGNED_INT:
1905       aThis.set((bool)(aThis.u.m_int>(int)aV.    1905       aThis.set((bool)(aThis.u.m_int>(int)aV.u.m_unsigned_int?true:false));
1906       return true;                               1906       return true;
1907     case value::ARRAY_DOUBLE:{                   1907     case value::ARRAY_DOUBLE:{
1908       const std::vector<double>& stdv = aV.u.    1908       const std::vector<double>& stdv = aV.u.m_array_double->vector();
1909       size_t number = stdv.size();               1909       size_t number = stdv.size();
1910       for(size_t index=0;index<number;index++    1910       for(size_t index=0;index<number;index++) {
1911         if(aThis.u.m_int<=stdv[index]) {         1911         if(aThis.u.m_int<=stdv[index]) {
1912           aThis.set(false);                      1912           aThis.set(false);
1913           return true;                           1913           return true;
1914         }                                        1914         }
1915       }                                          1915       }
1916       aThis.set(true);                           1916       aThis.set(true);
1917       return true;                               1917       return true;
1918     }                                            1918     }
1919     case value::NONE:                            1919     case value::NONE:
1920     case value::VOID_STAR:                       1920     case value::VOID_STAR:
1921     case value::BOOL:                            1921     case value::BOOL:
1922     case value::SHORT:                           1922     case value::SHORT:
1923     case value::INT64:                           1923     case value::INT64:
1924     //case value::UNSIGNED_CHAR:                 1924     //case value::UNSIGNED_CHAR:
1925     //case value::CHAR:                          1925     //case value::CHAR:
1926     case value::UNSIGNED_INT64 :                 1926     case value::UNSIGNED_INT64 :
1927     case value::DOUBLE_STAR:                     1927     case value::DOUBLE_STAR:
1928     case value::FLOAT_STAR:                      1928     case value::FLOAT_STAR:
1929     case value::INT_STAR:                        1929     case value::INT_STAR:
1930     case value::STRING:                          1930     case value::STRING:
1931     //case value::ARRAY_UNSIGNED_CHAR:           1931     //case value::ARRAY_UNSIGNED_CHAR:
1932     //case value::ARRAY_CHAR:                    1932     //case value::ARRAY_CHAR:
1933     case value::ARRAY_UNSIGNED_SHORT:            1933     case value::ARRAY_UNSIGNED_SHORT:
1934     case value::ARRAY_SHORT:                     1934     case value::ARRAY_SHORT:
1935     case value::ARRAY_UNSIGNED_INT:              1935     case value::ARRAY_UNSIGNED_INT:
1936     case value::ARRAY_INT:                       1936     case value::ARRAY_INT:
1937     case value::ARRAY_UNSIGNED_INT64:            1937     case value::ARRAY_UNSIGNED_INT64:
1938     case value::ARRAY_INT64:                     1938     case value::ARRAY_INT64:
1939     case value::ARRAY_FLOAT:                     1939     case value::ARRAY_FLOAT:
1940     //case value::ARRAY_DOUBLE:                  1940     //case value::ARRAY_DOUBLE:
1941     case value::ARRAY_BOOL:                      1941     case value::ARRAY_BOOL:
1942     case value::ARRAY_STRING:                    1942     case value::ARRAY_STRING:
1943       break;                                     1943       break;
1944     }                                            1944     }
1945     break;                                       1945     break;
1946   case value::DOUBLE:                            1946   case value::DOUBLE:
1947     switch(aV.m_type) {                          1947     switch(aV.m_type) {
1948     case value::DOUBLE:                          1948     case value::DOUBLE:
1949       aThis.set((bool)(aThis.u.m_double>aV.u.    1949       aThis.set((bool)(aThis.u.m_double>aV.u.m_double?true:false));
1950       return true;                               1950       return true;
1951     case value::FLOAT:                           1951     case value::FLOAT:
1952       aThis.set((bool)(aThis.u.m_double>aV.u.    1952       aThis.set((bool)(aThis.u.m_double>aV.u.m_float?true:false));
1953       return true;                               1953       return true;
1954     case value::INT:                             1954     case value::INT:
1955       aThis.set((bool)(aThis.u.m_double>aV.u.    1955       aThis.set((bool)(aThis.u.m_double>aV.u.m_int?true:false));
1956       return true;                               1956       return true;
1957     case value::UNSIGNED_SHORT :                 1957     case value::UNSIGNED_SHORT :
1958       aThis.set((bool)(aThis.u.m_double>aV.u.    1958       aThis.set((bool)(aThis.u.m_double>aV.u.m_unsigned_short?true:false));
1959       return true;                               1959       return true;
1960     case value::UNSIGNED_INT:                    1960     case value::UNSIGNED_INT:
1961       aThis.set((bool)(aThis.u.m_double>aV.u.    1961       aThis.set((bool)(aThis.u.m_double>aV.u.m_unsigned_int?true:false));
1962       return true;                               1962       return true;
1963     case value::ARRAY_DOUBLE:{                   1963     case value::ARRAY_DOUBLE:{
1964       const std::vector<double>& stdv = aV.u.    1964       const std::vector<double>& stdv = aV.u.m_array_double->vector();
1965       size_t number = stdv.size();               1965       size_t number = stdv.size();
1966       for(size_t index=0;index<number;index++    1966       for(size_t index=0;index<number;index++) {
1967         if(aThis.u.m_double<=stdv[index]) {      1967         if(aThis.u.m_double<=stdv[index]) {
1968           aThis.set(false);                      1968           aThis.set(false);
1969           return true;                           1969           return true;
1970         }                                        1970         }
1971       }                                          1971       }
1972       aThis.set(true);                           1972       aThis.set(true);
1973       return true;                               1973       return true;
1974     }                                            1974     }
1975     case value::NONE:                            1975     case value::NONE:
1976     case value::VOID_STAR:                       1976     case value::VOID_STAR:
1977     case value::BOOL:                            1977     case value::BOOL:
1978     case value::SHORT:                           1978     case value::SHORT:
1979     case value::INT64:                           1979     case value::INT64:
1980     //case value::UNSIGNED_CHAR:                 1980     //case value::UNSIGNED_CHAR:
1981     //case value::CHAR:                          1981     //case value::CHAR:
1982     case value::UNSIGNED_INT64 :                 1982     case value::UNSIGNED_INT64 :
1983     case value::DOUBLE_STAR:                     1983     case value::DOUBLE_STAR:
1984     case value::FLOAT_STAR:                      1984     case value::FLOAT_STAR:
1985     case value::INT_STAR:                        1985     case value::INT_STAR:
1986     case value::STRING:                          1986     case value::STRING:
1987     //case value::ARRAY_UNSIGNED_CHAR:           1987     //case value::ARRAY_UNSIGNED_CHAR:
1988     //case value::ARRAY_CHAR:                    1988     //case value::ARRAY_CHAR:
1989     case value::ARRAY_UNSIGNED_SHORT:            1989     case value::ARRAY_UNSIGNED_SHORT:
1990     case value::ARRAY_SHORT:                     1990     case value::ARRAY_SHORT:
1991     case value::ARRAY_UNSIGNED_INT:              1991     case value::ARRAY_UNSIGNED_INT:
1992     case value::ARRAY_INT:                       1992     case value::ARRAY_INT:
1993     case value::ARRAY_UNSIGNED_INT64:            1993     case value::ARRAY_UNSIGNED_INT64:
1994     case value::ARRAY_INT64:                     1994     case value::ARRAY_INT64:
1995     case value::ARRAY_FLOAT:                     1995     case value::ARRAY_FLOAT:
1996     //case value::ARRAY_DOUBLE:                  1996     //case value::ARRAY_DOUBLE:
1997     case value::ARRAY_BOOL:                      1997     case value::ARRAY_BOOL:
1998     case value::ARRAY_STRING:                    1998     case value::ARRAY_STRING:
1999       break;                                     1999       break;
2000     }                                            2000     }
2001     break;                                       2001     break;
2002   case value::FLOAT:                             2002   case value::FLOAT:
2003     switch(aV.m_type) {                          2003     switch(aV.m_type) {
2004     case value::DOUBLE:                          2004     case value::DOUBLE:
2005       aThis.set((bool)(aThis.u.m_float>aV.u.m    2005       aThis.set((bool)(aThis.u.m_float>aV.u.m_double?true:false));
2006       return true;                               2006       return true;
2007     case value::FLOAT:                           2007     case value::FLOAT:
2008       aThis.set((bool)(aThis.u.m_float>aV.u.m    2008       aThis.set((bool)(aThis.u.m_float>aV.u.m_float?true:false));
2009       return true;                               2009       return true;
2010     case value::INT:                             2010     case value::INT:
2011       aThis.set((bool)(aThis.u.m_float>aV.u.m    2011       aThis.set((bool)(aThis.u.m_float>aV.u.m_int?true:false));
2012       return true;                               2012       return true;
2013     case value::UNSIGNED_SHORT :                 2013     case value::UNSIGNED_SHORT :
2014       aThis.set((bool)(aThis.u.m_float>aV.u.m    2014       aThis.set((bool)(aThis.u.m_float>aV.u.m_unsigned_short?true:false));
2015       return true;                               2015       return true;
2016     case value::UNSIGNED_INT:                    2016     case value::UNSIGNED_INT:
2017       aThis.set((bool)(aThis.u.m_float>aV.u.m    2017       aThis.set((bool)(aThis.u.m_float>aV.u.m_unsigned_int?true:false));
2018       return true;                               2018       return true;
2019     case value::ARRAY_DOUBLE:{                   2019     case value::ARRAY_DOUBLE:{
2020       const std::vector<double>& stdv = aV.u.    2020       const std::vector<double>& stdv = aV.u.m_array_double->vector();
2021       size_t number = stdv.size();               2021       size_t number = stdv.size();
2022       for(size_t index=0;index<number;index++    2022       for(size_t index=0;index<number;index++) {
2023         if(aThis.u.m_float<=stdv[index]) {       2023         if(aThis.u.m_float<=stdv[index]) {
2024           aThis.set(false);                      2024           aThis.set(false);
2025           return true;                           2025           return true;
2026         }                                        2026         }
2027       }                                          2027       }
2028       aThis.set(true);                           2028       aThis.set(true);
2029       return true;                               2029       return true;
2030     }                                            2030     }
2031     case value::NONE:                            2031     case value::NONE:
2032     case value::VOID_STAR:                       2032     case value::VOID_STAR:
2033     case value::BOOL:                            2033     case value::BOOL:
2034     case value::SHORT:                           2034     case value::SHORT:
2035     case value::INT64:                           2035     case value::INT64:
2036     //case value::UNSIGNED_CHAR:                 2036     //case value::UNSIGNED_CHAR:
2037     //case value::CHAR:                          2037     //case value::CHAR:
2038     case value::UNSIGNED_INT64 :                 2038     case value::UNSIGNED_INT64 :
2039     case value::DOUBLE_STAR:                     2039     case value::DOUBLE_STAR:
2040     case value::FLOAT_STAR:                      2040     case value::FLOAT_STAR:
2041     case value::INT_STAR:                        2041     case value::INT_STAR:
2042     case value::STRING:                          2042     case value::STRING:
2043     //case value::ARRAY_UNSIGNED_CHAR:           2043     //case value::ARRAY_UNSIGNED_CHAR:
2044     //case value::ARRAY_CHAR:                    2044     //case value::ARRAY_CHAR:
2045     case value::ARRAY_UNSIGNED_SHORT:            2045     case value::ARRAY_UNSIGNED_SHORT:
2046     case value::ARRAY_SHORT:                     2046     case value::ARRAY_SHORT:
2047     case value::ARRAY_UNSIGNED_INT:              2047     case value::ARRAY_UNSIGNED_INT:
2048     case value::ARRAY_INT:                       2048     case value::ARRAY_INT:
2049     case value::ARRAY_UNSIGNED_INT64:            2049     case value::ARRAY_UNSIGNED_INT64:
2050     case value::ARRAY_INT64:                     2050     case value::ARRAY_INT64:
2051     case value::ARRAY_FLOAT:                     2051     case value::ARRAY_FLOAT:
2052     //case value::ARRAY_DOUBLE:                  2052     //case value::ARRAY_DOUBLE:
2053     case value::ARRAY_BOOL:                      2053     case value::ARRAY_BOOL:
2054     case value::ARRAY_STRING:                    2054     case value::ARRAY_STRING:
2055       break;                                     2055       break;
2056     }                                            2056     }
2057     break;                                       2057     break;
2058   case value::VOID_STAR:                         2058   case value::VOID_STAR:
2059     switch(aV.m_type) {                          2059     switch(aV.m_type) {
2060     case value::VOID_STAR:                       2060     case value::VOID_STAR:
2061       aThis.set((bool)(aThis.u.m_void_star>aV    2061       aThis.set((bool)(aThis.u.m_void_star>aV.u.m_void_star?true:false));
2062       return true;                               2062       return true;
2063     case value::NONE:                            2063     case value::NONE:
2064     case value::INT:                             2064     case value::INT:
2065     case value::DOUBLE:                          2065     case value::DOUBLE:
2066     case value::BOOL:                            2066     case value::BOOL:
2067     case value::SHORT:                           2067     case value::SHORT:
2068     case value::INT64:                           2068     case value::INT64:
2069     case value::FLOAT:                           2069     case value::FLOAT:
2070     //case value::UNSIGNED_CHAR:                 2070     //case value::UNSIGNED_CHAR:
2071     //case value::CHAR:                          2071     //case value::CHAR:
2072     case value::UNSIGNED_SHORT :                 2072     case value::UNSIGNED_SHORT :
2073     case value::UNSIGNED_INT:                    2073     case value::UNSIGNED_INT:
2074     case value::UNSIGNED_INT64 :                 2074     case value::UNSIGNED_INT64 :
2075     case value::DOUBLE_STAR:                     2075     case value::DOUBLE_STAR:
2076     case value::FLOAT_STAR:                      2076     case value::FLOAT_STAR:
2077     case value::INT_STAR:                        2077     case value::INT_STAR:
2078     case value::STRING:                          2078     case value::STRING:
2079     //case value::ARRAY_UNSIGNED_CHAR:           2079     //case value::ARRAY_UNSIGNED_CHAR:
2080     //case value::ARRAY_CHAR:                    2080     //case value::ARRAY_CHAR:
2081     case value::ARRAY_UNSIGNED_SHORT:            2081     case value::ARRAY_UNSIGNED_SHORT:
2082     case value::ARRAY_SHORT:                     2082     case value::ARRAY_SHORT:
2083     case value::ARRAY_UNSIGNED_INT:              2083     case value::ARRAY_UNSIGNED_INT:
2084     case value::ARRAY_INT:                       2084     case value::ARRAY_INT:
2085     case value::ARRAY_UNSIGNED_INT64:            2085     case value::ARRAY_UNSIGNED_INT64:
2086     case value::ARRAY_INT64:                     2086     case value::ARRAY_INT64:
2087     case value::ARRAY_FLOAT:                     2087     case value::ARRAY_FLOAT:
2088     case value::ARRAY_DOUBLE:                    2088     case value::ARRAY_DOUBLE:
2089     case value::ARRAY_BOOL:                      2089     case value::ARRAY_BOOL:
2090     case value::ARRAY_STRING:                    2090     case value::ARRAY_STRING:
2091       break;                                     2091       break;
2092     }                                            2092     }
2093     break;                                       2093     break;
2094   case value::UNSIGNED_INT:                      2094   case value::UNSIGNED_INT:
2095     switch(aV.m_type) {                          2095     switch(aV.m_type) {
2096     case value::UNSIGNED_INT:                    2096     case value::UNSIGNED_INT:
2097       aThis.set((bool)(aThis.u.m_unsigned_int    2097       aThis.set((bool)(aThis.u.m_unsigned_int >aV.u.m_unsigned_int ?true:false));
2098       return true;                               2098       return true;
2099     case value::INT:                             2099     case value::INT:
2100       aThis.set((bool)((int)aThis.u.m_unsigne    2100       aThis.set((bool)((int)aThis.u.m_unsigned_int >aV.u.m_int?true:false));
2101       return true;                               2101       return true;
2102     case value::DOUBLE:                          2102     case value::DOUBLE:
2103       aThis.set((bool)(double(aThis.u.m_unsig    2103       aThis.set((bool)(double(aThis.u.m_unsigned_int)>aV.u.m_double?true:false));
2104       return true;                               2104       return true;
2105     case value::FLOAT:                           2105     case value::FLOAT:
2106       aThis.set((bool)(float(aThis.u.m_unsign    2106       aThis.set((bool)(float(aThis.u.m_unsigned_int)>aV.u.m_float?true:false));
2107       return true;                               2107       return true;
2108     case value::NONE:                            2108     case value::NONE:
2109     case value::VOID_STAR:                       2109     case value::VOID_STAR:
2110     case value::BOOL:                            2110     case value::BOOL:
2111     case value::SHORT:                           2111     case value::SHORT:
2112     case value::INT64:                           2112     case value::INT64:
2113     //case value::UNSIGNED_CHAR:                 2113     //case value::UNSIGNED_CHAR:
2114     //case value::CHAR:                          2114     //case value::CHAR:
2115     case value::UNSIGNED_SHORT :                 2115     case value::UNSIGNED_SHORT :
2116     case value::UNSIGNED_INT64 :                 2116     case value::UNSIGNED_INT64 :
2117     case value::DOUBLE_STAR:                     2117     case value::DOUBLE_STAR:
2118     case value::FLOAT_STAR:                      2118     case value::FLOAT_STAR:
2119     case value::INT_STAR:                        2119     case value::INT_STAR:
2120     case value::STRING:                          2120     case value::STRING:
2121     //case value::ARRAY_UNSIGNED_CHAR:           2121     //case value::ARRAY_UNSIGNED_CHAR:
2122     //case value::ARRAY_CHAR:                    2122     //case value::ARRAY_CHAR:
2123     case value::ARRAY_UNSIGNED_SHORT:            2123     case value::ARRAY_UNSIGNED_SHORT:
2124     case value::ARRAY_SHORT:                     2124     case value::ARRAY_SHORT:
2125     case value::ARRAY_UNSIGNED_INT:              2125     case value::ARRAY_UNSIGNED_INT:
2126     case value::ARRAY_INT:                       2126     case value::ARRAY_INT:
2127     case value::ARRAY_UNSIGNED_INT64:            2127     case value::ARRAY_UNSIGNED_INT64:
2128     case value::ARRAY_INT64:                     2128     case value::ARRAY_INT64:
2129     case value::ARRAY_FLOAT:                     2129     case value::ARRAY_FLOAT:
2130     case value::ARRAY_DOUBLE:                    2130     case value::ARRAY_DOUBLE:
2131     case value::ARRAY_BOOL:                      2131     case value::ARRAY_BOOL:
2132     case value::ARRAY_STRING:                    2132     case value::ARRAY_STRING:
2133       break;                                     2133       break;
2134     }                                            2134     }
2135     break;                                       2135     break;
2136   case value::ARRAY_DOUBLE:                      2136   case value::ARRAY_DOUBLE:
2137     switch(aV.m_type) {                          2137     switch(aV.m_type) {
2138     case value::INT:{                            2138     case value::INT:{
2139       const std::vector<double>& stdv = aThis    2139       const std::vector<double>& stdv = aThis.u.m_array_double->vector();
2140       size_t number = stdv.size();               2140       size_t number = stdv.size();
2141       for(size_t index=0;index<number;index++    2141       for(size_t index=0;index<number;index++) {
2142         if(stdv[index]<=aV.u.m_int) {            2142         if(stdv[index]<=aV.u.m_int) {
2143           aThis.set(false);                      2143           aThis.set(false);
2144           return true;                           2144           return true;
2145         }                                        2145         }
2146       }                                          2146       }
2147       aThis.set(true);                           2147       aThis.set(true);
2148       return true;                               2148       return true;
2149     }                                            2149     }
2150     case value::FLOAT:{                          2150     case value::FLOAT:{
2151       const std::vector<double>& stdv = aThis    2151       const std::vector<double>& stdv = aThis.u.m_array_double->vector();
2152       size_t number = stdv.size();               2152       size_t number = stdv.size();
2153       for(size_t index=0;index<number;index++    2153       for(size_t index=0;index<number;index++) {
2154         if(stdv[index]<=aV.u.m_float) {          2154         if(stdv[index]<=aV.u.m_float) {
2155           aThis.set(false);                      2155           aThis.set(false);
2156           return true;                           2156           return true;
2157         }                                        2157         }
2158       }                                          2158       }
2159       aThis.set(true);                           2159       aThis.set(true);
2160       return true;                               2160       return true;
2161     }                                            2161     }
2162     case value::DOUBLE:{                         2162     case value::DOUBLE:{
2163       const std::vector<double>& stdv = aThis    2163       const std::vector<double>& stdv = aThis.u.m_array_double->vector();
2164       size_t number = stdv.size();               2164       size_t number = stdv.size();
2165       for(size_t index=0;index<number;index++    2165       for(size_t index=0;index<number;index++) {
2166         if(stdv[index]<=aV.u.m_double) {         2166         if(stdv[index]<=aV.u.m_double) {
2167           aThis.set(false);                      2167           aThis.set(false);
2168           return true;                           2168           return true;
2169         }                                        2169         }
2170       }                                          2170       }
2171       aThis.set(true);                           2171       aThis.set(true);
2172       return true;                               2172       return true;
2173     }                                            2173     }
2174     case value::UNSIGNED_INT:{                   2174     case value::UNSIGNED_INT:{
2175       const std::vector<double>& stdv = aThis    2175       const std::vector<double>& stdv = aThis.u.m_array_double->vector();
2176       size_t number = stdv.size();               2176       size_t number = stdv.size();
2177       for(size_t index=0;index<number;index++    2177       for(size_t index=0;index<number;index++) {
2178         if(stdv[index]<=aV.u.m_unsigned_int )    2178         if(stdv[index]<=aV.u.m_unsigned_int ) {
2179           aThis.set(false);                      2179           aThis.set(false);
2180           return true;                           2180           return true;
2181         }                                        2181         }
2182       }                                          2182       }
2183       aThis.set(true);                           2183       aThis.set(true);
2184       return true;                               2184       return true;
2185     }                                            2185     }
2186     case value::ARRAY_DOUBLE:{                   2186     case value::ARRAY_DOUBLE:{
2187       const std::vector<double>& stdv = aThis    2187       const std::vector<double>& stdv = aThis.u.m_array_double->vector();
2188       const std::vector<double>& stdv2 = aV.u    2188       const std::vector<double>& stdv2 = aV.u.m_array_double->vector();
2189       if(stdv.size()!=stdv2.size()) break;       2189       if(stdv.size()!=stdv2.size()) break;
2190       size_t number = stdv.size();               2190       size_t number = stdv.size();
2191       for(size_t index=0;index<number;index++    2191       for(size_t index=0;index<number;index++) {
2192         if(stdv[index]<=stdv2[index]) {          2192         if(stdv[index]<=stdv2[index]) {
2193           aThis.set(false);                      2193           aThis.set(false);
2194           return true;                           2194           return true;
2195         }                                        2195         }
2196       }                                          2196       }
2197       aThis.set(true);                           2197       aThis.set(true);
2198       return true;                               2198       return true;
2199     }                                            2199     }
2200     case value::NONE:                            2200     case value::NONE:
2201     case value::VOID_STAR:                       2201     case value::VOID_STAR:
2202     case value::BOOL:                            2202     case value::BOOL:
2203     case value::SHORT:                           2203     case value::SHORT:
2204     case value::INT64:                           2204     case value::INT64:
2205     //case value::UNSIGNED_CHAR:                 2205     //case value::UNSIGNED_CHAR:
2206     //case value::CHAR:                          2206     //case value::CHAR:
2207     case value::UNSIGNED_SHORT :                 2207     case value::UNSIGNED_SHORT :
2208     case value::UNSIGNED_INT64 :                 2208     case value::UNSIGNED_INT64 :
2209     case value::DOUBLE_STAR:                     2209     case value::DOUBLE_STAR:
2210     case value::FLOAT_STAR:                      2210     case value::FLOAT_STAR:
2211     case value::INT_STAR:                        2211     case value::INT_STAR:
2212     case value::STRING:                          2212     case value::STRING:
2213     //case value::ARRAY_UNSIGNED_CHAR:           2213     //case value::ARRAY_UNSIGNED_CHAR:
2214     //case value::ARRAY_CHAR:                    2214     //case value::ARRAY_CHAR:
2215     case value::ARRAY_UNSIGNED_SHORT:            2215     case value::ARRAY_UNSIGNED_SHORT:
2216     case value::ARRAY_SHORT:                     2216     case value::ARRAY_SHORT:
2217     case value::ARRAY_UNSIGNED_INT:              2217     case value::ARRAY_UNSIGNED_INT:
2218     case value::ARRAY_INT:                       2218     case value::ARRAY_INT:
2219     case value::ARRAY_UNSIGNED_INT64:            2219     case value::ARRAY_UNSIGNED_INT64:
2220     case value::ARRAY_INT64:                     2220     case value::ARRAY_INT64:
2221     case value::ARRAY_FLOAT:                     2221     case value::ARRAY_FLOAT:
2222     //case value::ARRAY_DOUBLE:                  2222     //case value::ARRAY_DOUBLE:
2223     case value::ARRAY_BOOL:                      2223     case value::ARRAY_BOOL:
2224     case value::ARRAY_STRING:                    2224     case value::ARRAY_STRING:
2225       break;                                     2225       break;
2226     }                                            2226     }
2227     break;                                       2227     break;
2228   case value::NONE:                              2228   case value::NONE:
2229   case value::BOOL:                              2229   case value::BOOL:
2230   case value::SHORT:                             2230   case value::SHORT:
2231   //case value::UNSIGNED_CHAR:                   2231   //case value::UNSIGNED_CHAR:
2232   //case value::CHAR:                            2232   //case value::CHAR:
2233   case value::STRING:                            2233   case value::STRING:
2234   case value::INT64:                             2234   case value::INT64:
2235   case value::UNSIGNED_SHORT :                   2235   case value::UNSIGNED_SHORT :
2236   case value::UNSIGNED_INT64 :                   2236   case value::UNSIGNED_INT64 :
2237   case value::DOUBLE_STAR:                       2237   case value::DOUBLE_STAR:
2238   case value::FLOAT_STAR:                        2238   case value::FLOAT_STAR:
2239   case value::INT_STAR:                          2239   case value::INT_STAR:
2240   //case value::ARRAY_UNSIGNED_CHAR:             2240   //case value::ARRAY_UNSIGNED_CHAR:
2241   //case value::ARRAY_CHAR:                      2241   //case value::ARRAY_CHAR:
2242   case value::ARRAY_UNSIGNED_SHORT:              2242   case value::ARRAY_UNSIGNED_SHORT:
2243   case value::ARRAY_SHORT:                       2243   case value::ARRAY_SHORT:
2244   case value::ARRAY_UNSIGNED_INT:                2244   case value::ARRAY_UNSIGNED_INT:
2245   case value::ARRAY_INT:                         2245   case value::ARRAY_INT:
2246   case value::ARRAY_UNSIGNED_INT64:              2246   case value::ARRAY_UNSIGNED_INT64:
2247   case value::ARRAY_INT64:                       2247   case value::ARRAY_INT64:
2248   case value::ARRAY_FLOAT:                       2248   case value::ARRAY_FLOAT:
2249 //case value::ARRAY_DOUBLE:                      2249 //case value::ARRAY_DOUBLE:
2250   case value::ARRAY_BOOL:                        2250   case value::ARRAY_BOOL:
2251   case value::ARRAY_STRING:                      2251   case value::ARRAY_STRING:
2252     break;                                       2252     break;
2253   }                                              2253   }
2254   aError = std::string("Value::if_gt() :")       2254   aError = std::string("Value::if_gt() :")
2255          + " can't compare type " + value::st    2255          + " can't compare type " + value::stype(oType)
2256          + " with type " + aV.stype();           2256          + " with type " + aV.stype();
2257   aThis.set_none();                              2257   aThis.set_none();
2258   return false;                                  2258   return false;
2259 }                                                2259 }
2260                                                  2260 
2261 inline bool value::if_eq(value& aThis,const v    2261 inline bool value::if_eq(value& aThis,const value& aV,std::string& aError){
2262   value::e_type oType = aThis.m_type;            2262   value::e_type oType = aThis.m_type;
2263   switch(aThis.m_type) {                         2263   switch(aThis.m_type) {
2264   case value::INT:                               2264   case value::INT:
2265     switch(aV.m_type) {                          2265     switch(aV.m_type) {
2266     case value::INT:                             2266     case value::INT:
2267       aThis.set((bool)(aThis.u.m_int==aV.u.m_    2267       aThis.set((bool)(aThis.u.m_int==aV.u.m_int?true:false));
2268       return true;                               2268       return true;
2269     case value::DOUBLE:                          2269     case value::DOUBLE:
2270       aThis.set((bool)(aThis.u.m_int==aV.u.m_    2270       aThis.set((bool)(aThis.u.m_int==aV.u.m_double?true:false));
2271       return true;                               2271       return true;
2272     case value::FLOAT:                           2272     case value::FLOAT:
2273       aThis.set((bool)(aThis.u.m_int==aV.u.m_    2273       aThis.set((bool)(aThis.u.m_int==aV.u.m_float?true:false));
2274       return true;                               2274       return true;
2275     case value::UNSIGNED_SHORT :                 2275     case value::UNSIGNED_SHORT :
2276       aThis.set((bool)(aThis.u.m_int==(int)aV    2276       aThis.set((bool)(aThis.u.m_int==(int)aV.u.m_unsigned_short?true:false));
2277       return true;                               2277       return true;
2278     case value::UNSIGNED_INT:                    2278     case value::UNSIGNED_INT:
2279       aThis.set((bool)(aThis.u.m_int==(int)aV    2279       aThis.set((bool)(aThis.u.m_int==(int)aV.u.m_unsigned_int ?true:false));
2280       return true;                               2280       return true;
2281     case value::ARRAY_DOUBLE:{                   2281     case value::ARRAY_DOUBLE:{
2282       const std::vector<double>& stdv = aV.u.    2282       const std::vector<double>& stdv = aV.u.m_array_double->vector();
2283       size_t number = stdv.size();               2283       size_t number = stdv.size();
2284       for(size_t index=0;index<number;index++    2284       for(size_t index=0;index<number;index++) {
2285         if(aThis.u.m_int!=stdv[index]) {         2285         if(aThis.u.m_int!=stdv[index]) {
2286           aThis.set(false);                      2286           aThis.set(false);
2287           return true;                           2287           return true;
2288         }                                        2288         }
2289       }                                          2289       }
2290       aThis.set(true);                           2290       aThis.set(true);
2291       return true;                               2291       return true;
2292     }                                            2292     }
2293                                                  2293 
2294     case value::NONE:                            2294     case value::NONE:
2295     case value::STRING:                          2295     case value::STRING:
2296     case value::VOID_STAR:                       2296     case value::VOID_STAR:
2297     case value::BOOL:                            2297     case value::BOOL:
2298     case value::SHORT:                           2298     case value::SHORT:
2299     case value::INT64:                           2299     case value::INT64:
2300     //case value::UNSIGNED_CHAR:                 2300     //case value::UNSIGNED_CHAR:
2301     //case value::CHAR:                          2301     //case value::CHAR:
2302     case value::UNSIGNED_INT64 :                 2302     case value::UNSIGNED_INT64 :
2303     case value::DOUBLE_STAR:                     2303     case value::DOUBLE_STAR:
2304     case value::FLOAT_STAR:                      2304     case value::FLOAT_STAR:
2305     case value::INT_STAR:                        2305     case value::INT_STAR:
2306                                                  2306 
2307     //case value::ARRAY_UNSIGNED_CHAR:           2307     //case value::ARRAY_UNSIGNED_CHAR:
2308     //case value::ARRAY_CHAR:                    2308     //case value::ARRAY_CHAR:
2309     case value::ARRAY_UNSIGNED_SHORT:            2309     case value::ARRAY_UNSIGNED_SHORT:
2310     case value::ARRAY_SHORT:                     2310     case value::ARRAY_SHORT:
2311     case value::ARRAY_UNSIGNED_INT:              2311     case value::ARRAY_UNSIGNED_INT:
2312     case value::ARRAY_INT:                       2312     case value::ARRAY_INT:
2313     case value::ARRAY_UNSIGNED_INT64:            2313     case value::ARRAY_UNSIGNED_INT64:
2314     case value::ARRAY_INT64:                     2314     case value::ARRAY_INT64:
2315     case value::ARRAY_FLOAT:                     2315     case value::ARRAY_FLOAT:
2316     //case value::ARRAY_DOUBLE:                  2316     //case value::ARRAY_DOUBLE:
2317     case value::ARRAY_BOOL:                      2317     case value::ARRAY_BOOL:
2318     case value::ARRAY_STRING:                    2318     case value::ARRAY_STRING:
2319       break;                                     2319       break;
2320     }                                            2320     }
2321     break;                                       2321     break;
2322   case value::FLOAT:                             2322   case value::FLOAT:
2323     switch(aV.m_type) {                          2323     switch(aV.m_type) {
2324     case value::FLOAT:                           2324     case value::FLOAT:
2325       aThis.set((bool)(aThis.u.m_float==aV.u.    2325       aThis.set((bool)(aThis.u.m_float==aV.u.m_float?true:false));
2326       return true;                               2326       return true;
2327     case value::DOUBLE:                          2327     case value::DOUBLE:
2328       aThis.set((bool)(aThis.u.m_float==aV.u.    2328       aThis.set((bool)(aThis.u.m_float==aV.u.m_double?true:false));
2329       return true;                               2329       return true;
2330     case value::INT:                             2330     case value::INT:
2331       aThis.set((bool)(aThis.u.m_float==aV.u.    2331       aThis.set((bool)(aThis.u.m_float==aV.u.m_int?true:false));
2332       return true;                               2332       return true;
2333     case value::UNSIGNED_SHORT :                 2333     case value::UNSIGNED_SHORT :
2334       aThis.set((bool)(aThis.u.m_float==aV.u.    2334       aThis.set((bool)(aThis.u.m_float==aV.u.m_unsigned_short?true:false));
2335       return true;                               2335       return true;
2336     case value::UNSIGNED_INT:                    2336     case value::UNSIGNED_INT:
2337       aThis.set((bool)(aThis.u.m_float==aV.u.    2337       aThis.set((bool)(aThis.u.m_float==aV.u.m_unsigned_int?true:false));
2338       return true;                               2338       return true;
2339     case value::ARRAY_DOUBLE:{                   2339     case value::ARRAY_DOUBLE:{
2340       const std::vector<double>& stdv = aV.u.    2340       const std::vector<double>& stdv = aV.u.m_array_double->vector();
2341       size_t number = stdv.size();               2341       size_t number = stdv.size();
2342       for(size_t index=0;index<number;index++    2342       for(size_t index=0;index<number;index++) {
2343         if(aThis.u.m_float!=stdv[index]) {       2343         if(aThis.u.m_float!=stdv[index]) {
2344           aThis.set(false);                      2344           aThis.set(false);
2345           return true;                           2345           return true;
2346         }                                        2346         }
2347       }                                          2347       }
2348       aThis.set(true);                           2348       aThis.set(true);
2349       return true;                               2349       return true;
2350     }                                            2350     }
2351     case value::NONE:                            2351     case value::NONE:
2352     case value::STRING:                          2352     case value::STRING:
2353     case value::VOID_STAR:                       2353     case value::VOID_STAR:
2354     case value::BOOL:                            2354     case value::BOOL:
2355     case value::SHORT:                           2355     case value::SHORT:
2356     //case value::UNSIGNED_CHAR:                 2356     //case value::UNSIGNED_CHAR:
2357     //case value::CHAR:                          2357     //case value::CHAR:
2358     case value::INT64:                           2358     case value::INT64:
2359     case value::UNSIGNED_INT64 :                 2359     case value::UNSIGNED_INT64 :
2360     case value::DOUBLE_STAR:                     2360     case value::DOUBLE_STAR:
2361     case value::FLOAT_STAR:                      2361     case value::FLOAT_STAR:
2362     case value::INT_STAR:                        2362     case value::INT_STAR:
2363     //case value::ARRAY_UNSIGNED_CHAR:           2363     //case value::ARRAY_UNSIGNED_CHAR:
2364     //case value::ARRAY_CHAR:                    2364     //case value::ARRAY_CHAR:
2365     case value::ARRAY_UNSIGNED_SHORT:            2365     case value::ARRAY_UNSIGNED_SHORT:
2366     case value::ARRAY_SHORT:                     2366     case value::ARRAY_SHORT:
2367     case value::ARRAY_UNSIGNED_INT:              2367     case value::ARRAY_UNSIGNED_INT:
2368     case value::ARRAY_INT:                       2368     case value::ARRAY_INT:
2369     case value::ARRAY_UNSIGNED_INT64:            2369     case value::ARRAY_UNSIGNED_INT64:
2370     case value::ARRAY_INT64:                     2370     case value::ARRAY_INT64:
2371     case value::ARRAY_FLOAT:                     2371     case value::ARRAY_FLOAT:
2372     //case value::ARRAY_DOUBLE:                  2372     //case value::ARRAY_DOUBLE:
2373     case value::ARRAY_BOOL:                      2373     case value::ARRAY_BOOL:
2374     case value::ARRAY_STRING:                    2374     case value::ARRAY_STRING:
2375       break;                                     2375       break;
2376     }                                            2376     }
2377     break;                                       2377     break;
2378   case value::DOUBLE:                            2378   case value::DOUBLE:
2379     switch(aV.m_type) {                          2379     switch(aV.m_type) {
2380     case value::DOUBLE:                          2380     case value::DOUBLE:
2381       aThis.set((bool)(aThis.u.m_double==aV.u    2381       aThis.set((bool)(aThis.u.m_double==aV.u.m_double?true:false));
2382       return true;                               2382       return true;
2383     case value::FLOAT:                           2383     case value::FLOAT:
2384       aThis.set((bool)(aThis.u.m_double==aV.u    2384       aThis.set((bool)(aThis.u.m_double==aV.u.m_float?true:false));
2385       return true;                               2385       return true;
2386     case value::INT:                             2386     case value::INT:
2387       aThis.set((bool)(aThis.u.m_double==aV.u    2387       aThis.set((bool)(aThis.u.m_double==aV.u.m_int?true:false));
2388       return true;                               2388       return true;
2389     case value::UNSIGNED_SHORT :                 2389     case value::UNSIGNED_SHORT :
2390       aThis.set((bool)(aThis.u.m_double==aV.u    2390       aThis.set((bool)(aThis.u.m_double==aV.u.m_unsigned_short?true:false));
2391       return true;                               2391       return true;
2392     case value::UNSIGNED_INT:                    2392     case value::UNSIGNED_INT:
2393       aThis.set((bool)(aThis.u.m_double==aV.u    2393       aThis.set((bool)(aThis.u.m_double==aV.u.m_unsigned_int ?true:false));
2394       return true;                               2394       return true;
2395     case value::ARRAY_DOUBLE:{                   2395     case value::ARRAY_DOUBLE:{
2396       const std::vector<double>& stdv = aV.u.    2396       const std::vector<double>& stdv = aV.u.m_array_double->vector();
2397       size_t number = stdv.size();               2397       size_t number = stdv.size();
2398       for(size_t index=0;index<number;index++    2398       for(size_t index=0;index<number;index++) {
2399         if(aThis.u.m_double!=stdv[index]) {      2399         if(aThis.u.m_double!=stdv[index]) {
2400           aThis.set(false);                      2400           aThis.set(false);
2401           return true;                           2401           return true;
2402         }                                        2402         }
2403       }                                          2403       }
2404       aThis.set(true);                           2404       aThis.set(true);
2405       return true;                               2405       return true;
2406     }                                            2406     }
2407     case value::NONE:                            2407     case value::NONE:
2408     case value::STRING:                          2408     case value::STRING:
2409     case value::VOID_STAR:                       2409     case value::VOID_STAR:
2410     case value::BOOL:                            2410     case value::BOOL:
2411     case value::SHORT:                           2411     case value::SHORT:
2412     //case value::UNSIGNED_CHAR:                 2412     //case value::UNSIGNED_CHAR:
2413     //case value::CHAR:                          2413     //case value::CHAR:
2414     case value::INT64:                           2414     case value::INT64:
2415     case value::UNSIGNED_INT64 :                 2415     case value::UNSIGNED_INT64 :
2416     case value::DOUBLE_STAR:                     2416     case value::DOUBLE_STAR:
2417     case value::FLOAT_STAR:                      2417     case value::FLOAT_STAR:
2418     case value::INT_STAR:                        2418     case value::INT_STAR:
2419     //case value::ARRAY_UNSIGNED_CHAR:           2419     //case value::ARRAY_UNSIGNED_CHAR:
2420     //case value::ARRAY_CHAR:                    2420     //case value::ARRAY_CHAR:
2421     case value::ARRAY_UNSIGNED_SHORT:            2421     case value::ARRAY_UNSIGNED_SHORT:
2422     case value::ARRAY_SHORT:                     2422     case value::ARRAY_SHORT:
2423     case value::ARRAY_UNSIGNED_INT:              2423     case value::ARRAY_UNSIGNED_INT:
2424     case value::ARRAY_INT:                       2424     case value::ARRAY_INT:
2425     case value::ARRAY_UNSIGNED_INT64:            2425     case value::ARRAY_UNSIGNED_INT64:
2426     case value::ARRAY_INT64:                     2426     case value::ARRAY_INT64:
2427     case value::ARRAY_FLOAT:                     2427     case value::ARRAY_FLOAT:
2428     //case value::ARRAY_DOUBLE:                  2428     //case value::ARRAY_DOUBLE:
2429     case value::ARRAY_BOOL:                      2429     case value::ARRAY_BOOL:
2430     case value::ARRAY_STRING:                    2430     case value::ARRAY_STRING:
2431       break;                                     2431       break;
2432     }                                            2432     }
2433     break;                                       2433     break;
2434   case value::STRING:                            2434   case value::STRING:
2435     switch(aV.m_type) {                          2435     switch(aV.m_type) {
2436     case value::STRING:                          2436     case value::STRING:
2437       aThis.set((bool)((*aThis.u.m_string)==(    2437       aThis.set((bool)((*aThis.u.m_string)==(*aV.u.m_string)?true:false));
2438       return true;                               2438       return true;
2439     case value::INT:                             2439     case value::INT:
2440      {int v;                                     2440      {int v;
2441       if(!to<int>(*aThis.u.m_string,v)) break    2441       if(!to<int>(*aThis.u.m_string,v)) break;
2442       aThis.set((bool)(v==aV.u.m_int?true:fal    2442       aThis.set((bool)(v==aV.u.m_int?true:false));
2443       return true;}                              2443       return true;}
2444     case value::FLOAT:                           2444     case value::FLOAT:
2445      {float v;                                   2445      {float v;
2446       if(!to<float>(*aThis.u.m_string,v)) bre    2446       if(!to<float>(*aThis.u.m_string,v)) break;
2447       aThis.set((bool)(v==aV.u.m_float?true:f    2447       aThis.set((bool)(v==aV.u.m_float?true:false));
2448       return true;}                              2448       return true;}
2449     case value::DOUBLE:                          2449     case value::DOUBLE:
2450      {double v;                                  2450      {double v;
2451       if(!to<double>(*aThis.u.m_string,v)) br    2451       if(!to<double>(*aThis.u.m_string,v)) break;
2452       aThis.set((bool)(v==aV.u.m_double?true:    2452       aThis.set((bool)(v==aV.u.m_double?true:false));
2453       return true;}                              2453       return true;}
2454     case value::UNSIGNED_INT:                    2454     case value::UNSIGNED_INT:
2455      {typedef unsigned int uint_t;               2455      {typedef unsigned int uint_t;
2456       uint_t v;                                  2456       uint_t v;
2457       if(!to<uint_t>(*aThis.u.m_string,v)) br    2457       if(!to<uint_t>(*aThis.u.m_string,v)) break;
2458       aThis.set((bool)(v==aV.u.m_unsigned_int    2458       aThis.set((bool)(v==aV.u.m_unsigned_int ?true:false));
2459       return true;}                              2459       return true;}
2460     case value::BOOL:                            2460     case value::BOOL:
2461      {bool v;                                    2461      {bool v;
2462       if(!to(*aThis.u.m_string,v)) break;        2462       if(!to(*aThis.u.m_string,v)) break;
2463       aThis.set((bool)(v==aV.u.m_bool?true:fa    2463       aThis.set((bool)(v==aV.u.m_bool?true:false));
2464       return true;}                              2464       return true;}
2465     case value::NONE:                            2465     case value::NONE:
2466     case value::VOID_STAR:                       2466     case value::VOID_STAR:
2467     case value::SHORT:                           2467     case value::SHORT:
2468     //case value::UNSIGNED_CHAR:                 2468     //case value::UNSIGNED_CHAR:
2469     //case value::CHAR:                          2469     //case value::CHAR:
2470     case value::INT64:                           2470     case value::INT64:
2471     case value::UNSIGNED_SHORT :                 2471     case value::UNSIGNED_SHORT :
2472     case value::UNSIGNED_INT64 :                 2472     case value::UNSIGNED_INT64 :
2473     case value::DOUBLE_STAR:                     2473     case value::DOUBLE_STAR:
2474     case value::FLOAT_STAR:                      2474     case value::FLOAT_STAR:
2475     case value::INT_STAR:                        2475     case value::INT_STAR:
2476     //case value::ARRAY_UNSIGNED_CHAR:           2476     //case value::ARRAY_UNSIGNED_CHAR:
2477     //case value::ARRAY_CHAR:                    2477     //case value::ARRAY_CHAR:
2478     case value::ARRAY_UNSIGNED_SHORT:            2478     case value::ARRAY_UNSIGNED_SHORT:
2479     case value::ARRAY_SHORT:                     2479     case value::ARRAY_SHORT:
2480     case value::ARRAY_UNSIGNED_INT:              2480     case value::ARRAY_UNSIGNED_INT:
2481     case value::ARRAY_INT:                       2481     case value::ARRAY_INT:
2482     case value::ARRAY_UNSIGNED_INT64:            2482     case value::ARRAY_UNSIGNED_INT64:
2483     case value::ARRAY_INT64:                     2483     case value::ARRAY_INT64:
2484     case value::ARRAY_FLOAT:                     2484     case value::ARRAY_FLOAT:
2485     case value::ARRAY_DOUBLE:                    2485     case value::ARRAY_DOUBLE:
2486     case value::ARRAY_BOOL:                      2486     case value::ARRAY_BOOL:
2487     case value::ARRAY_STRING:                    2487     case value::ARRAY_STRING:
2488       break;                                     2488       break;
2489     }                                            2489     }
2490     break;                                       2490     break;
2491   case value::VOID_STAR:                         2491   case value::VOID_STAR:
2492     switch(aV.m_type) {                          2492     switch(aV.m_type) {
2493     case value::VOID_STAR:                       2493     case value::VOID_STAR:
2494       aThis.set((bool)(aThis.u.m_void_star==a    2494       aThis.set((bool)(aThis.u.m_void_star==aV.u.m_void_star?true:false));
2495       return true;                               2495       return true;
2496     case value::NONE:                            2496     case value::NONE:
2497     case value::INT:                             2497     case value::INT:
2498     case value::DOUBLE:                          2498     case value::DOUBLE:
2499     case value::BOOL:                            2499     case value::BOOL:
2500     case value::SHORT:                           2500     case value::SHORT:
2501     case value::INT64:                           2501     case value::INT64:
2502     case value::FLOAT:                           2502     case value::FLOAT:
2503     //case value::UNSIGNED_CHAR:                 2503     //case value::UNSIGNED_CHAR:
2504     //case value::CHAR:                          2504     //case value::CHAR:
2505     case value::UNSIGNED_SHORT :                 2505     case value::UNSIGNED_SHORT :
2506     case value::UNSIGNED_INT:                    2506     case value::UNSIGNED_INT:
2507     case value::UNSIGNED_INT64 :                 2507     case value::UNSIGNED_INT64 :
2508     case value::DOUBLE_STAR:                     2508     case value::DOUBLE_STAR:
2509     case value::FLOAT_STAR:                      2509     case value::FLOAT_STAR:
2510     case value::INT_STAR:                        2510     case value::INT_STAR:
2511     case value::STRING:                          2511     case value::STRING:
2512     //case value::ARRAY_UNSIGNED_CHAR:           2512     //case value::ARRAY_UNSIGNED_CHAR:
2513     //case value::ARRAY_CHAR:                    2513     //case value::ARRAY_CHAR:
2514     case value::ARRAY_UNSIGNED_SHORT:            2514     case value::ARRAY_UNSIGNED_SHORT:
2515     case value::ARRAY_SHORT:                     2515     case value::ARRAY_SHORT:
2516     case value::ARRAY_UNSIGNED_INT:              2516     case value::ARRAY_UNSIGNED_INT:
2517     case value::ARRAY_INT:                       2517     case value::ARRAY_INT:
2518     case value::ARRAY_UNSIGNED_INT64:            2518     case value::ARRAY_UNSIGNED_INT64:
2519     case value::ARRAY_INT64:                     2519     case value::ARRAY_INT64:
2520     case value::ARRAY_FLOAT:                     2520     case value::ARRAY_FLOAT:
2521     case value::ARRAY_DOUBLE:                    2521     case value::ARRAY_DOUBLE:
2522     case value::ARRAY_BOOL:                      2522     case value::ARRAY_BOOL:
2523     case value::ARRAY_STRING:                    2523     case value::ARRAY_STRING:
2524       break;                                     2524       break;
2525     }                                            2525     }
2526     break;                                       2526     break;
2527   case value::UNSIGNED_INT:                      2527   case value::UNSIGNED_INT:
2528     switch(aV.m_type) {                          2528     switch(aV.m_type) {
2529     case value::UNSIGNED_INT:                    2529     case value::UNSIGNED_INT:
2530       aThis.set((bool)(aThis.u.m_unsigned_int    2530       aThis.set((bool)(aThis.u.m_unsigned_int ==aV.u.m_unsigned_int ?true:false));
2531       return true;                               2531       return true;
2532     case value::INT:                             2532     case value::INT:
2533       aThis.set((bool)((int)aThis.u.m_unsigne    2533       aThis.set((bool)((int)aThis.u.m_unsigned_int ==aV.u.m_int?true:false));
2534       return true;                               2534       return true;
2535     case value::FLOAT:                           2535     case value::FLOAT:
2536       aThis.set((bool)((int)aThis.u.m_unsigne    2536       aThis.set((bool)((int)aThis.u.m_unsigned_int ==aV.u.m_float?true:false));
2537       return true;                               2537       return true;
2538     case value::DOUBLE:                          2538     case value::DOUBLE:
2539       aThis.set((bool)((int)aThis.u.m_unsigne    2539       aThis.set((bool)((int)aThis.u.m_unsigned_int ==aV.u.m_double?true:false));
2540       return true;                               2540       return true;
2541     case value::ARRAY_DOUBLE:{                   2541     case value::ARRAY_DOUBLE:{
2542       const std::vector<double>& stdv = aV.u.    2542       const std::vector<double>& stdv = aV.u.m_array_double->vector();
2543       size_t number = stdv.size();               2543       size_t number = stdv.size();
2544       for(size_t index=0;index<number;index++    2544       for(size_t index=0;index<number;index++) {
2545         if(aThis.u.m_unsigned_int !=stdv[inde    2545         if(aThis.u.m_unsigned_int !=stdv[index]) {
2546           aThis.set(false);                      2546           aThis.set(false);
2547           return true;                           2547           return true;
2548         }                                        2548         }
2549       }                                          2549       }
2550       aThis.set(true);                           2550       aThis.set(true);
2551       return true;                               2551       return true;
2552     }                                            2552     }
2553     case value::NONE:                            2553     case value::NONE:
2554     case value::BOOL:                            2554     case value::BOOL:
2555     case value::VOID_STAR:                       2555     case value::VOID_STAR:
2556     case value::SHORT:                           2556     case value::SHORT:
2557     case value::INT64:                           2557     case value::INT64:
2558     //case value::UNSIGNED_CHAR:                 2558     //case value::UNSIGNED_CHAR:
2559     //case value::CHAR:                          2559     //case value::CHAR:
2560     case value::UNSIGNED_SHORT :                 2560     case value::UNSIGNED_SHORT :
2561     case value::UNSIGNED_INT64 :                 2561     case value::UNSIGNED_INT64 :
2562     case value::DOUBLE_STAR:                     2562     case value::DOUBLE_STAR:
2563     case value::FLOAT_STAR:                      2563     case value::FLOAT_STAR:
2564     case value::INT_STAR:                        2564     case value::INT_STAR:
2565     case value::STRING:                          2565     case value::STRING:
2566     //case value::ARRAY_UNSIGNED_CHAR:           2566     //case value::ARRAY_UNSIGNED_CHAR:
2567     //case value::ARRAY_CHAR:                    2567     //case value::ARRAY_CHAR:
2568     case value::ARRAY_UNSIGNED_SHORT:            2568     case value::ARRAY_UNSIGNED_SHORT:
2569     case value::ARRAY_SHORT:                     2569     case value::ARRAY_SHORT:
2570     case value::ARRAY_UNSIGNED_INT:              2570     case value::ARRAY_UNSIGNED_INT:
2571     case value::ARRAY_INT:                       2571     case value::ARRAY_INT:
2572     case value::ARRAY_UNSIGNED_INT64:            2572     case value::ARRAY_UNSIGNED_INT64:
2573     case value::ARRAY_INT64:                     2573     case value::ARRAY_INT64:
2574     case value::ARRAY_FLOAT:                     2574     case value::ARRAY_FLOAT:
2575     //case value::ARRAY_DOUBLE:                  2575     //case value::ARRAY_DOUBLE:
2576     case value::ARRAY_BOOL:                      2576     case value::ARRAY_BOOL:
2577     case value::ARRAY_STRING:                    2577     case value::ARRAY_STRING:
2578       break;                                     2578       break;
2579     }                                            2579     }
2580     break;                                       2580     break;
2581   case value::BOOL:                              2581   case value::BOOL:
2582     switch(aV.m_type) {                          2582     switch(aV.m_type) {
2583     case value::BOOL:                            2583     case value::BOOL:
2584       aThis.u.m_bool = ((aThis.u.m_bool==aV.u    2584       aThis.u.m_bool = ((aThis.u.m_bool==aV.u.m_bool)?true:false);
2585       return true;                               2585       return true;
2586     case value::NONE:                            2586     case value::NONE:
2587     case value::INT:                             2587     case value::INT:
2588     case value::DOUBLE:                          2588     case value::DOUBLE:
2589     case value::VOID_STAR:                       2589     case value::VOID_STAR:
2590     case value::SHORT:                           2590     case value::SHORT:
2591     case value::INT64:                           2591     case value::INT64:
2592     case value::FLOAT:                           2592     case value::FLOAT:
2593     //case value::UNSIGNED_CHAR:                 2593     //case value::UNSIGNED_CHAR:
2594     //case value::CHAR:                          2594     //case value::CHAR:
2595     case value::UNSIGNED_SHORT :                 2595     case value::UNSIGNED_SHORT :
2596     case value::UNSIGNED_INT:                    2596     case value::UNSIGNED_INT:
2597     case value::UNSIGNED_INT64 :                 2597     case value::UNSIGNED_INT64 :
2598     case value::DOUBLE_STAR:                     2598     case value::DOUBLE_STAR:
2599     case value::FLOAT_STAR:                      2599     case value::FLOAT_STAR:
2600     case value::INT_STAR:                        2600     case value::INT_STAR:
2601     case value::STRING:                          2601     case value::STRING:
2602     //case value::ARRAY_UNSIGNED_CHAR:           2602     //case value::ARRAY_UNSIGNED_CHAR:
2603     //case value::ARRAY_CHAR:                    2603     //case value::ARRAY_CHAR:
2604     case value::ARRAY_UNSIGNED_SHORT:            2604     case value::ARRAY_UNSIGNED_SHORT:
2605     case value::ARRAY_SHORT:                     2605     case value::ARRAY_SHORT:
2606     case value::ARRAY_UNSIGNED_INT:              2606     case value::ARRAY_UNSIGNED_INT:
2607     case value::ARRAY_INT:                       2607     case value::ARRAY_INT:
2608     case value::ARRAY_UNSIGNED_INT64:            2608     case value::ARRAY_UNSIGNED_INT64:
2609     case value::ARRAY_INT64:                     2609     case value::ARRAY_INT64:
2610     case value::ARRAY_FLOAT:                     2610     case value::ARRAY_FLOAT:
2611     case value::ARRAY_DOUBLE:                    2611     case value::ARRAY_DOUBLE:
2612     case value::ARRAY_BOOL:                      2612     case value::ARRAY_BOOL:
2613     case value::ARRAY_STRING:                    2613     case value::ARRAY_STRING:
2614       break;                                     2614       break;
2615     }                                            2615     }
2616     break;                                       2616     break;
2617   case value::ARRAY_DOUBLE:                      2617   case value::ARRAY_DOUBLE:
2618     switch(aV.m_type) {                          2618     switch(aV.m_type) {
2619     case value::INT:{                            2619     case value::INT:{
2620       const std::vector<double>& stdv = aThis    2620       const std::vector<double>& stdv = aThis.u.m_array_double->vector();
2621       size_t number = stdv.size();               2621       size_t number = stdv.size();
2622       for(size_t index=0;index<number;index++    2622       for(size_t index=0;index<number;index++) {
2623         if(stdv[index]!=aV.u.m_int) {            2623         if(stdv[index]!=aV.u.m_int) {
2624           aThis.set(false);                      2624           aThis.set(false);
2625           return true;                           2625           return true;
2626         }                                        2626         }
2627       }                                          2627       }
2628       aThis.set(true);                           2628       aThis.set(true);
2629       return true;                               2629       return true;
2630     }                                            2630     }
2631     case value::FLOAT:{                          2631     case value::FLOAT:{
2632       const std::vector<double>& stdv = aThis    2632       const std::vector<double>& stdv = aThis.u.m_array_double->vector();
2633       size_t number = stdv.size();               2633       size_t number = stdv.size();
2634       for(size_t index=0;index<number;index++    2634       for(size_t index=0;index<number;index++) {
2635         if(stdv[index]!=aV.u.m_float) {          2635         if(stdv[index]!=aV.u.m_float) {
2636           aThis.set(false);                      2636           aThis.set(false);
2637           return true;                           2637           return true;
2638         }                                        2638         }
2639       }                                          2639       }
2640       aThis.set(true);                           2640       aThis.set(true);
2641       return true;                               2641       return true;
2642     }                                            2642     }
2643     case value::DOUBLE:{                         2643     case value::DOUBLE:{
2644       const std::vector<double>& stdv = aThis    2644       const std::vector<double>& stdv = aThis.u.m_array_double->vector();
2645       size_t number = stdv.size();               2645       size_t number = stdv.size();
2646       for(size_t index=0;index<number;index++    2646       for(size_t index=0;index<number;index++) {
2647         if(stdv[index]!=aV.u.m_double) {         2647         if(stdv[index]!=aV.u.m_double) {
2648           aThis.set(false);                      2648           aThis.set(false);
2649           return true;                           2649           return true;
2650         }                                        2650         }
2651       }                                          2651       }
2652       aThis.set(true);                           2652       aThis.set(true);
2653       return true;                               2653       return true;
2654     }                                            2654     }
2655     case value::UNSIGNED_INT:{                   2655     case value::UNSIGNED_INT:{
2656       const std::vector<double>& stdv = aThis    2656       const std::vector<double>& stdv = aThis.u.m_array_double->vector();
2657       size_t number = stdv.size();               2657       size_t number = stdv.size();
2658       for(size_t index=0;index<number;index++    2658       for(size_t index=0;index<number;index++) {
2659         if(stdv[index]!=aV.u.m_unsigned_int )    2659         if(stdv[index]!=aV.u.m_unsigned_int ) {
2660           aThis.set(false);                      2660           aThis.set(false);
2661           return true;                           2661           return true;
2662         }                                        2662         }
2663       }                                          2663       }
2664       aThis.set(true);                           2664       aThis.set(true);
2665       return true;                               2665       return true;
2666     }                                            2666     }
2667     case value::ARRAY_DOUBLE:{                   2667     case value::ARRAY_DOUBLE:{
2668       const std::vector<double>& stdv = aThis    2668       const std::vector<double>& stdv = aThis.u.m_array_double->vector();
2669       const std::vector<double>& stdv2 = aV.u    2669       const std::vector<double>& stdv2 = aV.u.m_array_double->vector();
2670       if(stdv.size()!=stdv2.size()) {            2670       if(stdv.size()!=stdv2.size()) {
2671         aThis.set(false);                        2671         aThis.set(false);
2672         return true;                             2672         return true;
2673       }                                          2673       }
2674       size_t number = stdv.size();               2674       size_t number = stdv.size();
2675       for(size_t index=0;index<number;index++    2675       for(size_t index=0;index<number;index++) {
2676         if(stdv[index]!=stdv2[index]) {          2676         if(stdv[index]!=stdv2[index]) {
2677           aThis.set(false);                      2677           aThis.set(false);
2678           return true;                           2678           return true;
2679         }                                        2679         }
2680       }                                          2680       }
2681       aThis.set(true);                           2681       aThis.set(true);
2682       return true;                               2682       return true;
2683     }                                            2683     }
2684     case value::NONE:                            2684     case value::NONE:
2685     case value::VOID_STAR:                       2685     case value::VOID_STAR:
2686     case value::BOOL:                            2686     case value::BOOL:
2687     case value::SHORT:                           2687     case value::SHORT:
2688     //case value::UNSIGNED_CHAR:                 2688     //case value::UNSIGNED_CHAR:
2689     //case value::CHAR:                          2689     //case value::CHAR:
2690     case value::STRING:                          2690     case value::STRING:
2691     case value::INT64:                           2691     case value::INT64:
2692     case value::UNSIGNED_SHORT :                 2692     case value::UNSIGNED_SHORT :
2693     case value::UNSIGNED_INT64 :                 2693     case value::UNSIGNED_INT64 :
2694     case value::DOUBLE_STAR:                     2694     case value::DOUBLE_STAR:
2695     case value::FLOAT_STAR:                      2695     case value::FLOAT_STAR:
2696     case value::INT_STAR:                        2696     case value::INT_STAR:
2697     //case value::ARRAY_UNSIGNED_CHAR:           2697     //case value::ARRAY_UNSIGNED_CHAR:
2698     //case value::ARRAY_CHAR:                    2698     //case value::ARRAY_CHAR:
2699     case value::ARRAY_UNSIGNED_SHORT:            2699     case value::ARRAY_UNSIGNED_SHORT:
2700     case value::ARRAY_SHORT:                     2700     case value::ARRAY_SHORT:
2701     case value::ARRAY_UNSIGNED_INT:              2701     case value::ARRAY_UNSIGNED_INT:
2702     case value::ARRAY_INT:                       2702     case value::ARRAY_INT:
2703     case value::ARRAY_UNSIGNED_INT64:            2703     case value::ARRAY_UNSIGNED_INT64:
2704     case value::ARRAY_INT64:                     2704     case value::ARRAY_INT64:
2705     case value::ARRAY_FLOAT:                     2705     case value::ARRAY_FLOAT:
2706     //case value::ARRAY_DOUBLE:                  2706     //case value::ARRAY_DOUBLE:
2707     case value::ARRAY_BOOL:                      2707     case value::ARRAY_BOOL:
2708     case value::ARRAY_STRING:                    2708     case value::ARRAY_STRING:
2709       break;                                     2709       break;
2710     }                                            2710     }
2711     break;                                       2711     break;
2712   case value::NONE:                              2712   case value::NONE:
2713   case value::SHORT:                             2713   case value::SHORT:
2714   case value::INT64:                             2714   case value::INT64:
2715   //case value::UNSIGNED_CHAR:                   2715   //case value::UNSIGNED_CHAR:
2716   //case value::CHAR:                            2716   //case value::CHAR:
2717   case value::UNSIGNED_SHORT :                   2717   case value::UNSIGNED_SHORT :
2718   case value::UNSIGNED_INT64 :                   2718   case value::UNSIGNED_INT64 :
2719   case value::DOUBLE_STAR:                       2719   case value::DOUBLE_STAR:
2720   case value::FLOAT_STAR:                        2720   case value::FLOAT_STAR:
2721   case value::INT_STAR:                          2721   case value::INT_STAR:
2722   //case value::ARRAY_UNSIGNED_CHAR:             2722   //case value::ARRAY_UNSIGNED_CHAR:
2723   //case value::ARRAY_CHAR:                      2723   //case value::ARRAY_CHAR:
2724   case value::ARRAY_UNSIGNED_SHORT:              2724   case value::ARRAY_UNSIGNED_SHORT:
2725   case value::ARRAY_SHORT:                       2725   case value::ARRAY_SHORT:
2726   case value::ARRAY_UNSIGNED_INT:                2726   case value::ARRAY_UNSIGNED_INT:
2727   case value::ARRAY_INT:                         2727   case value::ARRAY_INT:
2728   case value::ARRAY_UNSIGNED_INT64:              2728   case value::ARRAY_UNSIGNED_INT64:
2729   case value::ARRAY_INT64:                       2729   case value::ARRAY_INT64:
2730   case value::ARRAY_FLOAT:                       2730   case value::ARRAY_FLOAT:
2731 //case value::ARRAY_DOUBLE:                      2731 //case value::ARRAY_DOUBLE:
2732   case value::ARRAY_BOOL:                        2732   case value::ARRAY_BOOL:
2733   case value::ARRAY_STRING:                      2733   case value::ARRAY_STRING:
2734     break;                                       2734     break;
2735   }                                              2735   }
2736   aError = std::string("Value::if_eq() :")       2736   aError = std::string("Value::if_eq() :")
2737          + " can't compare type " + value::st    2737          + " can't compare type " + value::stype(oType)
2738          + " with type " + aV.stype();           2738          + " with type " + aV.stype();
2739   aThis.set_none();                              2739   aThis.set_none();
2740   return false;                                  2740   return false;
2741 }                                                2741 }
2742                                                  2742 
2743 inline bool value::if_and(value& aThis,const     2743 inline bool value::if_and(value& aThis,const value& aV,std::string& aError){
2744   value::e_type oType = aThis.m_type;            2744   value::e_type oType = aThis.m_type;
2745   switch(aThis.m_type) {                         2745   switch(aThis.m_type) {
2746   case value::BOOL:                              2746   case value::BOOL:
2747     switch(aV.m_type) {                          2747     switch(aV.m_type) {
2748     case value::BOOL:                            2748     case value::BOOL:
2749       aThis.u.m_bool = ((aThis.u.m_bool && aV    2749       aThis.u.m_bool = ((aThis.u.m_bool && aV.u.m_bool)?true:false);
2750       return true;                               2750       return true;
2751     case value::INT:                             2751     case value::INT:
2752     case value::NONE:                            2752     case value::NONE:
2753     case value::DOUBLE:                          2753     case value::DOUBLE:
2754     case value::STRING:                          2754     case value::STRING:
2755     case value::VOID_STAR:                       2755     case value::VOID_STAR:
2756     case value::SHORT:                           2756     case value::SHORT:
2757     case value::INT64:                           2757     case value::INT64:
2758     case value::FLOAT:                           2758     case value::FLOAT:
2759     //case value::UNSIGNED_CHAR:                 2759     //case value::UNSIGNED_CHAR:
2760     //case value::CHAR:                          2760     //case value::CHAR:
2761     case value::UNSIGNED_SHORT :                 2761     case value::UNSIGNED_SHORT :
2762     case value::UNSIGNED_INT64 :                 2762     case value::UNSIGNED_INT64 :
2763     case value::DOUBLE_STAR:                     2763     case value::DOUBLE_STAR:
2764     case value::FLOAT_STAR:                      2764     case value::FLOAT_STAR:
2765     case value::INT_STAR:                        2765     case value::INT_STAR:
2766     case value::UNSIGNED_INT:                    2766     case value::UNSIGNED_INT:
2767     //case value::ARRAY_UNSIGNED_CHAR:           2767     //case value::ARRAY_UNSIGNED_CHAR:
2768     //case value::ARRAY_CHAR:                    2768     //case value::ARRAY_CHAR:
2769     case value::ARRAY_UNSIGNED_SHORT:            2769     case value::ARRAY_UNSIGNED_SHORT:
2770     case value::ARRAY_SHORT:                     2770     case value::ARRAY_SHORT:
2771     case value::ARRAY_UNSIGNED_INT:              2771     case value::ARRAY_UNSIGNED_INT:
2772     case value::ARRAY_INT:                       2772     case value::ARRAY_INT:
2773     case value::ARRAY_UNSIGNED_INT64:            2773     case value::ARRAY_UNSIGNED_INT64:
2774     case value::ARRAY_INT64:                     2774     case value::ARRAY_INT64:
2775     case value::ARRAY_FLOAT:                     2775     case value::ARRAY_FLOAT:
2776     case value::ARRAY_DOUBLE:                    2776     case value::ARRAY_DOUBLE:
2777     case value::ARRAY_BOOL:                      2777     case value::ARRAY_BOOL:
2778     case value::ARRAY_STRING:                    2778     case value::ARRAY_STRING:
2779       break;                                     2779       break;
2780     }                                            2780     }
2781     break;                                       2781     break;
2782   case value::NONE:                              2782   case value::NONE:
2783   case value::INT:                               2783   case value::INT:
2784   case value::DOUBLE:                            2784   case value::DOUBLE:
2785   case value::VOID_STAR:                         2785   case value::VOID_STAR:
2786   case value::SHORT:                             2786   case value::SHORT:
2787   case value::INT64:                             2787   case value::INT64:
2788   case value::FLOAT:                             2788   case value::FLOAT:
2789   //case value::UNSIGNED_CHAR:                   2789   //case value::UNSIGNED_CHAR:
2790   //case value::CHAR:                            2790   //case value::CHAR:
2791   case value::UNSIGNED_SHORT :                   2791   case value::UNSIGNED_SHORT :
2792   case value::UNSIGNED_INT:                      2792   case value::UNSIGNED_INT:
2793   case value::UNSIGNED_INT64 :                   2793   case value::UNSIGNED_INT64 :
2794   case value::DOUBLE_STAR:                       2794   case value::DOUBLE_STAR:
2795   case value::FLOAT_STAR:                        2795   case value::FLOAT_STAR:
2796   case value::INT_STAR:                          2796   case value::INT_STAR:
2797   case value::STRING:                            2797   case value::STRING:
2798   //case value::ARRAY_UNSIGNED_CHAR:             2798   //case value::ARRAY_UNSIGNED_CHAR:
2799   //case value::ARRAY_CHAR:                      2799   //case value::ARRAY_CHAR:
2800   case value::ARRAY_UNSIGNED_SHORT:              2800   case value::ARRAY_UNSIGNED_SHORT:
2801   case value::ARRAY_SHORT:                       2801   case value::ARRAY_SHORT:
2802   case value::ARRAY_UNSIGNED_INT:                2802   case value::ARRAY_UNSIGNED_INT:
2803   case value::ARRAY_INT:                         2803   case value::ARRAY_INT:
2804   case value::ARRAY_UNSIGNED_INT64:              2804   case value::ARRAY_UNSIGNED_INT64:
2805   case value::ARRAY_INT64:                       2805   case value::ARRAY_INT64:
2806   case value::ARRAY_FLOAT:                       2806   case value::ARRAY_FLOAT:
2807   case value::ARRAY_DOUBLE:                      2807   case value::ARRAY_DOUBLE:
2808   case value::ARRAY_BOOL:                        2808   case value::ARRAY_BOOL:
2809   case value::ARRAY_STRING:                      2809   case value::ARRAY_STRING:
2810     break;                                       2810     break;
2811   }                                              2811   }
2812   aError = std::string("Value::if_and :")        2812   aError = std::string("Value::if_and :")
2813          + " can't apply on type " + value::s    2813          + " can't apply on type " + value::stype(oType)
2814          + " and type " + aV.stype();            2814          + " and type " + aV.stype();
2815   aThis.set_none();                              2815   aThis.set_none();
2816   return false;                                  2816   return false;
2817 }                                                2817 }
2818                                                  2818 
2819 inline bool value::if_or(value& aThis,const v    2819 inline bool value::if_or(value& aThis,const value& aV,std::string& aError){
2820   value::e_type oType = aThis.m_type;            2820   value::e_type oType = aThis.m_type;
2821   switch(aThis.m_type) {                         2821   switch(aThis.m_type) {
2822   case value::BOOL:                              2822   case value::BOOL:
2823     switch(aV.m_type) {                          2823     switch(aV.m_type) {
2824     case value::BOOL:                            2824     case value::BOOL:
2825       aThis.u.m_bool = ((aThis.u.m_bool || aV    2825       aThis.u.m_bool = ((aThis.u.m_bool || aV.u.m_bool)?true:false);
2826       return true;                               2826       return true;
2827     case value::INT:                             2827     case value::INT:
2828     case value::NONE:                            2828     case value::NONE:
2829     case value::DOUBLE:                          2829     case value::DOUBLE:
2830     case value::STRING:                          2830     case value::STRING:
2831     case value::VOID_STAR:                       2831     case value::VOID_STAR:
2832     case value::SHORT:                           2832     case value::SHORT:
2833     case value::INT64:                           2833     case value::INT64:
2834     case value::FLOAT:                           2834     case value::FLOAT:
2835     //case value::UNSIGNED_CHAR:                 2835     //case value::UNSIGNED_CHAR:
2836     //case value::CHAR:                          2836     //case value::CHAR:
2837     case value::UNSIGNED_SHORT :                 2837     case value::UNSIGNED_SHORT :
2838     case value::UNSIGNED_INT64 :                 2838     case value::UNSIGNED_INT64 :
2839     case value::DOUBLE_STAR:                     2839     case value::DOUBLE_STAR:
2840     case value::FLOAT_STAR:                      2840     case value::FLOAT_STAR:
2841     case value::INT_STAR:                        2841     case value::INT_STAR:
2842     case value::UNSIGNED_INT:                    2842     case value::UNSIGNED_INT:
2843     //case value::ARRAY_UNSIGNED_CHAR:           2843     //case value::ARRAY_UNSIGNED_CHAR:
2844     //case value::ARRAY_CHAR:                    2844     //case value::ARRAY_CHAR:
2845     case value::ARRAY_UNSIGNED_SHORT:            2845     case value::ARRAY_UNSIGNED_SHORT:
2846     case value::ARRAY_SHORT:                     2846     case value::ARRAY_SHORT:
2847     case value::ARRAY_UNSIGNED_INT:              2847     case value::ARRAY_UNSIGNED_INT:
2848     case value::ARRAY_INT:                       2848     case value::ARRAY_INT:
2849     case value::ARRAY_UNSIGNED_INT64:            2849     case value::ARRAY_UNSIGNED_INT64:
2850     case value::ARRAY_INT64:                     2850     case value::ARRAY_INT64:
2851     case value::ARRAY_FLOAT:                     2851     case value::ARRAY_FLOAT:
2852     case value::ARRAY_DOUBLE:                    2852     case value::ARRAY_DOUBLE:
2853     case value::ARRAY_BOOL:                      2853     case value::ARRAY_BOOL:
2854     case value::ARRAY_STRING:                    2854     case value::ARRAY_STRING:
2855       break;                                     2855       break;
2856     }                                            2856     }
2857     break;                                       2857     break;
2858   case value::NONE:                              2858   case value::NONE:
2859   case value::INT:                               2859   case value::INT:
2860   case value::DOUBLE:                            2860   case value::DOUBLE:
2861   case value::VOID_STAR:                         2861   case value::VOID_STAR:
2862   case value::SHORT:                             2862   case value::SHORT:
2863   case value::INT64:                             2863   case value::INT64:
2864   case value::FLOAT:                             2864   case value::FLOAT:
2865   //case value::UNSIGNED_CHAR:                   2865   //case value::UNSIGNED_CHAR:
2866   //case value::CHAR:                            2866   //case value::CHAR:
2867   case value::UNSIGNED_SHORT :                   2867   case value::UNSIGNED_SHORT :
2868   case value::UNSIGNED_INT:                      2868   case value::UNSIGNED_INT:
2869   case value::UNSIGNED_INT64 :                   2869   case value::UNSIGNED_INT64 :
2870   case value::DOUBLE_STAR:                       2870   case value::DOUBLE_STAR:
2871   case value::FLOAT_STAR:                        2871   case value::FLOAT_STAR:
2872   case value::INT_STAR:                          2872   case value::INT_STAR:
2873   case value::STRING:                            2873   case value::STRING:
2874   //case value::ARRAY_UNSIGNED_CHAR:             2874   //case value::ARRAY_UNSIGNED_CHAR:
2875   //case value::ARRAY_CHAR:                      2875   //case value::ARRAY_CHAR:
2876   case value::ARRAY_UNSIGNED_SHORT:              2876   case value::ARRAY_UNSIGNED_SHORT:
2877   case value::ARRAY_SHORT:                       2877   case value::ARRAY_SHORT:
2878   case value::ARRAY_UNSIGNED_INT:                2878   case value::ARRAY_UNSIGNED_INT:
2879   case value::ARRAY_INT:                         2879   case value::ARRAY_INT:
2880   case value::ARRAY_UNSIGNED_INT64:              2880   case value::ARRAY_UNSIGNED_INT64:
2881   case value::ARRAY_INT64:                       2881   case value::ARRAY_INT64:
2882   case value::ARRAY_FLOAT:                       2882   case value::ARRAY_FLOAT:
2883   case value::ARRAY_DOUBLE:                      2883   case value::ARRAY_DOUBLE:
2884   case value::ARRAY_BOOL:                        2884   case value::ARRAY_BOOL:
2885   case value::ARRAY_STRING:                      2885   case value::ARRAY_STRING:
2886     break;                                       2886     break;
2887   }                                              2887   }
2888   aError = std::string("Value::if_or :")         2888   aError = std::string("Value::if_or :")
2889          + " can't apply on type " + value::s    2889          + " can't apply on type " + value::stype(oType)
2890          + " and type " + aV.stype();            2890          + " and type " + aV.stype();
2891   aThis.set_none();                              2891   aThis.set_none();
2892   return false;                                  2892   return false;
2893 }                                                2893 }
2894                                                  2894 
2895 inline bool value::to_double(const value& aTh    2895 inline bool value::to_double(const value& aThis,double& aValue){
2896   switch(aThis.m_type) {                         2896   switch(aThis.m_type) {
2897   case value::INT:                               2897   case value::INT:
2898     aValue = aThis.u.m_int;                      2898     aValue = aThis.u.m_int;
2899     return true;                                 2899     return true;
2900   case value::DOUBLE:                            2900   case value::DOUBLE:
2901     aValue = aThis.u.m_double;                   2901     aValue = aThis.u.m_double;
2902     return true;                                 2902     return true;
2903   case value::UNSIGNED_SHORT:                    2903   case value::UNSIGNED_SHORT:
2904     aValue = aThis.u.m_unsigned_short;           2904     aValue = aThis.u.m_unsigned_short;
2905     return true;                                 2905     return true;
2906   case value::UNSIGNED_INT:                      2906   case value::UNSIGNED_INT:
2907     aValue = aThis.u.m_unsigned_int;             2907     aValue = aThis.u.m_unsigned_int;
2908     return true;                                 2908     return true;
2909   case value::SHORT:                             2909   case value::SHORT:
2910     aValue = aThis.u.m_short;                    2910     aValue = aThis.u.m_short;
2911     return true;                                 2911     return true;
2912   case value::INT64:                             2912   case value::INT64:
2913     aValue = (double)aThis.u.m_int64;            2913     aValue = (double)aThis.u.m_int64;
2914     return true;                                 2914     return true;
2915   case value::UNSIGNED_INT64:                    2915   case value::UNSIGNED_INT64:
2916     aValue = (double)aThis.u.m_unsigned_int64    2916     aValue = (double)aThis.u.m_unsigned_int64;
2917     return true;                                 2917     return true;
2918   case value::FLOAT:                             2918   case value::FLOAT:
2919     aValue = aThis.u.m_float;                    2919     aValue = aThis.u.m_float;
2920     return true;                                 2920     return true;
2921   //case value::UNSIGNED_CHAR:                   2921   //case value::UNSIGNED_CHAR:
2922   //  aValue = aThis.u.m_unsigned_char;          2922   //  aValue = aThis.u.m_unsigned_char;
2923   //  return true;                               2923   //  return true;
2924   //case value::CHAR:                            2924   //case value::CHAR:
2925   //  aValue = aThis.u.m_char;                   2925   //  aValue = aThis.u.m_char;
2926   //  return true;                               2926   //  return true;
2927   case value::BOOL:                              2927   case value::BOOL:
2928     aValue = aThis.u.m_bool?1:0;                 2928     aValue = aThis.u.m_bool?1:0;
2929     return true;                                 2929     return true;
2930   case value::NONE:                              2930   case value::NONE:
2931   case value::STRING:                            2931   case value::STRING:
2932   case value::VOID_STAR:                         2932   case value::VOID_STAR:
2933   case value::DOUBLE_STAR:                       2933   case value::DOUBLE_STAR:
2934   case value::FLOAT_STAR:                        2934   case value::FLOAT_STAR:
2935   case value::INT_STAR:                          2935   case value::INT_STAR:
2936   //case value::ARRAY_UNSIGNED_CHAR:             2936   //case value::ARRAY_UNSIGNED_CHAR:
2937   //case value::ARRAY_CHAR:                      2937   //case value::ARRAY_CHAR:
2938   case value::ARRAY_UNSIGNED_SHORT:              2938   case value::ARRAY_UNSIGNED_SHORT:
2939   case value::ARRAY_SHORT:                       2939   case value::ARRAY_SHORT:
2940   case value::ARRAY_UNSIGNED_INT:                2940   case value::ARRAY_UNSIGNED_INT:
2941   case value::ARRAY_INT:                         2941   case value::ARRAY_INT:
2942   case value::ARRAY_UNSIGNED_INT64:              2942   case value::ARRAY_UNSIGNED_INT64:
2943   case value::ARRAY_INT64:                       2943   case value::ARRAY_INT64:
2944   case value::ARRAY_FLOAT:                       2944   case value::ARRAY_FLOAT:
2945   case value::ARRAY_DOUBLE:                      2945   case value::ARRAY_DOUBLE:
2946   case value::ARRAY_BOOL:                        2946   case value::ARRAY_BOOL:
2947   case value::ARRAY_STRING:                      2947   case value::ARRAY_STRING:
2948     break;                                       2948     break;
2949   }                                              2949   }
2950   aValue = 0;                                    2950   aValue = 0;
2951   return false;                                  2951   return false;
2952 }                                                2952 }
2953                                                  2953 
2954 inline bool value::cxx_type(const value& aThi    2954 inline bool value::cxx_type(const value& aThis,std::string& aValue){
2955   switch(aThis.m_type) {                         2955   switch(aThis.m_type) {
2956   case value::INT:                               2956   case value::INT:
2957     aValue = "int";                              2957     aValue = "int";
2958     return true;                                 2958     return true;
2959   case value::DOUBLE:                            2959   case value::DOUBLE:
2960     aValue = "double";                           2960     aValue = "double";
2961     return true;                                 2961     return true;
2962   case value::STRING:                            2962   case value::STRING:
2963     aValue = "std::string";                      2963     aValue = "std::string";
2964     return true;                                 2964     return true;
2965   case value::BOOL:                              2965   case value::BOOL:
2966     aValue = "bool";                             2966     aValue = "bool";
2967     return true;                                 2967     return true;
2968   case value::SHORT:                             2968   case value::SHORT:
2969     aValue = "short";                            2969     aValue = "short";
2970     return true;                                 2970     return true;
2971   case value::FLOAT:                             2971   case value::FLOAT:
2972     aValue = "float";                            2972     aValue = "float";
2973     return true;                                 2973     return true;
2974   //case value::CHAR:                            2974   //case value::CHAR:
2975   //  aValue = "char";                           2975   //  aValue = "char";
2976   //  return true;                               2976   //  return true;
2977   //case value::UNSIGNED_CHAR:                   2977   //case value::UNSIGNED_CHAR:
2978   //  aValue = "unsigned char";                  2978   //  aValue = "unsigned char";
2979   //  return true;                               2979   //  return true;
2980   case value::UNSIGNED_SHORT:                    2980   case value::UNSIGNED_SHORT:
2981     aValue = "unsigned short";                   2981     aValue = "unsigned short";
2982     return true;                                 2982     return true;
2983   case value::UNSIGNED_INT:                      2983   case value::UNSIGNED_INT:
2984     aValue = "unsigned int";                     2984     aValue = "unsigned int";
2985     return true;                                 2985     return true;
2986   case value::VOID_STAR:                         2986   case value::VOID_STAR:
2987     aValue = "void*";                            2987     aValue = "void*";
2988     return true;                                 2988     return true;
2989   case value::DOUBLE_STAR:                       2989   case value::DOUBLE_STAR:
2990     aValue = "double*";                          2990     aValue = "double*";
2991     return true;                                 2991     return true;
2992   case value::FLOAT_STAR:                        2992   case value::FLOAT_STAR:
2993     aValue = "float*";                           2993     aValue = "float*";
2994     return true;                                 2994     return true;
2995   case value::INT_STAR:                          2995   case value::INT_STAR:
2996     aValue = "int*";                             2996     aValue = "int*";
2997     return true;                                 2997     return true;
2998   case value::NONE:                              2998   case value::NONE:
2999   case value::INT64:                             2999   case value::INT64:
3000   case value::UNSIGNED_INT64:                    3000   case value::UNSIGNED_INT64:
3001   //case value::ARRAY_UNSIGNED_CHAR:             3001   //case value::ARRAY_UNSIGNED_CHAR:
3002   //case value::ARRAY_CHAR:                      3002   //case value::ARRAY_CHAR:
3003   case value::ARRAY_UNSIGNED_SHORT:              3003   case value::ARRAY_UNSIGNED_SHORT:
3004   case value::ARRAY_SHORT:                       3004   case value::ARRAY_SHORT:
3005   case value::ARRAY_UNSIGNED_INT:                3005   case value::ARRAY_UNSIGNED_INT:
3006   case value::ARRAY_INT:                         3006   case value::ARRAY_INT:
3007   case value::ARRAY_UNSIGNED_INT64:              3007   case value::ARRAY_UNSIGNED_INT64:
3008   case value::ARRAY_INT64:                       3008   case value::ARRAY_INT64:
3009   case value::ARRAY_FLOAT:                       3009   case value::ARRAY_FLOAT:
3010   case value::ARRAY_DOUBLE:                      3010   case value::ARRAY_DOUBLE:
3011   case value::ARRAY_BOOL:                        3011   case value::ARRAY_BOOL:
3012   case value::ARRAY_STRING:                      3012   case value::ARRAY_STRING:
3013     aValue = "";                                 3013     aValue = "";
3014     return false;                                3014     return false;
3015   }                                              3015   }
3016   return false;                                  3016   return false;
3017 }                                                3017 }
3018                                                  3018 
3019 /*                                               3019 /*
3020 inline bool value::i_set(value& aThis,const S    3020 inline bool value::i_set(value& aThis,const Slash::Core::IValue& aValue){
3021   aThis.reset();                                 3021   aThis.reset();
3022                                                  3022 
3023   aThis.m_type = aValue.type();                  3023   aThis.m_type = aValue.type();
3024                                                  3024 
3025   switch(aValue.type()) {                        3025   switch(aValue.type()) {
3026   case value::NONE:                              3026   case value::NONE:
3027     aThis.u.m_unsigned_int64 = 0;                3027     aThis.u.m_unsigned_int64 = 0;
3028     return true;                                 3028     return true;
3029   case value::CHAR:                              3029   case value::CHAR:
3030     aThis.u.m_char = aValue.get_char();          3030     aThis.u.m_char = aValue.get_char();
3031     return true;                                 3031     return true;
3032   case value::SHORT:                             3032   case value::SHORT:
3033     aThis.u.m_short = aValue.get_short();        3033     aThis.u.m_short = aValue.get_short();
3034     return true;                                 3034     return true;
3035   case value::INT:                               3035   case value::INT:
3036     aThis.u.m_int = aValue.get_int();            3036     aThis.u.m_int = aValue.get_int();
3037     return true;                                 3037     return true;
3038   case value::INT64:                             3038   case value::INT64:
3039     aThis.u.m_int64 = aValue.get_int64();        3039     aThis.u.m_int64 = aValue.get_int64();
3040     return true;                                 3040     return true;
3041   case value::UNSIGNED_INT64:                    3041   case value::UNSIGNED_INT64:
3042     aThis.u.m_unsigned_int64 = aValue.get_uns    3042     aThis.u.m_unsigned_int64 = aValue.get_unsigned_int64();
3043     return true;                                 3043     return true;
3044   //case value::UNSIGNED_CHAR:                   3044   //case value::UNSIGNED_CHAR:
3045   //  aThis.u.m_unsigned_char = aValue.get_un    3045   //  aThis.u.m_unsigned_char = aValue.get_unsigned_char();
3046   //  return true;                               3046   //  return true;
3047   case value::UNSIGNED_SHORT:                    3047   case value::UNSIGNED_SHORT:
3048     aThis.u.m_unsigned_short  = aValue.get_un    3048     aThis.u.m_unsigned_short  = aValue.get_unsigned_short();
3049     return true;                                 3049     return true;
3050   case value::UNSIGNED_INT:                      3050   case value::UNSIGNED_INT:
3051     aThis.u.m_unsigned_int  = aValue.get_unsi    3051     aThis.u.m_unsigned_int  = aValue.get_unsigned_int();
3052     return true;                                 3052     return true;
3053   case value::DOUBLE_STAR:                       3053   case value::DOUBLE_STAR:
3054     aThis.u.m_double_star  = aValue.get_doubl    3054     aThis.u.m_double_star  = aValue.get_double_star();
3055     return true;                                 3055     return true;
3056   case value::FLOAT_STAR:                        3056   case value::FLOAT_STAR:
3057     aThis.u.m_float_star  = aValue.get_float_    3057     aThis.u.m_float_star  = aValue.get_float_star();
3058     return true;                                 3058     return true;
3059   case value::INT_STAR:                          3059   case value::INT_STAR:
3060     aThis.u.m_int_star  = aValue.get_int_star    3060     aThis.u.m_int_star  = aValue.get_int_star();
3061     return true;                                 3061     return true;
3062   case value::FLOAT:                             3062   case value::FLOAT:
3063     aThis.u.m_float = aValue.get_float();        3063     aThis.u.m_float = aValue.get_float();
3064     return true;                                 3064     return true;
3065   case value::DOUBLE:                            3065   case value::DOUBLE:
3066     aThis.u.m_double = aValue.get_double();      3066     aThis.u.m_double = aValue.get_double();
3067     return true;                                 3067     return true;
3068   case value::VOID_STAR:                         3068   case value::VOID_STAR:
3069     aThis.u.m_void_star = aValue.get_void_sta    3069     aThis.u.m_void_star = aValue.get_void_star();
3070     return true;                                 3070     return true;
3071   case value::BOOL:                              3071   case value::BOOL:
3072     aThis.u.m_bool = aValue.get_bool();          3072     aThis.u.m_bool = aValue.get_bool();
3073     return true;                                 3073     return true;
3074   case value::STRING:                            3074   case value::STRING:
3075     aThis.u.m_string = new std::string(aValue    3075     aThis.u.m_string = new std::string(aValue.get_string());
3076     return true;                                 3076     return true;
3077                                                  3077 
3078   case value::ARRAY_UNSIGNED_CHAR:               3078   case value::ARRAY_UNSIGNED_CHAR:
3079    {std::vector<unsigned int> is;                3079    {std::vector<unsigned int> is;
3080     const std::vector<unsigned char>& vd = aV    3080     const std::vector<unsigned char>& vd = aValue.get_array_unsigned_char(is);
3081     aThis.u.m_array_unsigned_char = new array    3081     aThis.u.m_array_unsigned_char = new array<unsigned char>();
3082     if(!aThis.u.m_array_unsigned_char->config    3082     if(!aThis.u.m_array_unsigned_char->configure(is)){
3083       aThis.set_none();return false;             3083       aThis.set_none();return false;
3084     }                                            3084     }
3085     if(!aThis.u.m_array_unsigned_char->fill(v    3085     if(!aThis.u.m_array_unsigned_char->fill(vd)){aThis.set_none();return false;}
3086     return true;}                                3086     return true;}
3087                                                  3087 
3088   case value::ARRAY_CHAR:                        3088   case value::ARRAY_CHAR:
3089    {std::vector<unsigned int> is;                3089    {std::vector<unsigned int> is;
3090     const std::vector<char>& vd = aValue.get_    3090     const std::vector<char>& vd = aValue.get_array_char(is);
3091     aThis.u.m_array_char = new array<char>();    3091     aThis.u.m_array_char = new array<char>();
3092     if(!aThis.u.m_array_char->configure(is)){    3092     if(!aThis.u.m_array_char->configure(is)){
3093       aThis.set_none();return false;             3093       aThis.set_none();return false;
3094     }                                            3094     }
3095     if(!aThis.u.m_array_char->fill(vd)){aThis    3095     if(!aThis.u.m_array_char->fill(vd)){aThis.set_none();return false;}
3096     return true;}                                3096     return true;}
3097   case value::ARRAY_UNSIGNED_SHORT:              3097   case value::ARRAY_UNSIGNED_SHORT:
3098    {std::vector<unsigned int> is;                3098    {std::vector<unsigned int> is;
3099     const std::vector<unsigned short>& vd =      3099     const std::vector<unsigned short>& vd =
3100       aValue.get_array_unsigned_short(is);       3100       aValue.get_array_unsigned_short(is);
3101     aThis.u.m_array_unsigned_short = new arra    3101     aThis.u.m_array_unsigned_short = new array<unsigned short>();
3102     if(!aThis.u.m_array_unsigned_short->confi    3102     if(!aThis.u.m_array_unsigned_short->configure(is)){
3103       aThis.set_none();return false;             3103       aThis.set_none();return false;
3104     }                                            3104     }
3105     if(!aThis.u.m_array_unsigned_short->fill(    3105     if(!aThis.u.m_array_unsigned_short->fill(vd)){
3106       aThis.set_none();return false;             3106       aThis.set_none();return false;
3107     }                                            3107     }
3108     return true;}                                3108     return true;}
3109                                                  3109 
3110   case value::ARRAY_SHORT:                       3110   case value::ARRAY_SHORT:
3111    {std::vector<unsigned int> is;                3111    {std::vector<unsigned int> is;
3112     const std::vector<short>& vd = aValue.get    3112     const std::vector<short>& vd = aValue.get_array_short(is);
3113     aThis.u.m_array_short = new array<short>(    3113     aThis.u.m_array_short = new array<short>();
3114     if(!aThis.u.m_array_short->configure(is))    3114     if(!aThis.u.m_array_short->configure(is)){aThis.set_none();return false;}
3115     if(!aThis.u.m_array_short->fill(vd)){aThi    3115     if(!aThis.u.m_array_short->fill(vd)){aThis.set_none();return false;}
3116     return true;}                                3116     return true;}
3117                                                  3117 
3118   case value::ARRAY_UNSIGNED_INT:                3118   case value::ARRAY_UNSIGNED_INT:
3119    {std::vector<unsigned int> is;                3119    {std::vector<unsigned int> is;
3120     const std::vector<unsigned int>& vd = aVa    3120     const std::vector<unsigned int>& vd = aValue.get_array_unsigned_int(is);
3121     aThis.u.m_array_unsigned_int = new array<    3121     aThis.u.m_array_unsigned_int = new array<unsigned int>();
3122     if(!aThis.u.m_array_unsigned_int->configu    3122     if(!aThis.u.m_array_unsigned_int->configure(is)){
3123       aThis.set_none();return false;             3123       aThis.set_none();return false;
3124     }                                            3124     }
3125     if(!aThis.u.m_array_unsigned_int->fill(vd    3125     if(!aThis.u.m_array_unsigned_int->fill(vd)){
3126       aThis.set_none();return false;             3126       aThis.set_none();return false;
3127     }                                            3127     }
3128     return true;}                                3128     return true;}
3129                                                  3129 
3130   case value::ARRAY_INT:                         3130   case value::ARRAY_INT:
3131    {std::vector<unsigned int> is;                3131    {std::vector<unsigned int> is;
3132     const std::vector<int>& vd = aValue.get_a    3132     const std::vector<int>& vd = aValue.get_array_int(is);
3133     aThis.u.m_array_int = new array<int>();      3133     aThis.u.m_array_int = new array<int>();
3134     if(!aThis.u.m_array_int->configure(is)){a    3134     if(!aThis.u.m_array_int->configure(is)){aThis.set_none();return false;}
3135     if(!aThis.u.m_array_int->fill(vd)){aThis.    3135     if(!aThis.u.m_array_int->fill(vd)){aThis.set_none();return false;}
3136     return true;}                                3136     return true;}
3137                                                  3137 
3138   case value::ARRAY_UNSIGNED_INT64:              3138   case value::ARRAY_UNSIGNED_INT64:
3139    {std::vector<unsigned int> is;                3139    {std::vector<unsigned int> is;
3140     const std::vector<uint64>& vd = aValue.ge    3140     const std::vector<uint64>& vd = aValue.get_array_unsigned_int64(is);
3141     aThis.u.m_array_unsigned_int64 = new arra    3141     aThis.u.m_array_unsigned_int64 = new array<uint64>();
3142     if(!aThis.u.m_array_unsigned_int64->confi    3142     if(!aThis.u.m_array_unsigned_int64->configure(is)){
3143       aThis.set_none();return false;             3143       aThis.set_none();return false;
3144     }                                            3144     }
3145     if(!aThis.u.m_array_unsigned_int64->fill(    3145     if(!aThis.u.m_array_unsigned_int64->fill(vd)){
3146       aThis.set_none();return false;             3146       aThis.set_none();return false;
3147     }                                            3147     }
3148     return true;}                                3148     return true;}
3149                                                  3149 
3150   case value::ARRAY_INT64:                       3150   case value::ARRAY_INT64:
3151    {std::vector<unsigned int> is;                3151    {std::vector<unsigned int> is;
3152     const std::vector<int64>& vd = aValue.get    3152     const std::vector<int64>& vd = aValue.get_array_int64(is);
3153     aThis.u.m_array_int64 = new array<int64>(    3153     aThis.u.m_array_int64 = new array<int64>();
3154     if(!aThis.u.m_array_int64->configure(is))    3154     if(!aThis.u.m_array_int64->configure(is)){aThis.set_none();return false;}
3155     if(!aThis.u.m_array_int64->fill(vd)){aThi    3155     if(!aThis.u.m_array_int64->fill(vd)){aThis.set_none();return false;}
3156     return true;}                                3156     return true;}
3157                                                  3157 
3158   case value::ARRAY_FLOAT:                       3158   case value::ARRAY_FLOAT:
3159    {std::vector<unsigned int> is;                3159    {std::vector<unsigned int> is;
3160     const std::vector<float>& vd = aValue.get    3160     const std::vector<float>& vd = aValue.get_array_float(is);
3161     aThis.u.m_array_float = new array<float>(    3161     aThis.u.m_array_float = new array<float>();
3162     if(!aThis.u.m_array_float->configure(is))    3162     if(!aThis.u.m_array_float->configure(is)){aThis.set_none();return false;}
3163     if(!aThis.u.m_array_float->fill(vd)){aThi    3163     if(!aThis.u.m_array_float->fill(vd)){aThis.set_none();return false;}
3164     return true;}                                3164     return true;}
3165                                                  3165 
3166   case value::ARRAY_DOUBLE:                      3166   case value::ARRAY_DOUBLE:
3167    {std::vector<unsigned int> is;                3167    {std::vector<unsigned int> is;
3168     const std::vector<double>& vd = aValue.ge    3168     const std::vector<double>& vd = aValue.get_array_double(is);
3169     aThis.u.m_array_double = new array<double    3169     aThis.u.m_array_double = new array<double>();
3170     if(!aThis.u.m_array_double->configure(is)    3170     if(!aThis.u.m_array_double->configure(is)){aThis.set_none();return false;}
3171     if(!aThis.u.m_array_double->fill(vd)){aTh    3171     if(!aThis.u.m_array_double->fill(vd)){aThis.set_none();return false;}
3172     return true;}                                3172     return true;}
3173                                                  3173 
3174   case value::ARRAY_BOOL:                        3174   case value::ARRAY_BOOL:
3175    {std::vector<unsigned int> is;                3175    {std::vector<unsigned int> is;
3176     const std::vector<bool>& vd = aValue.get_    3176     const std::vector<bool>& vd = aValue.get_array_bool(is);
3177     aThis.u.m_array_bool = new array<bool>();    3177     aThis.u.m_array_bool = new array<bool>();
3178     if(!aThis.u.m_array_bool->configure(is)){    3178     if(!aThis.u.m_array_bool->configure(is)){aThis.set_none();return false;}
3179     if(!aThis.u.m_array_bool->fill(vd)){aThis    3179     if(!aThis.u.m_array_bool->fill(vd)){aThis.set_none();return false;}
3180     return true;}                                3180     return true;}
3181                                                  3181 
3182   case value::ARRAY_STRING:                      3182   case value::ARRAY_STRING:
3183    {std::vector<unsigned int> is;                3183    {std::vector<unsigned int> is;
3184     const std::vector<std::string>& vd = aVal    3184     const std::vector<std::string>& vd = aValue.get_array_string(is);
3185     aThis.u.m_array_string = new array<std::s    3185     aThis.u.m_array_string = new array<std::string>();
3186     if(!aThis.u.m_array_string->configure(is)    3186     if(!aThis.u.m_array_string->configure(is)){aThis.set_none();return false;}
3187     if(!aThis.u.m_array_string->fill(vd)){aTh    3187     if(!aThis.u.m_array_string->fill(vd)){aThis.set_none();return false;}
3188     return true;}                                3188     return true;}
3189                                                  3189 
3190   }                                              3190   }
3191                                                  3191 
3192   aThis.set_none();                              3192   aThis.set_none();
3193   return false;                                  3193   return false;
3194 }                                                3194 }
3195 */                                               3195 */
3196                                                  3196 
3197 inline std::string value::to_string(const val    3197 inline std::string value::to_string(const value& aThis){
3198   std::string _s;                                3198   std::string _s;
3199   switch(aThis.m_type) {                         3199   switch(aThis.m_type) {
3200   case value::NONE:                              3200   case value::NONE:
3201     sprintf(_s,5,"(nil)");                       3201     sprintf(_s,5,"(nil)");
3202     return _s;                                   3202     return _s;
3203   case value::INT:                               3203   case value::INT:
3204     sprintf(_s,16,"%d",aThis.u.m_int);           3204     sprintf(_s,16,"%d",aThis.u.m_int);
3205     return _s;                                   3205     return _s;
3206   case value::DOUBLE:                            3206   case value::DOUBLE:
3207     sprintf(_s,16,"%g",aThis.u.m_double);        3207     sprintf(_s,16,"%g",aThis.u.m_double);
3208     return _s;                                   3208     return _s;
3209   case value::VOID_STAR:                         3209   case value::VOID_STAR:
3210     sprintf(_s,32,upointer_format_x(),(upoint    3210     sprintf(_s,32,upointer_format_x(),(upointer)aThis.u.m_void_star);
3211     return _s;                                   3211     return _s;
3212   case value::UNSIGNED_SHORT:                    3212   case value::UNSIGNED_SHORT:
3213     sprintf(_s,16,"%u",aThis.u.m_unsigned_sho    3213     sprintf(_s,16,"%u",aThis.u.m_unsigned_short);
3214     return _s;                                   3214     return _s;
3215   case value::UNSIGNED_INT:                      3215   case value::UNSIGNED_INT:
3216     sprintf(_s,16,"%u",aThis.u.m_unsigned_int    3216     sprintf(_s,16,"%u",aThis.u.m_unsigned_int);
3217     return _s;                                   3217     return _s;
3218   case value::BOOL:                              3218   case value::BOOL:
3219     sprintf(_s,5,"%s",aThis.u.m_bool?"true":"    3219     sprintf(_s,5,"%s",aThis.u.m_bool?"true":"false");
3220     return _s;                                   3220     return _s;
3221   case value::SHORT:                             3221   case value::SHORT:
3222     sprintf(_s,16,"%d",aThis.u.m_short);         3222     sprintf(_s,16,"%d",aThis.u.m_short);
3223     return _s;                                   3223     return _s;
3224   case value::INT64:{                            3224   case value::INT64:{
3225     sprintf(_s,16,int64_format(),aThis.u.m_in    3225     sprintf(_s,16,int64_format(),aThis.u.m_int64);
3226    }return _s;                                   3226    }return _s;
3227   case value::UNSIGNED_INT64:{                   3227   case value::UNSIGNED_INT64:{
3228     sprintf(_s,16,int64_format(),aThis.u.m_un    3228     sprintf(_s,16,int64_format(),aThis.u.m_unsigned_int64);
3229    }return _s;                                   3229    }return _s;
3230   case value::FLOAT:                             3230   case value::FLOAT:
3231     sprintf(_s,16,"%g",aThis.u.m_float);         3231     sprintf(_s,16,"%g",aThis.u.m_float);
3232     return _s;                                   3232     return _s;
3233   //case value::UNSIGNED_CHAR:                   3233   //case value::UNSIGNED_CHAR:
3234   //  sprintf(_s,16,"%c",aThis.u.m_unsigned_c    3234   //  sprintf(_s,16,"%c",aThis.u.m_unsigned_char);
3235   //  return _s;                                 3235   //  return _s;
3236   //case value::CHAR:                            3236   //case value::CHAR:
3237   //  sprintf(_s,16,"%c",aThis.u.m_char);        3237   //  sprintf(_s,16,"%c",aThis.u.m_char);
3238   //  return _s;                                 3238   //  return _s;
3239   case value::DOUBLE_STAR:                       3239   case value::DOUBLE_STAR:
3240     sprintf(_s,32,upointer_format_x(),(upoint    3240     sprintf(_s,32,upointer_format_x(),(upointer)aThis.u.m_double_star);
3241     return _s;                                   3241     return _s;
3242   case value::FLOAT_STAR:                        3242   case value::FLOAT_STAR:
3243     sprintf(_s,32,upointer_format_x(),(upoint    3243     sprintf(_s,32,upointer_format_x(),(upointer)aThis.u.m_float_star);
3244     return _s;                                   3244     return _s;
3245   case value::INT_STAR:                          3245   case value::INT_STAR:
3246     sprintf(_s,32,upointer_format_x(),(upoint    3246     sprintf(_s,32,upointer_format_x(),(upointer)aThis.u.m_int_star);
3247     return _s;                                   3247     return _s;
3248   case value::STRING:                            3248   case value::STRING:
3249     return *aThis.u.m_string;                    3249     return *aThis.u.m_string;
3250                                                  3250 
3251   //case value::ARRAY_UNSIGNED_CHAR:             3251   //case value::ARRAY_UNSIGNED_CHAR:
3252   //  return tos<unsigned char>(aThis.u.m_arr    3252   //  return tos<unsigned char>(aThis.u.m_array_unsigned_char->vector());
3253   //case value::ARRAY_CHAR:                      3253   //case value::ARRAY_CHAR:
3254   //  return tos<char>(aThis.u.m_array_char->    3254   //  return tos<char>(aThis.u.m_array_char->vector());
3255   case value::ARRAY_UNSIGNED_SHORT:              3255   case value::ARRAY_UNSIGNED_SHORT:
3256     if(!nums2s<unsigned short>(aThis.u.m_arra    3256     if(!nums2s<unsigned short>(aThis.u.m_array_unsigned_short->vector(),_s)) {}
3257     return _s;                                   3257     return _s;
3258   case value::ARRAY_SHORT:                       3258   case value::ARRAY_SHORT:
3259     if(!nums2s<short>(aThis.u.m_array_short->    3259     if(!nums2s<short>(aThis.u.m_array_short->vector(),_s)) {}
3260     return _s;                                   3260     return _s;
3261                                                  3261 
3262   case value::ARRAY_UNSIGNED_INT:                3262   case value::ARRAY_UNSIGNED_INT:
3263     if(!nums2s<unsigned int>(aThis.u.m_array_    3263     if(!nums2s<unsigned int>(aThis.u.m_array_unsigned_int->vector(),_s)) {}
3264     return _s;                                   3264     return _s;
3265   case value::ARRAY_INT:                         3265   case value::ARRAY_INT:
3266     if(!nums2s<int>(aThis.u.m_array_int->vect    3266     if(!nums2s<int>(aThis.u.m_array_int->vector(),_s)) {}
3267     return _s;                                   3267     return _s;
3268                                                  3268 
3269   case value::ARRAY_UNSIGNED_INT64:              3269   case value::ARRAY_UNSIGNED_INT64:
3270     if(!nums2s<uint64>(aThis.u.m_array_unsign    3270     if(!nums2s<uint64>(aThis.u.m_array_unsigned_int64->vector(),_s)) {}
3271     return _s;                                   3271     return _s;
3272   case value::ARRAY_INT64:                       3272   case value::ARRAY_INT64:
3273     if(!nums2s<int64>(aThis.u.m_array_int64->    3273     if(!nums2s<int64>(aThis.u.m_array_int64->vector(),_s)) {}
3274     return _s;                                   3274     return _s;
3275                                                  3275 
3276   case value::ARRAY_FLOAT:                       3276   case value::ARRAY_FLOAT:
3277     if(!nums2s<float>(aThis.u.m_array_float->    3277     if(!nums2s<float>(aThis.u.m_array_float->vector(),_s)) {}
3278     return _s;                                   3278     return _s;
3279   case value::ARRAY_DOUBLE:                      3279   case value::ARRAY_DOUBLE:
3280     if(!nums2s<double>(aThis.u.m_array_double    3280     if(!nums2s<double>(aThis.u.m_array_double->vector(),_s)) {}
3281     return _s;                                   3281     return _s;
3282   case value::ARRAY_BOOL:                        3282   case value::ARRAY_BOOL:
3283     b2s(aThis.u.m_array_bool->vector(),_s);      3283     b2s(aThis.u.m_array_bool->vector(),_s);
3284     return _s;                                   3284     return _s;
3285   case value::ARRAY_STRING:                      3285   case value::ARRAY_STRING:
3286     if(!nums2s<std::string>(aThis.u.m_array_s    3286     if(!nums2s<std::string>(aThis.u.m_array_string->vector(),_s)) {}
3287     return _s;                                   3287     return _s;
3288   default:                                       3288   default:
3289     return "unknown"; //it should not happen.    3289     return "unknown"; //it should not happen.
3290   }                                              3290   }
3291 }                                                3291 }
3292                                                  3292 
3293 }                                                3293 }
3294                                                  3294