Skip to content

Instantly share code, notes, and snippets.

@jalcine
Created October 12, 2011 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jalcine/1281658 to your computer and use it in GitHub Desktop.
Save jalcine/1281658 to your computer and use it in GitHub Desktop.
The intialization code for WntrData, WntrNtwk, and WntrLing as needed for each of the plugin's init methods.
else if ( s_appMod == "ling" ) {
l_objectName = "Linguistics";
Linguistics::SystemAdaptor* l_adpt = new Linguistics::SystemAdaptor;
registerObject ("/System", l_adpt);
s_adapt = l_adpt;
} else if ( s_appMod == "data" ) {
l_objectName = "Data";
Data::Linguistics::System::setLocale ( Core::arguments ()->value ("locale").toString () );
connect(Core::instance (),SIGNAL(started()),Data::System::instance (),SLOT(start()));
connect(Core::instance (),SIGNAL(stopped()),Data::System::instance (),SLOT(stop()));
Data::SystemAdaptor* l_adpt = new Data::SystemAdaptor;
Data::NodeAdaptor* l_adpt2 = new Data::NodeAdaptor;
Data::RuleAdaptor* l_adpt3 = new Data::RuleAdaptor;
registerObject ("/System" , l_adpt);
registerObject ("/Nodes" , l_adpt2);
registerObject ("/Rules" , l_adpt3);
s_adapt = l_adpt;
} else if ( s_appMod == "ntwk" ) {
l_objectName = "Network";
connect(Core::instance (),SIGNAL(started()),Network::Interface::instance(),SLOT(start()));
connect(Core::instance (),SIGNAL(stopped()),Network::Interface::instance(),SLOT(stop()));
Network::SystemAdaptor* l_adpt = new Network::SystemAdaptor;
Network::BroadcastAdaptor* l_adpt2 = new Network::BroadcastAdaptor;
registerObject ("/System" , l_adpt);
registerObject ("/Broadcast",l_adpt2);
s_adapt = l_adpt;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment