commore  1.0.6-SNAPSHOT
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
commore::Tuple Class Reference

#include <Tuple.h>

+ Inheritance diagram for commore::Tuple:

Classes

class  ConstValueIterator
 
class  Value
 
class  ValueIterator
 

Public Types

typedef Value * PValue
 

Public Member Functions

 Tuple ()
 
 Tuple (const AChar *class_name)
 
 Tuple (const Symbol &class_name)
 
 Tuple (const Tuple &tuple)
 
Tuple & operator= (const Tuple &tuple)
 
 operator bool ()
 
 ~Tuple ()
 
Tuple & assign (const Tuple &tuple)
 
Tuple & merge (const Tuple &tuple)
 
Tuple & merge_only (const Tuple &tuple, const ListSymbol &atts)
 
Tuple & merge_except (const Tuple &tuple, const ListSymbol &atts)
 
Tuple & splice (Tuple &tuple)
 
Tuple & diff (const Tuple &t1, const Tuple &t2)
 
void clear ()
 
bool is_a (Symbol class_name) const
 
AString & set_astring (const Symbol &att, const AChar *v)
 
AString & add_astring (const Symbol &att, const AChar *v=0)
 
String & set_string (const Symbol &att, const Char *v)
 
String & add_string (const Symbol &att, const Char *v=0)
 
StringBuffer & set_stringbuffer (const Symbol &att, const AChar *v)
 
StringBuffer & add_stringbuffer (const Symbol &att, const AChar *v)
 
bool is_set (const Symbol &att) const
 
bool is_set (const Symbol &att, Types type) const
 
bool is_null (const Symbol &att) const
 
void set_null (const Symbol &att)
 
void clear (const Symbol &att)
 
void clear (const ListSymbol &att)
 
void keep (const ListSymbol &att)
 
void clear_list (const Symbol &att)
 
bool is_empty () const
 
AString & to_string (AString &s) const
 
AString & to_string (const AString &s=AString()) const
 
long from_string (const AString &s)
 
const Symbol & get_class_name () const
 
void set_class_name (const Symbol &className)
 
void get_attributes (ListAString &l) const
 
long read (const CommBuffer &buf)
 
long write (CommBuffer &buf) const
 
long read_xml (IBStream &i)
 
long read_xml (XmlParser &i)
 
long write_xml (OBStream &o, const AChar *att=0) const
 
long write_xml (const Path &file_name) const
 
long read_xml (const Path &file_name)
 
long write_xml (StringBuffer &s) const
 
long read_xml (const StringBuffer &s)
 
AString & format (const AChar *format, AString &s) const
 
long format (const AChar *format, OBStream &o) const
 
bool equal (const Tuple &tuple) const
 
int compare (const Tuple &t) const
 
const Symbol & get_symbol (const Symbol &att) const
 
const Symbol * get_psymbol (const Symbol &att) const
 
Symbol & set_symbol (const Symbol &att)
 
Symbol & set_symbol (const Symbol &att, const Symbol &v)
 
Symbol & set_ref_symbol (const Symbol &att, Symbol &v)
 
const Symbol & set_cref_symbol (const Symbol &att, const Symbol &v)
 
const ListSymbol & get_list_symbol (const Symbol &att) const
 
const ListSymbol * get_plist_symbol (const Symbol &att) const
 
ListSymbol & set_list_symbol (const Symbol &att)
 
ListSymbol & set_list_symbol (const Symbol &att, const ListSymbol &v)
 
ListSymbol & set_ref_list_symbol (const Symbol &att, ListSymbol &v)
 
const ListSymbol & set_cref_list_symbol (const Symbol &att, const ListSymbol &v)
 
Symbol & add_symbol (const Symbol &att, const Symbol &v=Symbol())
 
Int get_int (const Symbol &att, Int pv=0) const
 
const Int * get_pint (const Symbol &att) const
 
Int & set_int (const Symbol &att)
 
Int & set_int (const Symbol &att, Int v)
 
Int & set_ref_int (const Symbol &att, Int &v)
 
const Int & set_cref_int (const Symbol &att, const Int &v)
 
const ListInt & get_list_int (const Symbol &att) const
 
const ListInt * get_plist_int (const Symbol &att) const
 
ListInt & set_list_int (const Symbol &att)
 
ListInt & set_list_int (const Symbol &att, const ListInt &v)
 
ListInt & set_ref_list_int (const Symbol &att, ListInt &v)
 
const ListInt & set_cref_list_int (const Symbol &att, const ListInt &v)
 
void add_int (const Symbol &att, Int v)
 
Bool get_bool (const Symbol &att, Bool pv=0) const
 
const Bool * get_pbool (const Symbol &att) const
 
Bool & set_bool (const Symbol &att)
 
Bool & set_bool (const Symbol &att, Bool v)
 
Bool & set_ref_bool (const Symbol &att, Bool &v)
 
const Bool & set_cref_bool (const Symbol &att, const Bool &v)
 
const ListBool & get_list_bool (const Symbol &att) const
 
const ListBool * get_plist_bool (const Symbol &att) const
 
ListBool & set_list_bool (const Symbol &att)
 
ListBool & set_list_bool (const Symbol &att, const ListBool &v)
 
ListBool & set_ref_list_bool (const Symbol &att, ListBool &v)
 
const ListBool & set_cref_list_bool (const Symbol &att, const ListBool &v)
 
void add_bool (const Symbol &att, Bool v)
 
Long get_long (const Symbol &att, Long pv=0) const
 
const Long * get_plong (const Symbol &att) const
 
Long & set_long (const Symbol &att)
 
Long & set_long (const Symbol &att, Long v)
 
Long & set_ref_long (const Symbol &att, Long &v)
 
const Long & set_cref_long (const Symbol &att, const Long &v)
 
const ListLong & get_list_long (const Symbol &att) const
 
const ListLong * get_plist_long (const Symbol &att) const
 
ListLong & set_list_long (const Symbol &att)
 
ListLong & set_list_long (const Symbol &att, const ListLong &v)
 
ListLong & set_ref_list_long (const Symbol &att, ListLong &v)
 
const ListLong & set_cref_list_long (const Symbol &att, const ListLong &v)
 
void add_long (const Symbol &att, Long v)
 
Float get_float (const Symbol &att, Float pv=0) const
 
const Float * get_pfloat (const Symbol &att) const
 
Float & set_float (const Symbol &att)
 
