{ return v.cons.car; }
Lisp* get_cdr() const
{ return v.cons.cdr; }
+
bool get(std::string& val) const
{
if(type != TYPE_STRING && type != TYPE_SYMBOL)
val = v.string;
return true;
}
+
+ std::string get_string() const
+ {
+ assert(type == TYPE_STRING);
+ return v.string;
+ }
+
bool get(unsigned int& val) const
{
if(type != TYPE_INTEGER)
val = v.integer;
return true;
}
+
bool get(int& val) const
{
if(type != TYPE_INTEGER)
val = v.integer;
return true;
}
+
+ int get_int() const
+ {
+ assert(type == TYPE_INTEGER);
+ return v.integer;
+ }
+
bool get(float& val) const
{
if(type != TYPE_REAL) {
val = v.real;
return true;
}
+
+ float get_float() const
+ {
+ assert(type == TYPE_REAL);
+ return v.real;
+ }
+
bool get(bool& val) const
{
if(type != TYPE_BOOLEAN)
return true;
}
+ bool get_bool() const
+ {
+ assert(type == TYPE_BOOLEAN);
+ return v.boolean;
+ }
+
/** conveniance functions which traverse the list until a child with a
* specified name is found. The value part is then interpreted in a specific
* way. The functions return true, if a child was found and could be