lookupobjectnamespace : output

Output the block to the stream.

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

The data-type returned is "voidtype";

This method is contained in the object "lookupobjectnamespace".

The method takes the following arguments:

filedef : Pointer to tgl_structure_parser

Not sure.

obj : Pointer to @schemaobj

Not sure.

This method is overridden from an abstract method with the same signature found in the object @block.

Implementations

C++

The files "../cppxmlobj/reflect/jscript_object_navigator.hpp", "schema/schema_object.hpp", "tgl_structure_parser.hpp" and "boost/tokenizer.hpp" are included.

Lookup up an object and get it's namespace.

	ph::reflect::jscript_object_navigator n(obj->root(), filedef->console(), false, false);
	ph::common::object_base *no = n.navigate(obj, _location);
	if (!no)
	{
		filedef->error("Could not find location [" + _location + "] in object.");
		return;
	}
	
	xmlobj::xmlobj *root = dynamic_cast<xmlobj::xmlobj *>(no);
	if (!root)
	{
		filedef->error("Internal error. How could the object returned not be an xmlobj?.");
		return;
	}
	
	// search for the object in the object tree.
	xmlobj *found = root->findwithtype("object", obj->get(_lookupmember));
	if (found != 0)
	{
		ph::tools::schema::schema_object *o = 
			dynamic_cast<ph::tools::schema::schema_object *>(found);
		if (o == 0)
		{
			filedef->error(found->name() + " is not a schema_object. It is a [" + 
				found->type() + "].");
			return;
		}
		std::string ns = o->get_namespace();
		
		// split out the namespaces.
		boost::char_separator<char> sep(":");
		boost::tokenizer<boost::char_separator<char> > t(ns, sep);
		for (boost::tokenizer<boost::char_separator<char> >::iterator i=t.begin(); i != t.end(); i++)
		{
			filedef->write_output(*i);
			filedef->write_output("::");
		}
	}

Generated: Wed Apr 5 23:57:13 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.