Float & set_float (const Symbol &att, Float v)
 
Float & set_ref_float (const Symbol &att, Float &v)
 
const Float & set_cref_float (const Symbol &att, const Float &v)
 
const ListFloat & get_list_float (const Symbol &att) const
 
const ListFloat * get_plist_float (const Symbol &att) const
 
ListFloat & set_list_float (const Symbol &att)
 
ListFloat & set_list_float (const Symbol &att, const ListFloat &v)
 
ListFloat & set_ref_list_float (const Symbol &att, ListFloat &v)
 
const ListFloat & set_cref_list_float (const Symbol &att, const ListFloat &v)
 
void add_float (const Symbol &att, Float v)
 
Double get_double (const Symbol &att, Double pv=0) const
 
const Double * get_pdouble (const Symbol &att) const
 
Double & set_double (const Symbol &att)
 
Double & set_double (const Symbol &att, Double v)
 
Double & set_ref_double (const Symbol &att, Double &v)
 
const Double & set_cref_double (const Symbol &att, const Double &v)
 
const ListDouble & get_list_double (const Symbol &att) const
 
const ListDouble * get_plist_double (const Symbol &att) const
 
ListDouble & set_list_double (const Symbol &att)
 
ListDouble & set_list_double (const Symbol &att, const ListDouble &v)
 
ListDouble & set_ref_list_double (const Symbol &att, ListDouble &v)
 
const ListDouble & set_cref_list_double (const Symbol &att, const ListDouble &v)
 
void add_double (const Symbol &att, Double v)
 
TimeDate get_time_date (const Symbol &att, TimeDate pv=0) const
 
const TimeDate * get_ptime_date (const Symbol &att) const
 
TimeDate & set_time_date (const Symbol &att)
 
TimeDate & set_time_date (const Symbol &att, TimeDate v)
 
TimeDate & set_ref_time_date (const Symbol &att, TimeDate &v)
 
const TimeDate & set_cref_time_date (const Symbol &att, const TimeDate &v)
 
const ListTimeDate & get_list_time_date (const Symbol &att) const
 
const ListTimeDate * get_plist_time_date (const Symbol &att) const
 
ListTimeDate & set_list_time_date (const Symbol &att)
 
ListTimeDate & set_list_time_date (const Symbol &att, const ListTimeDate &v)
 
ListTimeDate & set_ref_list_time_date (const Symbol &att, ListTimeDate &v)
 
const ListTimeDate & set_cref_list_time_date (const Symbol &att, const ListTimeDate &v)
 
void add_time_date (const Symbol &att, TimeDate v)
 
TimePeriod get_time_period (const Symbol &att, TimePeriod pv=0) const
 
const TimePeriod * get_ptime_period (const Symbol &att) const
 
TimePeriod & set_time_period (const Symbol &att)
 
TimePeriod & set_time_period (const Symbol &att, TimePeriod v)
 
TimePeriod & set_ref_time_period (const Symbol &att, TimePeriod &v)
 
const TimePeriod & set_cref_time_period (const Symbol &att, const TimePeriod &v)
 
const ListTimePeriod & get_list_time_period (const Symbol &att) const
 
const ListTimePeriod * get_plist_time_period (const Symbol &att) const
 
ListTimePeriod & set_list_time_period (const Symbol &att)
 
ListTimePeriod & set_list_time_period (const Symbol &att, const ListTimePeriod &v)
 
ListTimePeriod & set_ref_list_time_period (const Symbol &att, ListTimePeriod &v)
 
const ListTimePeriod & set_cref_list_time_period (const Symbol &att, const ListTimePeriod &v)
 
void add_time_period (const Symbol &att, TimePeriod v)
 
const AString & get_astring (const Symbol &att) const
 
const AString * get_pastring (const Symbol &att) const
 
AString & set_astring (const Symbol &att)
 
AString & set_astring (const Symbol &att, const AString &v)
 
AString & set_ref_astring (const Symbol &att, AString &v)
 
const AString & set_cref_astring (const Symbol &att, const AString &v)
 
const ListAString & get_list_astring (const Symbol &att) const
 
const ListAString * get_plist_astring (const Symbol &att) const
 
ListAString & set_list_astring (const Symbol &att)
 
ListAString & set_list_astring (const Symbol &att, const ListAString &v)
 
ListAString & set_ref_list_astring (const Symbol &att, ListAString &v)
 
const ListAString & set_cref_list_astring (const Symbol &att, const ListAString &v)
 
AString & add_astring (const Symbol &att, const AString &v=AString())
 
const String & get_string (const Symbol &att) const
 
const String * get_pstring (const Symbol &att) const
 
String & set_string (const Symbol &att)
 
String & set_string (const Symbol &att, const String &v)
 
String & set_ref_string (const Symbol &att, String &v)
 
const String & set_cref_string (const Symbol &att, const String &v)
 
const ListString & get_list_string (const Symbol &att) const
 
const ListString * get_plist_string (const Symbol &att) const
 
ListString & set_list_string (const Symbol &att)
 
ListString & set_list_string (const Symbol &att, const ListString &v)
 
ListString & set_ref_list_string (const Symbol &att, ListString &v)
 
const ListString & set_cref_list_string (const Symbol &att, const ListString &v)
 
String & add_string (const Symbol &att, const String &v=String())
 
const StringBuffer & get_stringbuffer (const Symbol &att) const
 
const StringBuffer * get_pstringbuffer (const Symbol &att) const
 
StringBuffer & set_stringbuffer (const Symbol &att)
 
StringBuffer & set_stringbuffer (const Symbol &att, const StringBuffer &v)
 
StringBuffer & set_ref_stringbuffer (const Symbol &att, StringBuffer &v)
 
const StringBuffer & set_cref_stringbuffer (const Symbol &att, const StringBuffer &v)
 
const ListStringBuffer & get_list_stringbuffer (const Symbol &att) const
 
const ListStringBuffer * get_plist_stringbuffer (const Symbol &att) const
 
ListStringBuffer & set_list_stringbuffer (const Symbol &att)
 
ListStringBuffer & set_list_stringbuffer (const Symbol &att, const ListStringBuffer &v)
 
ListStringBuffer & set_ref_list_stringbuffer (const Symbol &att, ListStringBuffer &v)
 
const ListStringBuffer & set_cref_list_stringbuffer (const Symbol &att, const ListStringBuffer &v)
 
