Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AI_COMPOSITE_ENGINE_LUA_HPP_INCLUDED
00022 #define AI_COMPOSITE_ENGINE_LUA_HPP_INCLUDED
00023
00024 #include "engine.hpp"
00025
00026
00027 namespace ai {
00028
00029 class lua_ai_context;
00030
00031 class engine_lua : public engine {
00032 public:
00033 engine_lua( readonly_context &context, const config &cfg );
00034
00035 virtual ~engine_lua();
00036
00037
00038
00039
00040
00041 virtual void do_parse_candidate_action_from_config( rca_context &context, const config &cfg, std::back_insert_iterator<std::vector< candidate_action_ptr > > b );
00042
00043
00044
00045
00046
00047 virtual void do_parse_stage_from_config( ai_context &context, const config &cfg, std::back_insert_iterator<std::vector< stage_ptr > > b );
00048
00049
00050
00051
00052
00053 virtual void do_parse_aspect_from_config( const config &cfg, const std::string &id, std::back_insert_iterator<std::vector< aspect_ptr > > b );
00054
00055 virtual void do_parse_goal_from_config(const config &cfg, std::back_insert_iterator<std::vector< goal_ptr > > b );
00056
00057 virtual std::string evaluate(const std::string &str);
00058
00059
00060
00061
00062 virtual config to_config() const;
00063
00064
00065
00066
00067
00068
00069
00070
00071 private:
00072
00073
00074
00075
00076 std::string code_;
00077
00078
00079 boost::shared_ptr<lua_ai_context> lua_ai_context_;
00080
00081 };
00082
00083 }
00084
00085 #endif