enumfiledef : process

Process the object through this file definition, outputing "structure" to the stream provided, and sending any errors to the console. Commands can be embedded in the structure according to the definitions in the class.

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

The data-type returned is "booltype"; Returns true if the function is successful.

This method is contained in the object "enumfiledef".

The method takes the following arguments:

schema : Pointer to object

Not sure.

objname : stringtype

Not sure.

C++

The files "schema/schema_enumeration.hpp", "tgl/tgl_enumfiledef_console_visitor.hpp" and "tgl_list_parser.hpp" are included.

Process an enumeration file definition. This method output's the results directly to the console rather than to a file. Just the object specified will be processed.

	ph::tools::schema::schema_object *root = get_root(schema, _root, _console);
	if (!root)
	{
		*_console << "Could not find object [" << _root << "] in schema." << std::endl;
		return false;
	}
	
	tgl_list_parser p;
	std::set<std::string> ignoreset;
	if (!p.parse_to_set(_ignoreobjects, &ignoreset))
	{
		*_console << "Badly formed ignoreobjects list." << std::endl;
		return false;
	}

	if (objname == "*")
	{
		tgl_enumfiledef_console_visitor v(this, root, ignoreset, _console, _stream);
		return root->accept(&v);
	}
	else
	{
		ph::tools::schema::schema_enumeration *obj = 
			dynamic_cast<ph::tools::schema::schema_enumeration *>(schema->find(objname));
		if (!obj)
		{
			*_console << "Could not find enumeration [" << objname << "] in schema." << std::endl;
			return false;
		}
		
		tgl_block_parser parser(this, obj, false, false, 
			_stream, _console, get_path(), _filepath);
		return parser.write_output(_structure);
	}

Generated: Wed Apr 5 23:54:19 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.