tgl_forlist_parser : do_block

process a named block.

Any other method of any other object can call this method. This is called 'public' access.

The data-type returned is "booltype"; Not sure.

This method is contained in the object "tgl_forlist_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.

Implementations

C++

The files "tgl_block.hpp" and "tgl_forlist.hpp" are included.

Process a block for the forlist parser.

	if (block == "item")
		return write_output(_item);
	else
	{
		// search the tree of blocks until we find a null parent
		// or we find a block with the name.
		tgl_block *b = _tglobj->get_block(block);
		if (!b)
		{
			tgl_obj *p = dynamic_cast<tgl_obj *>(_tglobj->parent());
			while (p && !b)
			{
				b = p->get_block(block);
				if (!b)
					p = dynamic_cast<tgl_obj *>(p->parent());
			}
		}
		
		if (b)
		{
			if (b->pass(this, _obj, _first, _last))
				b->output(this, _obj);
			return true;
		}
	
		error("forlist parser could not find block [" + block + "].");
		return false;
	}

Generated: Wed Apr 5 23:52:28 EST 2006 using "xsltproc ... docbook.xsl". Copyright (c) 2003, 2004, 2005; Paul Hamilton; pHamtec P/L. Use, modification, and distribution is provided free of any limitations.