#include "interfacegats.h" #include "smlnode.h" #include #include using namespace Bu; PluginInterface3( plugin_interface_gats, gats, InterfaceGats, Interface, "Mike Buland", 1, 0 ); InterfaceGats::InterfaceGats() { } InterfaceGats::~InterfaceGats() { } void InterfaceGats::run( class Game *pGame ) { } void InterfaceGats::display( const SmlNode *pSml ) { switch( pSml->getType() ) { case SmlNode::typeRoot: sio << "

"; for( SmlNode::SmlNodeList::const_iterator i = pSml->getChildren().begin(); i; i++ ) { display( *i ); } sio << "

"; break; case SmlNode::typeText: sio << pSml->getText(); break; case SmlNode::typeTag: if( pSml->getChildren().isEmpty() ) { if( pSml->getText() == "break" ) sio << "

"; } else { if( pSml->getText() == "red" ) { sio << ""; for( SmlNode::SmlNodeList::const_iterator i = pSml->getChildren().begin(); i; i++ ) { display( *i ); } sio << ""; } else if( pSml->getText() == "green" ) { sio << ""; for( SmlNode::SmlNodeList::const_iterator i = pSml->getChildren().begin(); i; i++ ) { display( *i ); } sio << ""; } } break; } }