Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 27, 2010, 2:53:06 PM (15 years ago)
Author:
landauf
Message:

implemented command cache in CommandExecutor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.h

    r7228 r7229  
    3232#include "core/CorePrereqs.h"
    3333
     34#include <map>
     35#include <list>
    3436#include <string>
    3537
     
    6567
    6668            static CommandExecutor& getInstance();
     69
     70            bool getCached(const std::string& command, CommandEvaluation& evaluation);
     71            void cache(const std::string& command, const CommandEvaluation& evaluation);
     72
     73            struct CacheEntry
     74            {
     75                CommandEvaluation evaluation_;
     76                std::list<std::string>::iterator iterator_;
     77            };
     78
     79            std::map<std::string, CacheEntry> cache_;
     80            std::list<std::string> cachelist_;
    6781    }; // tolua_export
    6882} // tolua_export
Note: See TracChangeset for help on using the changeset viewer.