StringBuffer & add_stringbuffer (const Symbol &att, const StringBuffer &v=StringBuffer())
 
const Blob & get_blob (const Symbol &att) const
 
const Blob * get_pblob (const Symbol &att) const
 
Blob & set_blob (const Symbol &att)
 
Blob & set_blob (const Symbol &att, const Blob &v)
 
Blob & set_ref_blob (const Symbol &att, Blob &v)
 
const Blob & set_cref_blob (const Symbol &att, const Blob &v)
 
const ListBlob & get_list_blob (const Symbol &att) const
 
const ListBlob * get_plist_blob (const Symbol &att) const
 
ListBlob & set_list_blob (const Symbol &att)
 
ListBlob & set_list_blob (const Symbol &att, const ListBlob &v)
 
ListBlob & set_ref_list_blob (const Symbol &att, ListBlob &v)
 
const ListBlob & set_cref_list_blob (const Symbol &att, const ListBlob &v)
 
Blob & add_blob (const Symbol &att, const Blob &v=Blob())
 
const Tuple & get_tuple (const Symbol &att) const
 
const Tuple * get_ptuple (const Symbol &att) const
 
Tuple & set_tuple (const Symbol &att)
 
Tuple & set_tuple (const Symbol &att, const Tuple &v)
 
Tuple & set_ref_tuple (const Symbol &att, Tuple &v)
 
const Tuple & set_cref_tuple (const Symbol &att, const Tuple &v)
 
const ListTuple & get_list_tuple (const Symbol &att) const
 
const ListTuple * get_plist_tuple (const Symbol &att) const
 
ListTuple & set_list_tuple (const Symbol &att)
 
ListTuple & set_list_tuple (const Symbol &att, const ListTuple &v)
 
ListTuple & set_ref_list_tuple (const Symbol &att, ListTuple &v)
 
const ListTuple & set_cref_list_tuple (const Symbol &att, const ListTuple &v)
 
Tuple & add_tuple (const Symbol &att, const Tuple &v=Tuple())
 
const ArrayInt & get_array_int (const Symbol &att) const
 
const ArrayInt * get_parray_int (const Symbol &att) const
 
ArrayInt & set_array_int (const Symbol &att)
 
ArrayInt & set_array_int (const Symbol &att, const ArrayInt &v)
 
ArrayInt & set_ref_array_int (const Symbol &att, ArrayInt &v)
 
const ArrayInt & set_cref_array_int (const Symbol &att, const ArrayInt &v)
 
const ListArrayInt & get_list_array_int (const Symbol &att) const
 
const ListArrayInt * get_plist_array_int (const Symbol &att) const
 
ListArrayInt & set_list_array_int (const Symbol &att)
 
ListArrayInt & set_list_array_int (const Symbol &att, const ListArrayInt &v)
 
ListArrayInt & set_ref_list_array_int (const Symbol &att, ListArrayInt &v)
 
const ListArrayInt & set_cref_list_array_int (const Symbol &att, const ListArrayInt &v)
 
ArrayInt & add_array_int (const Symbol &att, const ArrayInt &v=ArrayInt())
 
const ArrayLong & get_array_long (const Symbol &att) const
 
const ArrayLong * get_parray_long (const Symbol &att) const
 
ArrayLong & set_array_long (const Symbol &att)
 
ArrayLong & set_array_long (const Symbol &att, const ArrayLong &v)
 
ArrayLong & set_ref_array_long (const Symbol &att, ArrayLong &v)
 
const ArrayLong & set_cref_array_long (const Symbol &att, const ArrayLong &v)
 
const ListArrayLong & get_list_array_long (const Symbol &att) const
 
const ListArrayLong * get_plist_array_long (const Symbol &att) const
 
ListArrayLong & set_list_array_long (const Symbol &att)
 
ListArrayLong & set_list_array_long (const Symbol &att, const ListArrayLong &v)
 
ListArrayLong & set_ref_list_array_long (const Symbol &att, ListArrayLong &v)
 
const ListArrayLong & set_cref_list_array_long (const Symbol &att, const ListArrayLong &v)
 
ArrayLong & add_array_long (const Symbol &att, const ArrayLong &v=ArrayLong())
 
const ArrayFloat & get_array_float (const Symbol &att) const
 
const ArrayFloat * get_parray_float (const Symbol &att) const
 
ArrayFloat & set_array_float (const Symbol &att)
 
ArrayFloat & set_array_float (const Symbol &att, const ArrayFloat &v)
 
ArrayFloat & set_ref_array_float (const Symbol &att, ArrayFloat &v)
 
const ArrayFloat & set_cref_array_float (const Symbol &att, const ArrayFloat &v)
 
const ListArrayFloat & get_list_array_float (const Symbol &att) const
 
const ListArrayFloat * get_plist_array_float (const Symbol &att) const
 
ListArrayFloat & set_list_array_float (const Symbol &att)
 
ListArrayFloat & set_list_array_float (const Symbol &att, const ListArrayFloat &v)
 
ListArrayFloat & set_ref_list_array_float (const Symbol &att, ListArrayFloat &v)
 
const ListArrayFloat & set_cref_list_array_float (const Symbol &att, const ListArrayFloat &v)
 
ArrayFloat & add_array_float (const Symbol &att, const ArrayFloat &v=ArrayFloat())
 
const ArrayDouble & get_array_double (const Symbol &att) const
 
const ArrayDouble * get_parray_double (const Symbol &att) const
 
ArrayDouble & set_array_double (const Symbol &att)
 
ArrayDouble & set_array_double (const Symbol &att, const ArrayDouble &v)
 
ArrayDouble & set_ref_array_double (const Symbol &att, ArrayDouble &v)
 
const ArrayDouble & set_cref_array_double (const Symbol &att, const ArrayDouble &v)
 
const ListArrayDouble & get_list_array_double (const Symbol &att) const
 
const ListArrayDouble * get_plist_array_double (const Symbol &att) const
 
ListArrayDouble & set_list_array_double (const Symbol &att)
 
ListArrayDouble & set_list_array_double (const Symbol &att, const ListArrayDouble &v)
 
ListArrayDouble & set_ref_list_array_double (const Symbol &att, ListArrayDouble &v)
 
const ListArrayDouble & set_cref_list_array_double (const Symbol &att, const ListArrayDouble &v)
 
ArrayDouble & add_array_double (const Symbol &att, const ArrayDouble &v=ArrayDouble())
 
