object : get_namespace

Get the namespace of this object.

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

The data-type returned is "stringtype"; Returns the namespace of this object. See "namespace" member for the format.

This method is contained in the object "object".

This method takes no arguments.

C++

Walk all of the parents to collect the namespace.

	std::string ns = _namespace;
	schema_object *p = dynamic_cast<schema_object *>(parent());
	while (p)
	{
		if (p->_namespace != "")
			ns = p->_namespace + ":" + ns;
		p = dynamic_cast<schema_object *>(p->parent());
	}
	
	return ns;

Java

Walk all of the parents to collect the namespace.

/*
	std::string ns = _namespace;
	schema_object *p = dynamic_cast<schema_object *>(parent());
	while (p)
	{
		if (p->_namespace != "")
			ns = p->_namespace + ":" + ns;
		p = dynamic_cast<schema_object *>(p->parent());
	}
	
	return ns;
*/
	return "";

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