5 #ifndef CMR_TUPLE_INCLUDED
6 #define CMR_TUPLE_INCLUDED
14 #include "StringBuffer.h"
21 typedef Tuple* PTuple;
43 unsigned int att_type_;
47 void set_symbol(
const Symbol& att);
48 void set_type(
Types type);
49 void set_is_ref(
bool ref);
50 void set_is_const(
bool cnst);
60 Types get_type()
const;
64 bool get_is_ref()
const;
68 bool get_is_const()
const;
72 const Value* get_next()
const;
81 const void* get_pvalue()
const;
91 const Bool* is_bool()
const;
99 const ListBool* is_list_bool()
const;
108 const Int* is_int()
const;
116 const ListInt* is_list_int()
const;
125 const Long* is_long()
const;
133 const ListLong* is_list_long()
const;
142 const Float* is_float()
const;
159 const Double* is_double()
const;
176 const Symbol* is_symbol()
const;
193 const AString* is_astring()
const;
210 const String* is_string()
const;
244 const Blob* is_blob()
const;
252 const ListBlob* is_list_blob()
const;
261 const Tuple* is_tuple()
const;
278 const TimeDate* is_time_date()
const;
312 const ArrayInt* is_array_int()
const;
393 operator bool()
const {
return more(); }
423 Value* operator -> ()
const {
return value_; }
432 friend class ValueIterator;
447 operator bool()
const {
return more(); }
476 const Value* operator -> ()
const {
return value_; }
486 friend class ConstValueIterator;
493 Tuple(
const AChar* class_name);
499 Tuple& operator = (
const Tuple& tuple) {
return assign(tuple); }
503 operator bool () {
return !is_empty(); }
546 bool is_a(
Symbol class_name)
const {
return symbolClass_ == class_name; }
552 inline AString& set_astring(
const Symbol& att,
const AChar* v);
558 inline AString& add_astring(
const Symbol& att,
const AChar* v = 0);
565 inline String& set_string(
const Symbol& att,
const Char* v);
571 inline String& add_string(
const Symbol& att,
const Char* v = 0);
590 bool is_set(
const Symbol& att)
const;
598 bool is_null(
const Symbol& att)
const;
602 void set_null(
const Symbol& att);
606 void clear(
const Symbol& att);
619 void clear_list(
const Symbol& att);
624 bool is_empty()
const;
637 long from_string(
const AString& s);
647 void set_class_name(
const Symbol& className);
669 inline const Symbol& get_symbol(
const Symbol& att)
const;
670 inline const Symbol* get_psymbol(
const Symbol& att)
const;
682 inline Int get_int(
const Symbol& att, Int pv = 0)
const;
683 inline const Int* get_pint(
const Symbol& att)
const;
684 inline Int& set_int(
const Symbol& att);
685 inline Int& set_int(
const Symbol& att, Int v);
686 inline Int& set_ref_int(
const Symbol& att, Int& v);
687 inline const Int& set_cref_int(
const Symbol& att,
const Int& v);
689 inline const ListInt* get_plist_int(
const Symbol& att)
const;
694 inline void add_int(
const Symbol& att, Int v);
695 inline Bool get_bool(
const Symbol& att, Bool pv = 0)
const;
696 inline const Bool* get_pbool(
const Symbol& att)
const;
697 inline Bool& set_bool(
const Symbol& att);
698 inline Bool& set_bool(
const Symbol& att, Bool v);
699 inline Bool& set_ref_bool(
const Symbol& att, Bool& v);
700 inline const Bool& set_cref_bool(
const Symbol& att,
const Bool& v);
707 inline void add_bool(
const Symbol& att, Bool v);
709 inline Long get_long(
const Symbol& att, Long pv = 0)
const;
710 inline const Long* get_plong(
const Symbol& att)
const;
711 inline Long& set_long(
const Symbol& att);
712 inline Long& set_long(
const Symbol& att, Long v);
713 inline Long& set_ref_long(
const Symbol& att, Long& v);
714 inline const Long& set_cref_long(
const Symbol& att,
const Long& v);
721 inline void add_long(
const Symbol& att, Long v);
723 inline Float get_float(
const Symbol& att, Float pv = 0)
const;
724 inline const Float* get_pfloat(
const Symbol& att)
const;
725 inline Float& set_float(
const Symbol& att);
726 inline Float& set_float(
const Symbol& att, Float v);
727 inline Float& set_ref_float(
const Symbol& att, Float& v);
728 inline const Float& set_cref_float(
const Symbol& att,
const Float& v);
735 inline void add_float(
const Symbol& att, Float v);
737 inline Double get_double(
const Symbol& att, Double pv = 0)
const;
738 inline const Double* get_pdouble(
const Symbol& att)
const;
739 inline Double& set_double(
const Symbol& att);
740 inline Double& set_double(
const Symbol& att, Double v);
741 inline Double& set_ref_double(
const Symbol& att, Double& v);
742 inline const Double& set_cref_double(
const Symbol& att,
const Double& v);
749 inline void add_double(
const Symbol& att, Double v);
793 inline const String& get_string(
const Symbol& att)
const;
794 inline const String* get_pstring(
const Symbol& att)
const;
821 inline const Blob& get_blob(
const Symbol& att)
const;
822 inline const Blob* get_pblob(
const Symbol& att)
const;
826 inline const Blob& set_cref_blob(
const Symbol& att,
const Blob& v);
835 inline const Tuple& get_tuple(
const Symbol& att)
const;
836 inline const Tuple* get_ptuple(
const Symbol& att)
const;
920 bool match(
const AString& pattern,
const AString& source, AChar esc);
936 long read_xml(XmlParser& i);
942 long write_xml(
OBStream& o,
const AChar* att = 0)
const;
947 long write_xml(
const Path& file_name)
const;
951 long read_xml(
const Path& file_name);
974 long format(
const AChar* format,
OBStream& o)
const;
979 bool equal(
const Tuple& tuple)
const;
983 int compare(
const Tuple& t)
const;
987 bool operator== (
const Tuple& t)
const {
return equal(t); }
988 bool operator!= (
const Tuple& t)
const {
return !equal(t); }
989 bool operator< (
const Tuple& t)
const {
return compare(t) < 0; }
990 bool operator> (
const Tuple& t)
const {
return compare(t) > 0; }
993 PValue get_value(
const Symbol& att)
const;
994 PValue get_value(
const Symbol& att,
Types type)
const;
995 void* get_pvalue(
const Symbol& att,
Types type,
bool nodef =
true)
const;
997 PValue set_value(PValue value);
999 PValue set_value(
const Symbol& att,
Types type,
const void* value = 0,
bool ref =
false,
bool cnst =
false);
1000 void add_value_item(PValue value);
1002 Symbol symbolClass_;
1007 inline Bool& Tuple::set_bool(
const Symbol& att, Bool v)
1009 PValue value = set_value(att, T_BOOL, &v,
false);
1010 return *(Bool*)value->get_pvalue();
1012 inline Bool& Tuple::set_ref_bool(
const Symbol& att, Bool& v)
1014 set_value(att, T_BOOL, &v,
true);
1017 inline const Bool& Tuple::set_cref_bool(
const Symbol& att,
const Bool& v)
1019 set_value(att, T_BOOL, &v,
true,
true);
1022 inline Bool& Tuple::set_bool(
const Symbol& att)
1025 PValue value = set_value(att, T_BOOL, &v,
false);
1026 return *(Bool*)value->get_pvalue();
1028 inline ListBool& Tuple::set_list_bool(
const Symbol& att,
const ListBool& v)
1030 PValue value = set_value(att, T_LIST_BOOL, (
void*)&v,
false);
1031 return *(ListBool*)value->get_pvalue();
1033 inline ListBool& Tuple::set_ref_list_bool(
const Symbol& att, ListBool& v)
1035 set_value(att, T_LIST_BOOL, (
void*)&v,
true);
1038 inline const ListBool& Tuple::set_cref_list_bool(
const Symbol& att,
const ListBool& v)
1040 set_value(att, T_LIST_BOOL, (
void*)&v,
true,
true);
1043 inline ListBool& Tuple::set_list_bool(
const Symbol& att)
1045 PValue value = set_value(att, T_LIST_BOOL, (
void*)0,
false);
1046 return *(ListBool*)value->get_pvalue();
1048 inline void Tuple::add_bool(
const Symbol& att, Bool v)
1050 ((ListBool*)set_value(att, T_LIST_BOOL, (
void*)0,
false)->get_pvalue())->add(v);
1052 inline Bool Tuple::get_bool(
const Symbol& att, Bool v)
const
1054 if (Value* value = get_value(att, T_BOOL))
1056 return *(Bool*)value->get_pvalue();
1063 inline const Bool* Tuple::get_pbool(
const Symbol& att)
const
1065 if (Value* value = get_value(att, T_BOOL))
1067 return (
const Bool*)value->get_pvalue();
1074 inline const ListBool& Tuple::get_list_bool(
const Symbol& att)
const
1076 return *(
const ListBool*)get_pvalue(att, T_LIST_BOOL,
false);
1078 inline const ListBool* Tuple::get_plist_bool(
const Symbol& att)
const
1080 if (Value* value = get_value(att, T_LIST_BOOL))
1082 return (
const ListBool*)value->get_pvalue();
1090 inline Int& Tuple::set_int(
const Symbol& att, Int v)
1092 PValue value = set_value(att, T_INT, &v,
false);
1093 return *(Int*)value->get_pvalue();
1095 inline Int& Tuple::set_ref_int(
const Symbol& att, Int& v)
1097 set_value(att, T_INT, &v,
true);
1100 inline const Int& Tuple::set_cref_int(
const Symbol& att,
const Int& v)
1102 set_value(att, T_INT, &v,
true,
true);
1105 inline Int& Tuple::set_int(
const Symbol& att)
1108 PValue value = set_value(att, T_INT, &v,
false);
1109 return *(Int*)value->get_pvalue();
1111 inline ListInt& Tuple::set_list_int(
const Symbol& att,
const ListInt& v)
1113 PValue value = set_value(att, T_LIST_INT, (
void*)&v,
false);
1114 return *(ListInt*)value->get_pvalue();
1116 inline ListInt& Tuple::set_ref_list_int(
const Symbol& att, ListInt& v)
1118 set_value(att, T_LIST_INT, (
void*)&v,
true);
1121 inline const ListInt& Tuple::set_cref_list_int(
const Symbol& att,
const ListInt& v)
1123 set_value(att, T_LIST_INT, (
void*)&v,
true,
true);
1126 inline ListInt& Tuple::set_list_int(
const Symbol& att)
1128 PValue value = set_value(att, T_LIST_INT, (
void*)0,
false);
1129 return *(ListInt*)value->get_pvalue();
1131 inline void Tuple::add_int(
const Symbol& att, Int v)
1133 ((ListInt*)set_value(att, T_LIST_INT, (
void*)0,
false)->get_pvalue())->add(v);
1135 inline Int Tuple::get_int(
const Symbol& att, Int v)
const
1137 if (Value* value = get_value(att, T_INT))
1139 return *(Int*)value->get_pvalue();
1146 inline const Int* Tuple::get_pint(
const Symbol& att)
const
1148 if (Value* value = get_value(att, T_INT))
1150 return (
const Int*)value->get_pvalue();
1157 inline const ListInt& Tuple::get_list_int(
const Symbol& att)
const
1159 return *(
const ListInt*)get_pvalue(att, T_LIST_INT,
false);
1161 inline const ListInt* Tuple::get_plist_int(
const Symbol& att)
const
1163 if (Value* value = get_value(att, T_LIST_INT))
1165 return (
const ListInt*)value->get_pvalue();
1173 inline Long& Tuple::set_long(
const Symbol& att, Long v)
1175 PValue value = set_value(att, T_LONG, &v,
false);
1176 return *(Long*)value->get_pvalue();
1178 inline Long& Tuple::set_ref_long(
const Symbol& att, Long& v)
1180 set_value(att, T_LONG, &v,
true);
1183 inline const Long& Tuple::set_cref_long(
const Symbol& att,
const Long& v)
1185 set_value(att, T_LONG, &v,
true,
true);
1188 inline Long& Tuple::set_long(
const Symbol& att)
1191 PValue value = set_value(att, T_LONG, &v,
false);
1192 return *(Long*)value->get_pvalue();
1194 inline ListLong& Tuple::set_list_long(
const Symbol& att,
const ListLong& v)
1196 PValue value = set_value(att, T_LIST_LONG, (
void*)&v,
false);
1197 return *(ListLong*)value->get_pvalue();
1199 inline ListLong& Tuple::set_ref_list_long(
const Symbol& att, ListLong& v)
1201 set_value(att, T_LIST_LONG, (
void*)&v,
true);
1204 inline const ListLong& Tuple::set_cref_list_long(
const Symbol& att,
const ListLong& v)
1206 set_value(att, T_LIST_LONG, (
void*)&v,
true,
true);
1209 inline ListLong& Tuple::set_list_long(
const Symbol& att)
1211 PValue value = set_value(att, T_LIST_LONG, (
void*)0,
false);
1212 return *(ListLong*)value->get_pvalue();
1214 inline void Tuple::add_long(
const Symbol& att, Long v)
1216 ((ListLong*)set_value(att, T_LIST_LONG, (
void*)0,
false)->get_pvalue())->add(v);
1218 inline Long Tuple::get_long(
const Symbol& att, Long v)
const
1220 if (Value* value = get_value(att, T_LONG))
1222 return *(Long*)value->get_pvalue();
1229 inline const Long* Tuple::get_plong(
const Symbol& att)
const
1231 if (Value* value = get_value(att, T_LONG))
1233 return (
const Long*)value->get_pvalue();
1240 inline const ListLong& Tuple::get_list_long(
const Symbol& att)
const
1242 return *(
const ListLong*)get_pvalue(att, T_LIST_LONG,
false);
1244 inline const ListLong* Tuple::get_plist_long(
const Symbol& att)
const
1246 if (Value* value = get_value(att, T_LIST_LONG))
1248 return (
const ListLong*)value->get_pvalue();
1256 inline Float& Tuple::set_float(
const Symbol& att, Float v)
1258 PValue value = set_value(att, T_FLOAT, &v,
false);
1259 return *(Float*)value->get_pvalue();
1261 inline Float& Tuple::set_ref_float(
const Symbol& att, Float& v)
1263 set_value(att, T_FLOAT, &v,
true);
1266 inline const Float& Tuple::set_cref_float(
const Symbol& att,
const Float& v)
1268 set_value(att, T_FLOAT, &v,
true,
true);
1271 inline Float& Tuple::set_float(
const Symbol& att)
1274 PValue value = set_value(att, T_FLOAT, &v,
false);
1275 return *(Float*)value->get_pvalue();
1277 inline ListFloat& Tuple::set_list_float(
const Symbol& att,
const ListFloat& v)
1279 PValue value = set_value(att, T_LIST_FLOAT, (
void*)&v,
false);
1280 return *(ListFloat*)value->get_pvalue();
1282 inline ListFloat& Tuple::set_ref_list_float(
const Symbol& att, ListFloat& v)
1284 set_value(att, T_LIST_FLOAT, (
void*)&v,
true);
1287 inline const ListFloat& Tuple::set_cref_list_float(
const Symbol& att,
const ListFloat& v)
1289 set_value(att, T_LIST_FLOAT, (
void*)&v,
true,
true);
1292 inline ListFloat& Tuple::set_list_float(
const Symbol& att)
1294 PValue value = set_value(att, T_LIST_FLOAT, (
void*)0,
false);
1295 return *(ListFloat*)value->get_pvalue();
1297 inline void Tuple::add_float(
const Symbol& att, Float v)
1299 ((ListFloat*)set_value(att, T_LIST_FLOAT, (
void*)0,
false)->get_pvalue())->add(v);
1301 inline Float Tuple::get_float(
const Symbol& att, Float v)
const
1303 if (Value* value = get_value(att, T_FLOAT))
1305 return *(Float*)value->get_pvalue();
1312 inline const Float* Tuple::get_pfloat(
const Symbol& att)
const
1314 if (Value* value = get_value(att, T_FLOAT))
1316 return (
const Float*)value->get_pvalue();
1323 inline const ListFloat& Tuple::get_list_float(
const Symbol& att)
const
1325 return *(
const ListFloat*)get_pvalue(att, T_LIST_FLOAT,
false);
1327 inline const ListFloat* Tuple::get_plist_float(
const Symbol& att)
const
1329 if (Value* value = get_value(att, T_LIST_FLOAT))
1331 return (
const ListFloat*)value->get_pvalue();
1339 inline Double& Tuple::set_double(
const Symbol& att, Double v)
1341 PValue value = set_value(att, T_DOUBLE, &v,
false);
1342 return *(Double*)value->get_pvalue();
1344 inline Double& Tuple::set_ref_double(
const Symbol& att, Double& v)
1346 set_value(att, T_DOUBLE, &v,
true);
1349 inline const Double& Tuple::set_cref_double(
const Symbol& att,
const Double& v)
1351 set_value(att, T_DOUBLE, &v,
true,
true);
1354 inline Double& Tuple::set_double(
const Symbol& att)
1357 PValue value = set_value(att, T_DOUBLE, &v,
false);
1358 return *(Double*)value->get_pvalue();
1360 inline ListDouble& Tuple::set_list_double(
const Symbol& att,
const ListDouble& v)
1362 PValue value = set_value(att, T_LIST_DOUBLE, (
void*)&v,
false);
1363 return *(ListDouble*)value->get_pvalue();
1365 inline ListDouble& Tuple::set_ref_list_double(
const Symbol& att, ListDouble& v)
1367 set_value(att, T_LIST_DOUBLE, (
void*)&v,
true);
1370 inline const ListDouble& Tuple::set_cref_list_double(
const Symbol& att,
const ListDouble& v)
1372 set_value(att, T_LIST_DOUBLE, (
void*)&v,
true,
true);
1375 inline ListDouble& Tuple::set_list_double(
const Symbol& att)
1377 PValue value = set_value(att, T_LIST_DOUBLE, (
void*)0,
false);
1378 return *(ListDouble*)value->get_pvalue();
1380 inline void Tuple::add_double(
const Symbol& att, Double v)
1382 ((ListDouble*)set_value(att, T_LIST_DOUBLE, (
void*)0,
false)->get_pvalue())->add(v);
1384 inline Double Tuple::get_double(
const Symbol& att, Double v)
const
1386 if (Value* value = get_value(att, T_DOUBLE))
1388 return *(Double*)value->get_pvalue();
1395 inline const Double* Tuple::get_pdouble(
const Symbol& att)
const
1397 if (Value* value = get_value(att, T_DOUBLE))
1399 return (
const Double*)value->get_pvalue();
1406 inline const ListDouble& Tuple::get_list_double(
const Symbol& att)
const
1408 return *(
const ListDouble*)get_pvalue(att, T_LIST_DOUBLE,
false);
1410 inline const ListDouble* Tuple::get_plist_double(
const Symbol& att)
const
1412 if (Value* value = get_value(att, T_LIST_DOUBLE))
1414 return (
const ListDouble*)value->get_pvalue();
1422 inline TimeDate& Tuple::set_time_date(
const Symbol& att, TimeDate v)
1424 PValue value = set_value(att, T_TIME_DATE, &v,
false);
1425 return *(TimeDate*)value->get_pvalue();
1427 inline TimeDate& Tuple::set_ref_time_date(
const Symbol& att, TimeDate& v)
1429 set_value(att, T_TIME_DATE, &v,
true);
1432 inline const TimeDate& Tuple::set_cref_time_date(
const Symbol& att,
const TimeDate& v)
1434 set_value(att, T_TIME_DATE, &v,
true,
true);
1437 inline TimeDate& Tuple::set_time_date(
const Symbol& att)
1440 PValue value = set_value(att, T_TIME_DATE, &v,
false);
1441 return *(TimeDate*)value->get_pvalue();
1443 inline ListTimeDate& Tuple::set_list_time_date(
const Symbol& att,
const ListTimeDate& v)
1445 PValue value = set_value(att, T_LIST_TIME_DATE, (
void*)&v,
false);
1446 return *(ListTimeDate*)value->get_pvalue();
1448 inline ListTimeDate& Tuple::set_ref_list_time_date(
const Symbol& att, ListTimeDate& v)
1450 set_value(att, T_LIST_TIME_DATE, (
void*)&v,
true);
1453 inline const ListTimeDate& Tuple::set_cref_list_time_date(
const Symbol& att,
const ListTimeDate& v)
1455 set_value(att, T_LIST_TIME_DATE, (
void*)&v,
true,
true);
1458 inline ListTimeDate& Tuple::set_list_time_date(
const Symbol& att)
1460 PValue value = set_value(att, T_LIST_TIME_DATE, (
void*)0,
false);
1461 return *(ListTimeDate*)value->get_pvalue();
1463 inline void Tuple::add_time_date(
const Symbol& att, TimeDate v)
1465 ((ListTimeDate*)set_value(att, T_LIST_TIME_DATE, (
void*)0,
false)->get_pvalue())->add(v);
1467 inline TimeDate Tuple::get_time_date(
const Symbol& att, TimeDate v)
const
1469 if (Value* value = get_value(att, T_TIME_DATE))
1471 return *(TimeDate*)value->get_pvalue();
1478 inline const TimeDate* Tuple::get_ptime_date(
const Symbol& att)
const
1480 if (Value* value = get_value(att, T_TIME_DATE))
1482 return (
const TimeDate*)value->get_pvalue();
1489 inline const ListTimeDate& Tuple::get_list_time_date(
const Symbol& att)
const
1491 return *(
const ListTimeDate*)get_pvalue(att, T_LIST_TIME_DATE,
false);
1493 inline const ListTimeDate* Tuple::get_plist_time_date(
const Symbol& att)
const
1495 if (Value* value = get_value(att, T_LIST_TIME_DATE))
1497 return (
const ListTimeDate*)value->get_pvalue();
1505 inline TimePeriod& Tuple::set_time_period(
const Symbol& att, TimePeriod v)
1507 PValue value = set_value(att, T_TIME_PERIOD, &v,
false);
1508 return *(TimePeriod*)value->get_pvalue();
1510 inline TimePeriod& Tuple::set_ref_time_period(
const Symbol& att, TimePeriod& v)
1512 set_value(att, T_TIME_PERIOD, &v,
true);
1515 inline const TimePeriod& Tuple::set_cref_time_period(
const Symbol& att,
const TimePeriod& v)
1517 set_value(att, T_TIME_PERIOD, &v,
true,
true);
1520 inline TimePeriod& Tuple::set_time_period(
const Symbol& att)
1523 PValue value = set_value(att, T_TIME_PERIOD, &v,
false);
1524 return *(TimePeriod*)value->get_pvalue();
1526 inline ListTimePeriod& Tuple::set_list_time_period(
const Symbol& att,
const ListTimePeriod& v)
1528 PValue value = set_value(att, T_LIST_TIME_PERIOD, (
void*)&v,
false);
1529 return *(ListTimePeriod*)value->get_pvalue();
1531 inline ListTimePeriod& Tuple::set_ref_list_time_period(
const Symbol& att, ListTimePeriod& v)
1533 set_value(att, T_LIST_TIME_PERIOD, (
void*)&v,
true);
1536 inline const ListTimePeriod& Tuple::set_cref_list_time_period(
const Symbol& att,
const ListTimePeriod& v)
1538 set_value(att, T_LIST_TIME_PERIOD, (
void*)&v,
true,
true);
1541 inline ListTimePeriod& Tuple::set_list_time_period(
const Symbol& att)
1543 PValue value = set_value(att, T_LIST_TIME_PERIOD, (
void*)0,
false);
1544 return *(ListTimePeriod*)value->get_pvalue();
1546 inline void Tuple::add_time_period(
const Symbol& att, TimePeriod v)
1548 ((ListTimePeriod*)set_value(att, T_LIST_TIME_PERIOD, (
void*)0,
false)->get_pvalue())->add(v);
1550 inline TimePeriod Tuple::get_time_period(
const Symbol& att, TimePeriod v)
const
1552 if (Value* value = get_value(att, T_TIME_PERIOD))
1554 return *(TimePeriod*)value->get_pvalue();
1561 inline const TimePeriod* Tuple::get_ptime_period(
const Symbol& att)
const
1563 if (Value* value = get_value(att, T_TIME_PERIOD))
1565 return (
const TimePeriod*)value->get_pvalue();
1572 inline const ListTimePeriod& Tuple::get_list_time_period(
const Symbol& att)
const
1574 return *(
const ListTimePeriod*)get_pvalue(att, T_LIST_TIME_PERIOD,
false);
1576 inline const ListTimePeriod* Tuple::get_plist_time_period(
const Symbol& att)
const
1578 if (Value* value = get_value(att, T_LIST_TIME_PERIOD))
1580 return (
const ListTimePeriod*)value->get_pvalue();
1590 PValue value = set_value(att, T_ASTRING, (
void*)&v,
false);
1591 return *(AString*)value->get_pvalue();
1593 inline AString& Tuple::set_ref_astring(
const Symbol& att, AString& v)
1595 set_value(att, T_ASTRING, (
void*)&v,
true);
1598 inline const AString& Tuple::set_cref_astring(
const Symbol& att,
const AString& v)
1600 set_value(att, T_ASTRING, (
const void*)&v,
true,
true);
1605 PValue value = set_value(att, T_ASTRING, 0,
false);
1606 return *(AString*)value->get_pvalue();
1608 inline ListAString& Tuple::set_list_astring(
const Symbol& att,
const ListAString& v)
1610 PValue value = set_value(att, T_LIST_ASTRING, (
void*)&v,
false);
1611 return *(ListAString*)value->get_pvalue();
1613 inline ListAString& Tuple::set_list_astring(
const Symbol& att)
1615 PValue value = set_value(att, T_LIST_ASTRING, (
void*)0,
false);
1616 return *(ListAString*)value->get_pvalue();
1618 inline ListAString& Tuple::set_ref_list_astring(
const Symbol& att, ListAString& v)
1620 set_value(att, T_LIST_ASTRING, (
void*)&v,
true);
1623 inline const ListAString& Tuple::set_cref_list_astring(
const Symbol& att,
const ListAString& v)
1625 set_value(att, T_LIST_ASTRING, (
const void*)&v,
true,
true);
1630 return ((ListAString*)set_value(att, T_LIST_ASTRING, (
void*)0,
false)->get_pvalue())->add(v);
1632 inline const AString& Tuple::get_astring(
const Symbol& att)
const
1634 return *(
const AString*)get_pvalue(att, T_ASTRING,
false);
1636 inline const AString* Tuple::get_pastring(
const Symbol& att)
const
1638 if (Value* value = get_value(att, T_ASTRING))
1640 return (
const AString*)value->get_pvalue();
1647 inline const ListAString& Tuple::get_list_astring(
const Symbol& att)
const
1649 return *(
const ListAString*)get_pvalue(att, T_LIST_ASTRING,
false);
1651 inline const ListAString* Tuple::get_plist_astring(
const Symbol& att)
const
1653 if (Value* value = get_value(att, T_LIST_ASTRING))
1655 return (
const ListAString*)value->get_pvalue();
1665 PValue value = set_value(att, T_STRING, (
void*)&v,
false);
1666 return *(String*)value->get_pvalue();
1668 inline String& Tuple::set_ref_string(
const Symbol& att, String& v)
1670 set_value(att, T_STRING, (
void*)&v,
true);
1673 inline const String& Tuple::set_cref_string(
const Symbol& att,
const String& v)
1675 set_value(att, T_STRING, (
const void*)&v,
true,
true);
1680 PValue value = set_value(att, T_STRING, 0,
false);
1681 return *(String*)value->get_pvalue();
1683 inline ListString& Tuple::set_list_string(
const Symbol& att,
const ListString& v)
1685 PValue value = set_value(att, T_LIST_STRING, (
void*)&v,
false);
1686 return *(ListString*)value->get_pvalue();
1688 inline ListString& Tuple::set_list_string(
const Symbol& att)
1690 PValue value = set_value(att, T_LIST_STRING, (
void*)0,
false);
1691 return *(ListString*)value->get_pvalue();
1693 inline ListString& Tuple::set_ref_list_string(
const Symbol& att, ListString& v)
1695 set_value(att, T_LIST_STRING, (
void*)&v,
true);
1698 inline const ListString& Tuple::set_cref_list_string(
const Symbol& att,
const ListString& v)
1700 set_value(att, T_LIST_STRING, (
const void*)&v,
true,
true);
1705 return ((ListString*)set_value(att, T_LIST_STRING, (
void*)0,
false)->get_pvalue())->add(v);
1707 inline const String& Tuple::get_string(
const Symbol& att)
const
1709 return *(
const String*)get_pvalue(att, T_STRING,
false);
1711 inline const String* Tuple::get_pstring(
const Symbol& att)
const
1713 if (Value* value = get_value(att, T_STRING))
1715 return (
const String*)value->get_pvalue();
1722 inline const ListString& Tuple::get_list_string(
const Symbol& att)
const
1724 return *(
const ListString*)get_pvalue(att, T_LIST_STRING,
false);
1726 inline const ListString* Tuple::get_plist_string(
const Symbol& att)
const
1728 if (Value* value = get_value(att, T_LIST_STRING))
1730 return (
const ListString*)value->get_pvalue();
1738 inline Tuple& Tuple::set_tuple(
const Symbol& att,
const Tuple& v)
1740 PValue value = set_value(att, T_TUPLE, (
void*)&v,
false);
1741 return *(Tuple*)value->get_pvalue();
1743 inline Tuple& Tuple::set_ref_tuple(
const Symbol& att, Tuple& v)
1745 set_value(att, T_TUPLE, (
void*)&v,
true);
1748 inline const Tuple& Tuple::set_cref_tuple(
const Symbol& att,
const Tuple& v)
1750 set_value(att, T_TUPLE, (
const void*)&v,
true,
true);
1753 inline Tuple& Tuple::set_tuple(
const Symbol& att)
1755 PValue value = set_value(att, T_TUPLE, 0,
false);
1756 return *(Tuple*)value->get_pvalue();
1758 inline ListTuple& Tuple::set_list_tuple(
const Symbol& att,
const ListTuple& v)
1760 PValue value = set_value(att, T_LIST_TUPLE, (
void*)&v,
false);
1761 return *(ListTuple*)value->get_pvalue();
1763 inline ListTuple& Tuple::set_list_tuple(
const Symbol& att)
1765 PValue value = set_value(att, T_LIST_TUPLE, (
void*)0,
false);
1766 return *(ListTuple*)value->get_pvalue();
1768 inline ListTuple& Tuple::set_ref_list_tuple(
const Symbol& att, ListTuple& v)
1770 set_value(att, T_LIST_TUPLE, (
void*)&v,
true);
1773 inline const ListTuple& Tuple::set_cref_list_tuple(
const Symbol& att,
const ListTuple& v)
1775 set_value(att, T_LIST_TUPLE, (
const void*)&v,
true,
true);
1778 inline Tuple& Tuple::add_tuple(
const Symbol& att,
const Tuple& v)
1780 return ((ListTuple*)set_value(att, T_LIST_TUPLE, (
void*)0,
false)->get_pvalue())->add(v);
1782 inline const Tuple& Tuple::get_tuple(
const Symbol& att)
const
1784 return *(
const Tuple*)get_pvalue(att, T_TUPLE,
false);
1786 inline const Tuple* Tuple::get_ptuple(
const Symbol& att)
const
1788 if (Value* value = get_value(att, T_TUPLE))
1790 return (
const Tuple*)value->get_pvalue();
1797 inline const ListTuple& Tuple::get_list_tuple(
const Symbol& att)
const
1799 return *(
const ListTuple*)get_pvalue(att, T_LIST_TUPLE,
false);
1801 inline const ListTuple* Tuple::get_plist_tuple(
const Symbol& att)
const
1803 if (Value* value = get_value(att, T_LIST_TUPLE))
1805 return (
const ListTuple*)value->get_pvalue();
1813 inline Blob& Tuple::set_blob(
const Symbol& att,
const Blob& v)
1815 PValue value = set_value(att, T_BLOB, (
void*)&v,
false);
1816 return *(Blob*)value->get_pvalue();
1818 inline Blob& Tuple::set_ref_blob(
const Symbol& att, Blob& v)
1820 set_value(att, T_BLOB, (
void*)&v,
true);
1823 inline const Blob& Tuple::set_cref_blob(
const Symbol& att,
const Blob& v)
1825 set_value(att, T_BLOB, (
const void*)&v,
true,
true);
1828 inline Blob& Tuple::set_blob(
const Symbol& att)
1830 PValue value = set_value(att, T_BLOB, 0,
false);
1831 return *(Blob*)value->get_pvalue();
1833 inline ListBlob& Tuple::set_list_blob(
const Symbol& att,
const ListBlob& v)
1835 PValue value = set_value(att, T_LIST_BLOB, (
void*)&v,
false);
1836 return *(ListBlob*)value->get_pvalue();
1838 inline ListBlob& Tuple::set_list_blob(
const Symbol& att)
1840 PValue value = set_value(att, T_LIST_BLOB, (
void*)0,
false);
1841 return *(ListBlob*)value->get_pvalue();
1843 inline ListBlob& Tuple::set_ref_list_blob(
const Symbol& att, ListBlob& v)
1845 set_value(att, T_LIST_BLOB, (
void*)&v,
true);
1848 inline const ListBlob& Tuple::set_cref_list_blob(
const Symbol& att,
const ListBlob& v)
1850 set_value(att, T_LIST_BLOB, (
const void*)&v,
true,
true);
1853 inline Blob& Tuple::add_blob(
const Symbol& att,
const Blob& v)
1855 return ((ListBlob*)set_value(att, T_LIST_BLOB, (
void*)0,
false)->get_pvalue())->add(v);
1857 inline const Blob& Tuple::get_blob(
const Symbol& att)
const
1859 return *(
const Blob*)get_pvalue(att, T_BLOB,
false);
1861 inline const Blob* Tuple::get_pblob(
const Symbol& att)
const
1863 if (Value* value = get_value(att, T_BLOB))
1865 return (
const Blob*)value->get_pvalue();
1872 inline const ListBlob& Tuple::get_list_blob(
const Symbol& att)
const
1874 return *(
const ListBlob*)get_pvalue(att, T_LIST_BLOB,
false);
1876 inline const ListBlob* Tuple::get_plist_blob(
const Symbol& att)
const
1878 if (Value* value = get_value(att, T_LIST_BLOB))
1880 return (
const ListBlob*)value->get_pvalue();
1890 PValue value = set_value(att, T_STRING_BUFFER, (
void*)&v,
false);
1891 return *(StringBuffer*)value->get_pvalue();
1893 inline StringBuffer& Tuple::set_ref_stringbuffer(
const Symbol& att, StringBuffer& v)
1895 set_value(att, T_STRING_BUFFER, (
void*)&v,
true);
1898 inline const StringBuffer& Tuple::set_cref_stringbuffer(
const Symbol& att,
const StringBuffer& v)
1900 set_value(att, T_STRING_BUFFER, (
const void*)&v,
true,
true);
1905 PValue value = set_value(att, T_STRING_BUFFER, 0,
false);
1906 return *(StringBuffer*)value->get_pvalue();
1908 inline ListStringBuffer& Tuple::set_list_stringbuffer(
const Symbol& att,
const ListStringBuffer& v)
1910 PValue value = set_value(att, T_LIST_STRING_BUFFER, (
void*)&v,
false);
1911 return *(ListStringBuffer*)value->get_pvalue();
1913 inline ListStringBuffer& Tuple::set_list_stringbuffer(
const Symbol& att)
1915 PValue value = set_value(att, T_LIST_STRING_BUFFER, (
void*)0,
false);
1916 return *(ListStringBuffer*)value->get_pvalue();
1918 inline ListStringBuffer& Tuple::set_ref_list_stringbuffer(
const Symbol& att, ListStringBuffer& v)
1920 set_value(att, T_LIST_STRING_BUFFER, (
void*)&v,
true);
1923 inline const ListStringBuffer& Tuple::set_cref_list_stringbuffer(
const Symbol& att,
const ListStringBuffer& v)
1925 set_value(att, T_LIST_STRING_BUFFER, (
const void*)&v,
true,
true);
1930 return ((ListStringBuffer*)set_value(att, T_LIST_STRING_BUFFER, (
void*)0,
false)->get_pvalue())->add(v);
1932 inline const StringBuffer& Tuple::get_stringbuffer(
const Symbol& att)
const
1934 return *(
const StringBuffer*)get_pvalue(att, T_STRING_BUFFER,
false);
1936 inline const StringBuffer* Tuple::get_pstringbuffer(
const Symbol& att)
const
1938 if (Value* value = get_value(att, T_STRING_BUFFER))
1940 return (
const StringBuffer*)value->get_pvalue();
1947 inline const ListStringBuffer& Tuple::get_list_stringbuffer(
const Symbol& att)
const
1949 return *(
const ListStringBuffer*)get_pvalue(att, T_LIST_STRING_BUFFER,
false);
1951 inline const ListStringBuffer* Tuple::get_plist_stringbuffer(
const Symbol& att)
const
1953 if (Value* value = get_value(att, T_LIST_STRING_BUFFER))
1955 return (
const ListStringBuffer*)value->get_pvalue();
1963 inline Symbol& Tuple::set_symbol(
const Symbol& att,
const Symbol& v)
1965 PValue value = set_value(att, T_SYMBOL, (
void*)&v,
false);
1966 return *(Symbol*)value->get_pvalue();
1968 inline Symbol& Tuple::set_ref_symbol(
const Symbol& att, Symbol& v)
1970 set_value(att, T_SYMBOL, (
void*)&v,
true);
1973 inline const Symbol& Tuple::set_cref_symbol(
const Symbol& att,
const Symbol& v)
1975 set_value(att, T_SYMBOL, (
const void*)&v,
true,
true);
1978 inline Symbol& Tuple::set_symbol(
const Symbol& att)
1980 PValue value = set_value(att, T_SYMBOL, 0,
false);
1981 return *(Symbol*)value->get_pvalue();
1983 inline ListSymbol& Tuple::set_list_symbol(
const Symbol& att,
const ListSymbol& v)
1985 PValue value = set_value(att, T_LIST_SYMBOL, (
void*)&v,
false);
1986 return *(ListSymbol*)value->get_pvalue();
1988 inline ListSymbol& Tuple::set_list_symbol(
const Symbol& att)
1990 PValue value = set_value(att, T_LIST_SYMBOL, (
void*)0,
false);
1991 return *(ListSymbol*)value->get_pvalue();
1993 inline ListSymbol& Tuple::set_ref_list_symbol(
const Symbol& att, ListSymbol& v)
1995 set_value(att, T_LIST_SYMBOL, (
void*)&v,
true);
1998 inline const ListSymbol& Tuple::set_cref_list_symbol(
const Symbol& att,
const ListSymbol& v)
2000 set_value(att, T_LIST_SYMBOL, (
const void*)&v,
true,
true);
2003 inline Symbol& Tuple::add_symbol(
const Symbol& att,
const Symbol& v)
2005 return ((ListSymbol*)set_value(att, T_LIST_SYMBOL, (
void*)0,
false)->get_pvalue())->add(v);
2009 return *(
const Symbol*)get_pvalue(att, T_SYMBOL,
false);
2011 inline const Symbol* Tuple::get_psymbol(
const Symbol& att)
const
2013 if (Value* value = get_value(att, T_SYMBOL))
2015 return (
const Symbol*)value->get_pvalue();
2022 inline const ListSymbol& Tuple::get_list_symbol(
const Symbol& att)
const
2024 return *(
const ListSymbol*)get_pvalue(att, T_LIST_SYMBOL,
false);
2026 inline const ListSymbol* Tuple::get_plist_symbol(
const Symbol& att)
const
2028 if (Value* value = get_value(att, T_LIST_SYMBOL))
2030 return (
const ListSymbol*)value->get_pvalue();
2038 inline ArrayInt& Tuple::set_array_int(
const Symbol& att,
const ArrayInt& v)
2040 PValue value = set_value(att, T_ARRAY_INT, (
void*)&v,
false);
2041 return *(ArrayInt*)value->get_pvalue();
2043 inline ArrayInt& Tuple::set_ref_array_int(
const Symbol& att, ArrayInt& v)
2045 set_value(att, T_ARRAY_INT, (
void*)&v,
true);
2048 inline const ArrayInt& Tuple::set_cref_array_int(
const Symbol& att,
const ArrayInt& v)
2050 set_value(att, T_ARRAY_INT, (
const void*)&v,
true,
true);
2053 inline ArrayInt& Tuple::set_array_int(
const Symbol& att)
2055 PValue value = set_value(att, T_ARRAY_INT, 0,
false);
2056 return *(ArrayInt*)value->get_pvalue();
2058 inline ListArrayInt& Tuple::set_list_array_int(
const Symbol& att,
const ListArrayInt& v)
2060 PValue value = set_value(att, T_LIST_ARRAY_INT, (
void*)&v,
false);
2061 return *(ListArrayInt*)value->get_pvalue();
2063 inline ListArrayInt& Tuple::set_list_array_int(
const Symbol& att)
2065 PValue value = set_value(att, T_LIST_ARRAY_INT, (
void*)0,
false);
2066 return *(ListArrayInt*)value->get_pvalue();
2068 inline ListArrayInt& Tuple::set_ref_list_array_int(
const Symbol& att, ListArrayInt& v)
2070 set_value(att, T_LIST_ARRAY_INT, (
void*)&v,
true);
2073 inline const ListArrayInt& Tuple::set_cref_list_array_int(
const Symbol& att,
const ListArrayInt& v)
2075 set_value(att, T_LIST_ARRAY_INT, (
const void*)&v,
true,
true);
2078 inline ArrayInt& Tuple::add_array_int(
const Symbol& att,
const ArrayInt& v)
2080 return ((ListArrayInt*)set_value(att, T_LIST_ARRAY_INT, (
void*)0,
false)->get_pvalue())->add(v);
2082 inline const ArrayInt& Tuple::get_array_int(
const Symbol& att)
const
2084 return *(
const ArrayInt*)get_pvalue(att, T_ARRAY_INT,
false);
2086 inline const ArrayInt* Tuple::get_parray_int(
const Symbol& att)
const
2088 if (Value* value = get_value(att, T_ARRAY_INT))
2090 return (
const ArrayInt*)value->get_pvalue();
2097 inline const ListArrayInt& Tuple::get_list_array_int(
const Symbol& att)
const
2099 return *(
const ListArrayInt*)get_pvalue(att, T_LIST_ARRAY_INT,
false);
2101 inline const ListArrayInt* Tuple::get_plist_array_int(
const Symbol& att)
const
2103 if (Value* value = get_value(att, T_LIST_ARRAY_INT))
2105 return (
const ListArrayInt*)value->get_pvalue();
2113 inline ArrayLong& Tuple::set_array_long(
const Symbol& att,
const ArrayLong& v)
2115 PValue value = set_value(att, T_ARRAY_LONG, (
void*)&v,
false);
2116 return *(ArrayLong*)value->get_pvalue();
2118 inline ArrayLong& Tuple::set_ref_array_long(
const Symbol& att, ArrayLong& v)
2120 set_value(att, T_ARRAY_LONG, (
void*)&v,
true);
2123 inline const ArrayLong& Tuple::set_cref_array_long(
const Symbol& att,
const ArrayLong& v)
2125 set_value(att, T_ARRAY_LONG, (
const void*)&v,
true,
true);
2128 inline ArrayLong& Tuple::set_array_long(
const Symbol& att)
2130 PValue value = set_value(att, T_ARRAY_LONG, 0,
false);
2131 return *(ArrayLong*)value->get_pvalue();
2133 inline ListArrayLong& Tuple::set_list_array_long(
const Symbol& att,
const ListArrayLong& v)
2135 PValue value = set_value(att, T_LIST_ARRAY_LONG, (
void*)&v,
false);
2136 return *(ListArrayLong*)value->get_pvalue();
2138 inline ListArrayLong& Tuple::set_list_array_long(
const Symbol& att)
2140 PValue value = set_value(att, T_LIST_ARRAY_LONG, (
void*)0,
false);
2141 return *(ListArrayLong*)value->get_pvalue();
2143 inline ListArrayLong& Tuple::set_ref_list_array_long(
const Symbol& att, ListArrayLong& v)
2145 set_value(att, T_LIST_ARRAY_LONG, (
void*)&v,
true);
2148 inline const ListArrayLong& Tuple::set_cref_list_array_long(
const Symbol& att,
const ListArrayLong& v)
2150 set_value(att, T_LIST_ARRAY_LONG, (
const void*)&v,
true,
true);
2153 inline ArrayLong& Tuple::add_array_long(
const Symbol& att,
const ArrayLong& v)
2155 return ((ListArrayLong*)set_value(att, T_LIST_ARRAY_LONG, (
void*)0,
false)->get_pvalue())->add(v);
2157 inline const ArrayLong& Tuple::get_array_long(
const Symbol& att)
const
2159 return *(
const ArrayLong*)get_pvalue(att, T_ARRAY_LONG,
false);
2161 inline const ArrayLong* Tuple::get_parray_long(
const Symbol& att)
const
2163 if (Value* value = get_value(att, T_ARRAY_LONG))
2165 return (
const ArrayLong*)value->get_pvalue();
2172 inline const ListArrayLong& Tuple::get_list_array_long(
const Symbol& att)
const
2174 return *(
const ListArrayLong*)get_pvalue(att, T_LIST_ARRAY_LONG,
false);
2176 inline const ListArrayLong* Tuple::get_plist_array_long(
const Symbol& att)
const
2178 if (Value* value = get_value(att, T_LIST_ARRAY_LONG))
2180 return (
const ListArrayLong*)value->get_pvalue();
2188 inline ArrayFloat& Tuple::set_array_float(
const Symbol& att,
const ArrayFloat& v)
2190 PValue value = set_value(att, T_ARRAY_FLOAT, (
void*)&v,
false);
2191 return *(ArrayFloat*)value->get_pvalue();
2193 inline ArrayFloat& Tuple::set_ref_array_float(
const Symbol& att, ArrayFloat& v)
2195 set_value(att, T_ARRAY_FLOAT, (
void*)&v,
true);
2198 inline const ArrayFloat& Tuple::set_cref_array_float(
const Symbol& att,
const ArrayFloat& v)
2200 set_value(att, T_ARRAY_FLOAT, (
const void*)&v,
true,
true);
2203 inline ArrayFloat& Tuple::set_array_float(
const Symbol& att)
2205 PValue value = set_value(att, T_ARRAY_FLOAT, 0,
false);
2206 return *(ArrayFloat*)value->get_pvalue();
2208 inline ListArrayFloat& Tuple::set_list_array_float(
const Symbol& att,
const ListArrayFloat& v)
2210 PValue value = set_value(att, T_LIST_ARRAY_FLOAT, (
void*)&v,
false);
2211 return *(ListArrayFloat*)value->get_pvalue();
2213 inline ListArrayFloat& Tuple::set_list_array_float(
const Symbol& att)
2215 PValue value = set_value(att, T_LIST_ARRAY_FLOAT, (
void*)0,
false);
2216 return *(ListArrayFloat*)value->get_pvalue();
2218 inline ListArrayFloat& Tuple::set_ref_list_array_float(
const Symbol& att, ListArrayFloat& v)
2220 set_value(att, T_LIST_ARRAY_FLOAT, (
void*)&v,
true);
2223 inline const ListArrayFloat& Tuple::set_cref_list_array_float(
const Symbol& att,
const ListArrayFloat& v)
2225 set_value(att, T_LIST_ARRAY_FLOAT, (
const void*)&v,
true,
true);
2228 inline ArrayFloat& Tuple::add_array_float(
const Symbol& att,
const ArrayFloat& v)
2230 return ((ListArrayFloat*)set_value(att, T_LIST_ARRAY_FLOAT, (
void*)0,
false)->get_pvalue())->add(v);
2232 inline const ArrayFloat& Tuple::get_array_float(
const Symbol& att)
const
2234 return *(
const ArrayFloat*)get_pvalue(att, T_ARRAY_FLOAT,
false);
2236 inline const ArrayFloat* Tuple::get_parray_float(
const Symbol& att)
const
2238 if (Value* value = get_value(att, T_ARRAY_FLOAT))
2240 return (
const ArrayFloat*)value->get_pvalue();
2247 inline const ListArrayFloat& Tuple::get_list_array_float(
const Symbol& att)
const
2249 return *(
const ListArrayFloat*)get_pvalue(att, T_LIST_ARRAY_FLOAT,
false);
2251 inline const ListArrayFloat* Tuple::get_plist_array_float(
const Symbol& att)
const
2253 if (Value* value = get_value(att, T_LIST_ARRAY_FLOAT))
2255 return (
const ListArrayFloat*)value->get_pvalue();
2263 inline ArrayDouble& Tuple::set_array_double(
const Symbol& att,
const ArrayDouble& v)
2265 PValue value = set_value(att, T_ARRAY_DOUBLE, (
void*)&v,
false);
2266 return *(ArrayDouble*)value->get_pvalue();
2268 inline ArrayDouble& Tuple::set_ref_array_double(
const Symbol& att, ArrayDouble& v)
2270 set_value(att, T_ARRAY_DOUBLE, (
void*)&v,
true);
2273 inline const ArrayDouble& Tuple::set_cref_array_double(
const Symbol& att,
const ArrayDouble& v)
2275 set_value(att, T_ARRAY_DOUBLE, (
const void*)&v,
true,
true);
2278 inline ArrayDouble& Tuple::set_array_double(
const Symbol& att)
2280 PValue value = set_value(att, T_ARRAY_DOUBLE, 0,
false);
2281 return *(ArrayDouble*)value->get_pvalue();
2283 inline ListArrayDouble& Tuple::set_list_array_double(
const Symbol& att,
const ListArrayDouble& v)
2285 PValue value = set_value(att, T_LIST_ARRAY_DOUBLE, (
void*)&v,
false);
2286 return *(ListArrayDouble*)value->get_pvalue();
2288 inline ListArrayDouble& Tuple::set_list_array_double(
const Symbol& att)
2290 PValue value = set_value(att, T_LIST_ARRAY_DOUBLE, (
void*)0,
false);
2291 return *(ListArrayDouble*)value->get_pvalue();
2293 inline ListArrayDouble& Tuple::set_ref_list_array_double(
const Symbol& att, ListArrayDouble& v)
2295 set_value(att, T_LIST_ARRAY_DOUBLE, (
void*)&v,
true);
2298 inline const ListArrayDouble& Tuple::set_cref_list_array_double(
const Symbol& att,
const ListArrayDouble& v)
2300 set_value(att, T_LIST_ARRAY_DOUBLE, (
const void*)&v,
true,
true);
2303 inline ArrayDouble& Tuple::add_array_double(
const Symbol& att,
const ArrayDouble& v)
2305 return ((ListArrayDouble*)set_value(att, T_LIST_ARRAY_DOUBLE, (
void*)0,
false)->get_pvalue())->add(v);
2307 inline const ArrayDouble& Tuple::get_array_double(
const Symbol& att)
const
2309 return *(
const ArrayDouble*)get_pvalue(att, T_ARRAY_DOUBLE,
false);
2311 inline const ArrayDouble* Tuple::get_parray_double(
const Symbol& att)
const
2313 if (Value* value = get_value(att, T_ARRAY_DOUBLE))
2315 return (
const ArrayDouble*)value->get_pvalue();
2322 inline const ListArrayDouble& Tuple::get_list_array_double(
const Symbol& att)
const
2324 return *(
const ListArrayDouble*)get_pvalue(att, T_LIST_ARRAY_DOUBLE,
false);
2326 inline const ListArrayDouble* Tuple::get_plist_array_double(
const Symbol& att)
const
2328 if (Value* value = get_value(att, T_LIST_ARRAY_DOUBLE))
2330 return (
const ListArrayDouble*)value->get_pvalue();
2342 PValue value = set_value(att, T_ASTRING, (
void*)0,
false);
2354 PValue value = set_value(att, T_STRING, (
void*)0,
false);
2366 PValue value = set_value(att, T_STRING_BUFFER, (
void*)0,
false);
2377 PValue value = set_value(att, T_LIST_STRING_BUFFER, (
void*)0,
false);
2400 return *l.
insert(l.
end(), v == 0 ? L
"" : v);
const Symbol & get_class_name() const
Definition: Tuple.h:643
String & set_string(const Symbol &att, const Char *v)
Definition: Tuple.h:2352
StringBuffer & set_stringbuffer(const Symbol &att, const AChar *v)
Definition: Tuple.h:2364
ValueIterator & operator++()
Definition: Tuple.h:414
StringBuffer & add_stringbuffer(const Symbol &att, const AChar *v)
Definition: Tuple.h:2375
AString & set_astring(const Symbol &att, const AChar *v)
Definition: Tuple.h:2340
Definition: StringBuffer.h:21
AString & add_astring(const Symbol &att, const AChar *v=0)
Definition: Tuple.h:2390
String & add_string(const Symbol &att, const Char *v=0)
Definition: Tuple.h:2397
iterator insert(iterator pos, const T &value)
Definition: List.h:233
const Symbol & get_symbol(const Symbol &att) const
Definition: Tuple.h:2007
bool is_a(Symbol class_name) const
Definition: Tuple.h:546
T & add()
Definition: List.h:319
Definition: CommBuffer.h:28
const void * get_pvalue() const
long write_xml(OBStream &o, const AChar *att=0) const
ConstValueIterator & operator++()
Definition: Tuple.h:467
ValueIterator operator++(int)
Definition: Tuple.h:419
iterator end()
Definition: List.h:160
Definition: IOBStream.h:166
ConstValueIterator operator++(int)
Definition: Tuple.h:472
Definition: IOBStream.h:29
Types
Definition: Type.h:131