bool match (const AString &pattern, IBStream &source)
 
bool match (const AString &pattern, const AString &source)
 
bool match (const AString &pattern, IBStream &source, AChar esc)
 
bool match (const AString &pattern, const AString &source, AChar esc)
 
bool operator== (const Tuple &t) const
 
bool operator!= (const Tuple &t) const
 
bool operator< (const Tuple &t) const
 
bool operator> (const Tuple &t) const
 

Friends

class ValueIterator
 
class ConstValueIterator
 

Detailed Description

A tuple is composed of a list of Value, ordered by their names' symbol. For the user, a tuple is composed of attributes, named and typed. Each attribute value can be accessed by its attribute name. A Tuple can also have a class name (a symbol), which has no general meaning.

Examples:
/examples/coding/Listener.cpp, /examples/coding/Logs.cpp, and /examples/coding/Sender.cpp.

Member Typedef Documentation

Constructor & Destructor Documentation

Tuple::Tuple ( )
Tuple::Tuple ( const AChar *  class_name)

Crreate a tuple with a class name

Tuple::Tuple ( const Symbol &  class_name)

Crreate a tuple with a class name

Tuple::Tuple ( const Tuple &  tuple)
Tuple::~Tuple ( )

Member Function Documentation

ArrayDouble & commore::Tuple::add_array_double ( const Symbol &  att,
const ArrayDouble &  v = ArrayDouble() 
)
inline
ArrayFloat & commore::Tuple::add_array_float ( const Symbol &  att,
const ArrayFloat &  v = ArrayFloat() 
)
inline
ArrayInt & commore::Tuple::add_array_int ( const Symbol &  att,
const ArrayInt &  v = ArrayInt() 
)
inline
ArrayLong & commore::Tuple::add_array_long ( const Symbol &  att,
const ArrayLong &  v = ArrayLong() 
)
inline
AString & commore::Tuple::add_astring ( const Symbol &  att,
const AChar *  v = 0 
)
inline

Add a nul terminated string value to a list of string value

Parameters
attattribute name
v
AString & commore::Tuple::add_astring ( const Symbol &  att,
const AString &  v = AString() 
)
inline
Blob & commore::Tuple::add_blob ( const Symbol &  att,
const Blob &  v = Blob() 
)
inline
void commore::Tuple::add_bool ( const Symbol &  att,
Bool  v 
)
inline
void commore::Tuple::add_double ( const Symbol &  att,
Double  v 
)
inline
void commore::Tuple::add_float ( const Symbol &  att,
Float  v 
)
inline
void commore::Tuple::add_int ( const Symbol &  att,
Int  v 
)
inline
void commore::Tuple::add_long ( const Symbol &  att,
Long  v 
)
inline
String & commore::Tuple::add_string ( const Symbol &  att,
const Char *  v = 0 
)
inline

Add a nul terminated unicode string value to a list of unicode string value

Parameters
attattribute name
v
String & commore::Tuple::add_string ( const Symbol &  att,
const String &  v = String() 
)
inline
StringBuffer & commore::Tuple::add_stringbuffer ( const Symbol &  att,
const AChar *  v 
)
inline

Add a nul terminated string value to a list of text value

Parameters
attattribute name
v
StringBuffer & commore::Tuple::add_stringbuffer ( const Symbol &  att,
const StringBuffer &  v = StringBuffer() 
)
inline
Symbol & commore::Tuple::add_symbol ( const Symbol &  att,
const Symbol &  v = Symbol() 
)
inline
void commore::Tuple::add_time_date ( const Symbol &  att,
TimeDate  v 
)
inline
void commore::Tuple::add_time_period ( const Symbol &  att,
TimePeriod  v 
)
inline
Tuple & commore::Tuple::add_tuple ( const Symbol &  att,
const Tuple &  v = Tuple() 
)
inline
Tuple & Tuple::assign ( const Tuple &  tuple)

Assign tuple content with an other tuple

void Tuple::clear ( )

Clear tuple content

void Tuple::clear ( const Symbol &  att)

Clear tuple value

void Tuple::clear ( const ListSymbol &  att)

Clear a list of tuple value

void commore::Tuple::clear_list ( const Symbol &  att)

Clear the values ​​whose names are in the list att

int Tuple::compare ( const Tuple &  t) const

Compare XML representations of tuple

Tuple & Tuple::diff ( const Tuple &  t1,
const Tuple &  t2 
)

Merge in current tuple the difference of t1 and t2

bool Tuple::equal ( const Tuple &  tuple) const
Returns
true if current tupe equel tuple
AString & Tuple::format ( const AChar *  format,
AString &  s 
) const

Write content of tuple in string using format specification. Insert sequence : "%(<ATT_NAME>)"

long Tuple::format ( const AChar *  format,
OBStream &  o 
) const

Write content of tuple to stream using format specification. Insert sequence : "%(<ATT_NAME>)"

long Tuple::from_string ( const AString &  s)

Read tuple from xml string

const ArrayDouble & commore::Tuple::get_array_double ( const Symbol &  att) const
inline
const ArrayFloat & commore::Tuple::get_array_float ( const Symbol &  att) const
inline
const ArrayInt & commore::Tuple::get_array_int ( const Symbol &  att) const
inline
const ArrayLong & commore::Tuple::get_array_long ( const Symbol &  att) const
inline
const AString & commore::Tuple::get_astring ( const Symbol &  att) const
inline
void commore::Tuple::get_attributes ( ListAString &  l) const

Get value name list

