예제 #1
0
 // [True] or [False]
 void visit( BooleanNode aNode ) {
   if ( aNode.getValue() ) {
     std::cout << " [True]";
   } else {
     std::cout << "[False]";
   }
 }
예제 #2
0
/**
 * Transform a BooleanNode to a XML node.
 *
 * @param node		A settings tree node representing a boolean node.
 * @param parent	The parent node of the XML document.
 */
Void XmlSettingsTree::settingsTreeToXml( BooleanNode& node, TiXmlNode& parent ) {
	TiXmlElement* element;

	if( node.getValue() ) {
		element	= new TiXmlElement( XMLSETTINGSTREE_BOOLEANTRUE_ELEMENT );
	} else {
		element	= new TiXmlElement( XMLSETTINGSTREE_BOOLEANFALSE_ELEMENT );
	}

	parent.LinkEndChild( element );
}