| tgl_block_parser : get_block |
Get the value of a named block.
Any other method of any other object can call this method. This is called 'public' access.
The data-type returned is "stringtype"; The value of the block.
This method is contained in the object "tgl_block_parser".
The method takes the following arguments:
block : stringtype
The name of the block.
This method is overridden from an abstract method with the same signature found in the object tgl_structure_parser.
The files "tgl_block.hpp" are included.
Get the value of a block.
tgl_block *b = _tglobj->get_block(block);
schema::schema_obj *o = _obj;
if (!b)
{
tgl_obj *p = dynamic_cast<tgl_obj *>(_tglobj->parent());
o = dynamic_cast<schema::schema_obj *>(o->parent());
while (p && !b)
{
b = p->get_block(block);
if (!b)
{
p = dynamic_cast<tgl_obj *>(p->parent());
o = dynamic_cast<schema::schema_obj *>(o->parent());
}
}
}
if (b)
return b->get_value();
return "";