const Blob & commore::Tuple::get_blob ( const Symbol &  att) const
inline
Bool commore::Tuple::get_bool ( const Symbol &  att,
Bool  pv = 0 
) const
inline
const Symbol& commore::Tuple::get_class_name ( ) const
inline
Returns
tuple class name
Double commore::Tuple::get_double ( const Symbol &  att,
Double  pv = 0 
) const
inline
Float commore::Tuple::get_float ( const Symbol &  att,
Float  pv = 0 
) const
inline
Int commore::Tuple::get_int ( const Symbol &  att,
Int  pv = 0 
) const
inline
const ListArrayDouble & commore::Tuple::get_list_array_double ( const Symbol &  att) const
inline
const ListArrayFloat & commore::Tuple::get_list_array_float ( const Symbol &  att) const
inline
const ListArrayInt & commore::Tuple::get_list_array_int ( const Symbol &  att) const
inline
const ListArrayLong & commore::Tuple::get_list_array_long ( const Symbol &  att) const
inline
const ListAString & commore::Tuple::get_list_astring ( const Symbol &  att) const
inline
const ListBlob & commore::Tuple::get_list_blob ( const Symbol &  att) const
inline
const ListBool & commore::Tuple::get_list_bool ( const Symbol &  att) const
inline
const ListDouble & commore::Tuple::get_list_double ( const Symbol &  att) const
inline
const ListFloat & commore::Tuple::get_list_float ( const Symbol &  att) const
inline
const ListInt & commore::Tuple::get_list_int ( const Symbol &  att) const
inline
const ListLong & commore::Tuple::get_list_long ( const Symbol &  att) const
inline
const ListString & commore::Tuple::get_list_string ( const Symbol &  att) const
inline
const ListStringBuffer & commore::Tuple::get_list_stringbuffer ( const Symbol &  att) const
inline
const ListSymbol & commore::Tuple::get_list_symbol ( const Symbol &  att) const
inline
const ListTimeDate & commore::Tuple::get_list_time_date ( const Symbol &  att) const
inline
const ListTimePeriod & commore::Tuple::get_list_time_period ( const Symbol &  att) const
inline
const ListTuple & commore::Tuple::get_list_tuple ( const Symbol &  att) const
inline
Long commore::Tuple::get_long ( const Symbol &  att,
Long  pv = 0 
) const
inline
const ArrayDouble * commore::Tuple::get_parray_double ( const Symbol &  att) const
inline
const ArrayFloat * commore::Tuple::get_parray_float ( const Symbol &  att) const
inline
const ArrayInt * commore::Tuple::get_parray_int ( const Symbol &  att) const
inline
const ArrayLong * commore::Tuple::get_parray_long ( const Symbol &  att) const
inline
const AString * commore::Tuple::get_pastring ( const Symbol &  att) const
inline
const Blob * commore::Tuple::get_pblob ( const Symbol &  att) const
inline
const Bool * commore::Tuple::get_pbool ( const Symbol &  att) const
inline
const Double * commore::Tuple::get_pdouble ( const Symbol &  att) const
inline
const Float * commore::Tuple::get_pfloat ( const Symbol &  att) const
inline
const Int * commore::Tuple::get_pint ( const Symbol &  att) const
inline
const ListArrayDouble * commore::Tuple::get_plist_array_double ( const Symbol &  att) const
inline
const ListArrayFloat * commore::Tuple::get_plist_array_float ( const Symbol &  att) const
inline
const ListArrayInt * commore::Tuple::get_plist_array_int ( const Symbol &  att) const
inline
const ListArrayLong * commore::Tuple::get_plist_array_long ( const Symbol &  att) const
inline
const ListAString * commore::Tuple::get_plist_astring ( const Symbol &  att) const
inline
const ListBlob * commore::Tuple::get_plist_blob ( const Symbol &  att) const
inline
const ListBool * commore::Tuple::get_plist_bool ( const Symbol &  att) const
inline
const ListDouble * commore::Tuple::get_plist_double ( const Symbol &  att) const
inline
const ListFloat * commore::Tuple::get_plist_float ( const Symbol &  att) const
inline
const ListInt * commore::Tuple::get_plist_int ( const Symbol &  att) const
inline
const ListLong * commore::Tuple::get_plist_long ( const Symbol &  att) const
inline
const ListString * commore::Tuple::get_plist_string ( const Symbol &  att) const
inline
const ListStringBuffer * commore::Tuple::get_plist_stringbuffer ( const Symbol &  att) const
inline
const ListSymbol * commore::Tuple::get_plist_symbol ( const Symbol &  att) const
inline
const ListTimeDate * commore::Tuple::get_plist_time_date ( const Symbol &  att) const
inline
const ListTimePeriod * commore::Tuple::get_plist_time_period ( const Symbol &  att) const
inline
const ListTuple * commore::Tuple::get_plist_tuple ( const Symbol &  att) const
inline
const Long * commore::Tuple::get_plong ( const Symbol &  att) const
inline
const String * commore::Tuple::get_pstring ( const Symbol &  att) const
inline
const StringBuffer * commore::Tuple::get_pstringbuffer ( const Symbol &  att) const
inline
const Symbol * commore::Tuple::get_psymbol ( const Symbol &  att) const
inline
const TimeDate * commore::Tuple::get_ptime_date ( const Symbol &  att) const
inline
const TimePeriod * commore::Tuple::get_ptime_period ( const Symbol &  att) const
inline
const Tuple * commore::Tuple::get_ptuple ( const Symbol &  att) const
inline
const String & commore::Tuple::get_string ( const Symbol &  att) const
inline
const StringBuffer & commore::Tuple::get_stringbuffer ( const Symbol &  att) const
inline
const Symbol & commore::Tuple::get_symbol ( const Symbol &  att) const
inline

get_<type> : get the value of an attribute by its name. A default value is returned if the attribute for this type is not defined get_p<type> : get the reference value of an attribute by its name. A null value is returned if the attribute for this type is not defined set_<type>(symbol) : set an attribute : if it already exists, do nothing. Else, create the attribute with a default value. set_<type>(symbol, value) : set the value of an attribute, whether it already exists or not. set_ref_<type>(symbol, value) : set the value of an attribute, with a reference whether it already exists or not. set_cref_<type>(symbol, value) : set the value of an attribute, with a const reference whether it already exists or not. add_<type> : for lists only : append the value to the list

TimeDate commore::Tuple::get_time_date ( const Symbol &  att,
TimeDate  pv = 0 
) const
inline
TimePeriod commore::Tuple::get_time_period ( const Symbol &  att,
TimePeriod  pv = 0 
) const
inline
const Tuple & commore::Tuple::get_tuple ( const Symbol &  att) const
inline
bool commore::Tuple::is_a ( Symbol  class_name) const
inline
Returns
true if tuple class name equal class_name
bool Tuple::is_empty ( ) const
Returns
true if tuple is empty
bool commore::Tuple::is_null ( const Symbol &  att) const
Returns
true if value with att name does not exist in tuple
bool Tuple::is_set ( const Symbol &  att) const
Returns
true if a value with att name exists in tuple
bool Tuple::is_set ( const Symbol &  att,
Types  type 
) const
Returns
true if a value with att name and with specified type exists in tuple
void Tuple::keep ( const ListSymbol &  att)

