boost::any execute(const command& c) const { Commands::const_iterator it = commands.find(c.name); if (it != commands.end()) { return (it->second.func)->execute(c); } else { return boost::any();//return std::string("unknown command"); } }
const Command& GlobalCommands_find( const char* command ){ Commands::iterator i = g_commands.find( command ); ASSERT_MESSAGE( i != g_commands.end(), "failed to lookup command " << makeQuoted( command ) ); return ( *i ).second; }