@tool : tool_main

Process an actual main() with arguments.

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

All other objects can call this method without having an instance of this object. This is called 'global' scope. In Some languages, this would be a "static" method.

The data-type returned is "inttype"; Returns the error level for the OS.

This method is contained in the object "@tool".

The method takes the following arguments:

context : xmlobj_contextptrtype

A context to pass through to the tool.

filename : stringtype

The filename to run. This is an XML script containing creation arguments for the tool file.

C++

The files "../cppxmlobj/xmlobj_read.hpp" are included.

The main handler for the tool.

	// read in the schema test.
	ph::xmlobj::xmlobj_ptr<tool> tool(
		ph::xmlobj::xmlobj_read_file<tool>(
		filename, context, &std::cerr, false, 0));
	if (!tool.get())
		return 1;

	if (!tool->process(&std::cerr, &std::cout))
		return 1;

	return 0;

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