1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
class Object3d {
public:
virtual ~Object3d();
// renvoie le nom de l'objet ( "cube1" )
std::string const& getName() const ;
// execute une commande avec un vecteur d'argument
virtual ScriptValue execute( std::string const& command, std::vector< ScriptValue > const& args );
};
class Console {
public:
void executeCommandLine( std::string const& commandLine )
{
std::string command;
std::string target;
std::vector< ScriptValue > args;
parseCommandLine( commandLine, command, target, args );
getObjectPool().getObjectByName(target).execute( command, args );
}
//...
}; |
Partager