//unregister all static commands void TACInterp::unregisterStaticCommands() { TACStaticGenerator lAllCmds; TACCommand* lCmd; while ((lCmd = lAllCmds.next())) { //cout<<"tcl register command "<< lCmd->getName().c_str()<<endl; unregisterCmd(lCmd); } }
template<class T> void AsyncEndpoint<T>::initialize(){ NMEAEndpoint::initialize(); registerBoolCmd("persist" ,"Session persistance", "When on, messages are stored after a disconnect and after the reconnect replayed. See also [queue_size]", &persist, false, true); registerUIntCmd("queue_size","Message Queue Size", "Defines the maximum size of the message queue for this endpoint. See also [persist]", &message_queue_size, 10, 0, std::numeric_limits<unsigned int>::max(), true); boost::function<void (Command_ptr)> func = boost::bind(&AsyncEndpoint<T>::exit_cmd, this, _1); registerVoidCmd("exit","End Session", "Ends the session and disconnects the remote host. Command does not take any arguments.", func); unregisterCmd("print_stats"); boost::function<void (Command_ptr)> func2 = boost::bind(&AsyncEndpoint<T>::print_stats_cmd, this, _1); registerVoidCmd("print_stats","Print Session statistics", "Prints statistics about the session.", func2); isActive=false; wasFull = false; }