Clear tuple values ​​whose names are not in att

bool Tuple::match ( const AString &  pattern,
IBStream &  source 
)

Match content of source with pattern and assign result to tuple. pattern is a string where place holder sequences have the format "%(<ATT_NAME>[:<TYPE>])" TYPE can be 's' for string or 'i' for int Default is s ATT_NAME is the tuple attribute name where result is stored.

bool Tuple::match ( const AString &  pattern,
const AString &  source 
)
bool Tuple::match ( const AString &  pattern,
IBStream &  source,
AChar  esc 
)
bool Tuple::match ( const AString &  pattern,
const AString &  source,
AChar  esc 
)
Tuple & Tuple::merge ( const Tuple &  tuple)

Merge content of tuple into curent tuple Each value in tuple are inserted in current tuple

Tuple & Tuple::merge_except ( const Tuple &  tuple,
const ListSymbol &  atts 
)

Merge content of 'tuple' into curent tuple Except values from atts list.

Parameters
tuplesource tuple to merge with
attsexcept symbol list
Tuple & Tuple::merge_only ( const Tuple &  tuple,
const ListSymbol &  atts 
)

Merge only tuple values from atts list

Parameters
tuplesource tuple to merge with
attsonly symbol list
commore::Tuple::operator bool ( )
inline
Returns
true if not empty
bool commore::Tuple::operator!= ( const Tuple &  t) const
inline
bool commore::Tuple::operator< ( const Tuple &  t) const
inline
Tuple& commore::Tuple::operator= ( const Tuple &  tuple)
inline
bool commore::Tuple::operator== ( const Tuple &  t) const
inline

Compare XML representations of tuple

bool commore::Tuple::operator> ( const Tuple &  t) const
inline
long Tuple::read ( const CommBuffer &  buf)

Read tuple from CommBufer

long Tuple::read_xml ( IBStream &  i)

Read tuple from xml text stream

long Tuple::read_xml ( XmlParser &  i)
long Tuple::read_xml ( const Path &  file_name)

Read tuple from xml file

long Tuple::read_xml ( const StringBuffer &  s)

Read tuple from xml text

ArrayDouble & commore::Tuple::set_array_double ( const Symbol &  att)
inline
ArrayDouble & commore::Tuple::set_array_double ( const Symbol &  att,
const ArrayDouble &  v 
)
inline
ArrayFloat & commore::Tuple::set_array_float ( const Symbol &  att)
inline
ArrayFloat & commore::Tuple::set_array_float ( const Symbol &  att,
const ArrayFloat &  v 
)
inline
ArrayInt & commore::Tuple::set_array_int ( const Symbol &  att)
inline
ArrayInt & commore::Tuple::set_array_int ( const Symbol &  att,
const ArrayInt &  v 
)
inline
ArrayLong & commore::Tuple::set_array_long ( const Symbol &  att)
inline
ArrayLong & commore::Tuple::set_array_long ( const Symbol &  att,
const ArrayLong &  v 
)
inline
AString & commore::Tuple::set_astring ( const Symbol &  att,
const AChar *  v 
)
inline

Set a nul terminated string value

Parameters
attattribute name
v
AString & commore::Tuple::set_astring ( const Symbol &  att)
inline
AString & commore::Tuple::set_astring ( const Symbol &  att,
const AString &  v 
)
inline
Blob & commore::Tuple::set_blob ( const Symbol &  att)
inline
Blob & commore::Tuple::set_blob ( const Symbol &  att,
const Blob &  v 
)
inline
Bool & commore::Tuple::set_bool ( const Symbol &  att)
inline
Bool & commore::Tuple::set_bool ( const Symbol &  att,
Bool  v 
)
inline
void Tuple::set_class_name ( const Symbol &  className)

Set tuple class name

const ArrayDouble & commore::Tuple::set_cref_array_double ( const Symbol &  att,
const ArrayDouble &  v 
)
inline
const ArrayFloat & commore::Tuple::set_cref_array_float ( const Symbol &  att,
const ArrayFloat &  v 
)
inline
const ArrayInt & commore::Tuple::set_cref_array_int ( const Symbol &  att,
const ArrayInt &  v 
)
inline
const ArrayLong & commore::Tuple::set_cref_array_long ( const Symbol &  att,
const ArrayLong &  v 
)
inline
const AString & commore::Tuple::set_cref_astring ( const Symbol &  att,
const AString &  v 
)
inline
const Blob & commore::Tuple::set_cref_blob ( const Symbol &  att,
const Blob &  v 
)
inline
const Bool & commore::Tuple::set_cref_bool ( const Symbol &  att,
const Bool &  v 
)
inline
const Double & commore::Tuple::set_cref_double ( const Symbol &  att,
const Double &  v 
)
inline
const Float & commore::Tuple::set_cref_float ( const Symbol &  att,
const Float &  v 
)
inline
const Int & commore::Tuple::set_cref_int ( const Symbol &  att,
const Int &  v 
)
inline
const ListArrayDouble & commore::Tuple::set_cref_list_array_double ( const Symbol &  att,
const ListArrayDouble &  v 
)
inline
const ListArrayFloat & commore::Tuple::set_cref_list_array_float ( const Symbol &  att,
const ListArrayFloat &  v 
)
inline
const ListArrayInt & commore::Tuple::set_cref_list_array_int ( const Symbol &  att,
const ListArrayInt &  v 
)
inline
const ListArrayLong & commore::Tuple::set_cref_list_array_long ( const Symbol &  att,
const ListArrayLong &  v 
)
inline
const ListAString & commore::Tuple::set_cref_list_astring ( const Symbol &  att,
const ListAString &  v 
)
inline
const ListBlob & commore::Tuple::set_cref_list_blob ( const Symbol &  att,
const ListBlob &  v 
)
inline
const ListBool & commore::Tuple::set_cref_list_bool ( const Symbol &  att,
const ListBool &  v 
)
inline
const ListDouble & commore::Tuple::set_cref_list_double ( const Symbol &  att,
const ListDouble &  v 
)
inline
const ListFloat & commore::Tuple::set_cref_list_float ( const Symbol &  att,
const ListFloat &  v 
)
inline
const ListInt & commore::Tuple::set_cref_list_int ( const Symbol &  att,
const ListInt &  v 
)
inline
const ListLong & commore::Tuple::set_cref_list_long ( const Symbol &  att,
const ListLong &  v 
)
inline
const ListString & commore::Tuple::set_cref_list_string ( const Symbol &  att,
const ListString &  v 
)
inline
const ListStringBuffer & commore::Tuple::set_cref_list_stringbuffer ( const Symbol &  att,
const ListStringBuffer &  v 
)
inline
const ListSymbol & commore::Tuple::set_cref_list_symbol ( const Symbol &  att,
const ListSymbol &  v 
)
inline
const ListTimeDate & commore::Tuple::set_cref_list_time_date ( const Symbol &  att,
const ListTimeDate &  v 
)
inline
const ListTimePeriod & commore::Tuple::set_cref_list_time_period ( const Symbol &  att,
const ListTimePeriod &  v 
)
inline
const ListTuple & commore::Tuple::set_cref_list_tuple ( const Symbol &  att,
const ListTuple &  v 
)
inline
const Long & commore::Tuple::set_cref_long ( const Symbol &  att,
const Long &  v 
)
inline
const String & commore::Tuple::set_cref_string ( const Symbol &  att,
const String &  v 
)
inline
const StringBuffer & commore::Tuple::set_cref_stringbuffer ( const Symbol &  att,
const StringBuffer &  v 
)
inline
const Symbol & commore::Tuple::set_cref_symbol ( const Symbol &  att,
const Symbol &  v 
)
inline
const TimeDate & commore::Tuple::set_cref_time_date ( const Symbol &  att,
const TimeDate &  v 
)
inline
const TimePeriod & commore::Tuple::set_cref_time_period ( const Symbol &  att,
const TimePeriod &  v 
)
inline
const Tuple & commore::Tuple::set_cref_tuple ( const Symbol &  att,
const Tuple &  v 
)
inline
Double & commore::Tuple::set_double ( const Symbol &  att)
inline
Double & commore::Tuple::set_double ( const Symbol &  att,
Double  v 
)
inline
Float & commore::Tuple::set_float ( const Symbol &  att)
inline
Float & commore::Tuple::set_float ( const Symbol &  att,
Float  v 
)
inline
Int & commore::Tuple::set_int ( const Symbol &  att)
inline
Int & commore::Tuple::set_int ( const Symbol &  att,
Int  v 
)
inline
ListArrayDouble & commore::Tuple::set_list_array_double ( const Symbol &  att)
inline
ListArrayDouble & commore::Tuple::set_list_array_double ( const Symbol &  att,
const ListArrayDouble &  v 
)
inline
ListArrayFloat & commore::Tuple::set_list_array_float ( const Symbol &  att)
inline
ListArrayFloat & commore::Tuple::set_list_array_float ( const Symbol &  att,
const ListArrayFloat &  v 
)
inline
ListArrayInt & commore::Tuple::set_list_array_int ( const Symbol &  att)
inline
ListArrayInt & commore::Tuple::set_list_array_int ( const Symbol &  att,
const ListArrayInt &  v 
)
inline
ListArrayLong & commore::Tuple::set_list_array_long ( const Symbol &  att)
inline
ListArrayLong & commore::Tuple::set_list_array_long ( const Symbol &  att,
const ListArrayLong &  v 
)
inline
ListAString & commore::Tuple::set_list_astring ( const Symbol &  att)
inline
ListAString & commore::Tuple::set_list_astring ( const Symbol &  att,
const ListAString &  v 
)
inline
ListBlob & commore::Tuple::set_list_blob ( const Symbol &  att)
inline
ListBlob & commore::Tuple::set_list_blob ( const Symbol &  att,
const ListBlob &  v 
)
inline
ListBool & commore::Tuple::set_list_bool ( const Symbol &  att)
inline
ListBool & commore::Tuple::set_list_bool ( const Symbol &  att,
const ListBool &  v 
)
inline
ListDouble & commore::Tuple::set_list_double ( const Symbol &  att)
inline
ListDouble & commore::Tuple::set_list_double ( const Symbol &  att,
const ListDouble &  v 
)
inline
ListFloat & commore::Tuple::set_list_float ( const Symbol &  att)
inline
ListFloat & commore::Tuple::set_list_float ( const Symbol &  att,
const ListFloat &  v 
)
inline
ListInt & commore::Tuple::set_list_int ( const Symbol &  att)
inline
ListInt & commore::Tuple::set_list_int ( const Symbol &  att,
const ListInt &  v 
)
inline
ListLong & commore::Tuple::set_list_long ( const Symbol &  att)
inline
ListLong & commore::Tuple::set_list_long ( const Symbol &  att,
const ListLong &  v 
)
inline
ListString & commore::Tuple::set_list_string ( const Symbol &  att)
inline
ListString & commore::Tuple::set_list_string ( const Symbol &  att,
const ListString &  v 
)
inline
ListStringBuffer & commore::Tuple::set_list_stringbuffer ( const Symbol &  att)
inline
ListStringBuffer & commore::Tuple::set_list_stringbuffer ( const Symbol &  att,
const ListStringBuffer &  v 
)
inline
ListSymbol & commore::Tuple::set_list_symbol ( const Symbol &  att)
inline
ListSymbol & commore::Tuple::set_list_symbol ( const Symbol &  att,
const ListSymbol &  v 
)
inline
ListTimeDate & commore::Tuple::set_list_time_date ( const Symbol &  att)
inline
ListTimeDate & commore::Tuple::set_list_time_date ( const Symbol &  att,
const ListTimeDate &  v 
)
inline
ListTimePeriod & commore::Tuple::set_list_time_period ( const Symbol &  att)
inline
ListTimePeriod & commore::Tuple::set_list_time_period ( const Symbol &  att,
const ListTimePeriod &  v 
)
inline
ListTuple & commore::Tuple::set_list_tuple ( const Symbol &  att)
inline
ListTuple & commore::Tuple::set_list_tuple ( const Symbol &  att,
const ListTuple &  v 
)
inline
Long & commore::Tuple::set_long ( const Symbol &  att)
inline
Long & commore::Tuple::set_long ( const Symbol &  att,
Long  v 
)
inline
void commore::Tuple::set_null ( const Symbol &  att)

Clear tuple value

