enumfiledef : process

As above, but write a file out to the folder passed in. Progress messages are written to the stream.

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.

path : pathtype

Not sure.

C++

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

Process a file definition. This method output's the results directly 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_file_visitor v(this, root, path, 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;
		}
		
		return process(obj, make_filename(path, obj->get("classname")), true);
	}

Generated: Thu Apr 6 00:01:06 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.