version : public_string

Return the public version as a string.

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

The data-type returned is "stringtype"; The version as a string.

This method is contained in the object "version".

The method takes the following arguments:

full : booltype

If true, then the phase and build are included.

C++

The files "boost/lexical_cast.hpp" are included.

Return this version as a public string.

	std::string v = "Version " + boost::lexical_cast<std::string>(_major) + "." +
		boost::lexical_cast<std::string>(_minor) + 
		" Build " + boost::lexical_cast<std::string>(_build);
		
	if (full)
		v += "." + boost::lexical_cast<std::string>(_subbuild);
	
	return v;

Java

Return this version as a public string. In Java, you can't switch on long values, only ints. It might be nicer if this was an enumeration...

	String v = "Version " + String.valueOf(_major) + "." + String.valueOf(_minor);
		
	if (full)
	{
		if (_phase == 0)
			v += " Development ";
		else if (_phase == 1)
			v += " Alpha ";
		else if (_phase == 2)
			v += " Beta ";
		else
			v += " ";
		v += "Build " + String.valueOf(_build);
	}
	
	return v;

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