ArrayDouble & commore::Tuple::set_ref_array_double ( const Symbol &  att,
ArrayDouble &  v 
)
inline
ArrayFloat & commore::Tuple::set_ref_array_float ( const Symbol &  att,
ArrayFloat &  v 
)
inline
ArrayInt & commore::Tuple::set_ref_array_int ( const Symbol &  att,
ArrayInt &  v 
)
inline
ArrayLong & commore::Tuple::set_ref_array_long ( const Symbol &  att,
ArrayLong &  v 
)
inline
AString & commore::Tuple::set_ref_astring ( const Symbol &  att,
AString &  v 
)
inline
Blob & commore::Tuple::set_ref_blob ( const Symbol &  att,
Blob &  v 
)
inline
Bool & commore::Tuple::set_ref_bool ( const Symbol &  att,
Bool &  v 
)
inline
Double & commore::Tuple::set_ref_double ( const Symbol &  att,
Double &  v 
)
inline
Float & commore::Tuple::set_ref_float ( const Symbol &  att,
Float &  v 
)
inline
Int & commore::Tuple::set_ref_int ( const Symbol &  att,
Int &  v 
)
inline
ListArrayDouble & commore::Tuple::set_ref_list_array_double ( const Symbol &  att,
ListArrayDouble &  v 
)
inline
ListArrayFloat & commore::Tuple::set_ref_list_array_float ( const Symbol &  att,
ListArrayFloat &  v 
)
inline
ListArrayInt & commore::Tuple::set_ref_list_array_int ( const Symbol &  att,
ListArrayInt &  v 
)
inline
ListArrayLong & commore::Tuple::set_ref_list_array_long ( const Symbol &  att,
ListArrayLong &  v 
)
inline
ListAString & commore::Tuple::set_ref_list_astring ( const Symbol &  att,
ListAString &  v 
)
inline
ListBlob & commore::Tuple::set_ref_list_blob ( const Symbol &  att,
ListBlob &  v 
)
inline
ListBool & commore::Tuple::set_ref_list_bool ( const Symbol &  att,
ListBool &  v 
)
inline
ListDouble & commore::Tuple::set_ref_list_double ( const Symbol &  att,
ListDouble &  v 
)
inline
ListFloat & commore::Tuple::set_ref_list_float ( const Symbol &  att,
ListFloat &  v 
)
inline
ListInt & commore::Tuple::set_ref_list_int ( const Symbol &  att,
ListInt &  v 
)
inline
ListLong & commore::Tuple::set_ref_list_long ( const Symbol &  att,
ListLong &  v 
)
inline
ListString & commore::Tuple::set_ref_list_string ( const Symbol &  att,
ListString &  v 
)
inline
ListStringBuffer & commore::Tuple::set_ref_list_stringbuffer ( const Symbol &  att,
ListStringBuffer &  v 
)
inline
ListSymbol & commore::Tuple::set_ref_list_symbol ( const Symbol &  att,
ListSymbol &  v 
)
inline
ListTimeDate & commore::Tuple::set_ref_list_time_date ( const Symbol &  att,
ListTimeDate &  v 
)
inline
ListTimePeriod & commore::Tuple::set_ref_list_time_period ( const Symbol &  att,
ListTimePeriod &  v 
)
inline
ListTuple & commore::Tuple::set_ref_list_tuple ( const Symbol &  att,
ListTuple &  v 
)
inline
Long & commore::Tuple::set_ref_long ( const Symbol &  att,
Long &  v 
)
inline
String & commore::Tuple::set_ref_string ( const Symbol &  att,
String &  v 
)
inline
StringBuffer & commore::Tuple::set_ref_stringbuffer ( const Symbol &  att,
StringBuffer &  v 
)
inline
Symbol & commore::Tuple::set_ref_symbol ( const Symbol &  att,
Symbol &  v 
)
inline
TimeDate & commore::Tuple::set_ref_time_date ( const Symbol &  att,
TimeDate &  v 
)
inline
TimePeriod & commore::Tuple::set_ref_time_period ( const Symbol &  att,
TimePeriod &  v 
)
inline
Tuple & commore::Tuple::set_ref_tuple ( const Symbol &  att,
Tuple &  v 
)
inline
String & commore::Tuple::set_string ( const Symbol &  att,
const Char *  v 
)
inline

Set a nul terminated unicode string value

Parameters
attattribute name
v
String & commore::Tuple::set_string ( const Symbol &  att)
inline
String & commore::Tuple::set_string ( const Symbol &  att,
const String &  v 
)
inline
StringBuffer & commore::Tuple::set_stringbuffer ( const Symbol &  att,
const AChar *  v 
)
inline

Set a nul terminated text value

Parameters
attattribute name
v
StringBuffer & commore::Tuple::set_stringbuffer ( const Symbol &  att)
inline
StringBuffer & commore::Tuple::set_stringbuffer ( const Symbol &  att,
const StringBuffer &  v 
)
inline
Symbol & commore::Tuple::set_symbol ( const Symbol &  att)
inline
Symbol & commore::Tuple::set_symbol ( const Symbol &  att,
const Symbol &  v 
)
inline
TimeDate & commore::Tuple::set_time_date ( const Symbol &  att)
inline
TimeDate & commore::Tuple::set_time_date ( const Symbol &  att,
TimeDate  v 
)
inline
TimePeriod & commore::Tuple::set_time_period ( const Symbol &  att)
inline
TimePeriod & commore::Tuple::set_time_period ( const Symbol &  att,
TimePeriod  v 
)
inline
Tuple & commore::Tuple::set_tuple ( const Symbol &  att)
inline
Tuple & commore::Tuple::set_tuple ( const Symbol &  att,
const Tuple &  v 
)
inline
Tuple & Tuple::splice ( Tuple &  tuple)

Move content of 'tuple' to current tuple. 'tuple' is cleared

Parameters
tuplesource tuple. its content will be moved to *this
AString & Tuple::to_string ( AString &  s) const

Convert tuple to xml string

AString & Tuple::to_string ( const AString &  s = AString()) const

Convert tuple to xml string

long Tuple::write ( CommBuffer &  buf) const

Write tuple in CommBufer

long Tuple::write_xml ( OBStream &  o,
const AChar *  att = 0 
) const

Write tuple to xml text stream

Parameters
ostream
attvalue name
long Tuple::write_xml ( const Path &  file_name) const

Write tuple to xml file

long Tuple::write_xml ( StringBuffer &  s) const

Write tuple to xml text

Friends And Related Function Documentation

friend class ConstValueIterator
friend
friend class ValueIterator
friend

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