X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2Fsubmodel.hxx;h=71ba8693df25ad71f811a6b55d9cd201a9cf6379;hb=38226af24ec01e8f0a20d7fd73ef838a69f6ef25;hp=2abff45ce9ab621ecf76263a15262c04ce50ac84;hpb=9e44be1df7d01515c1dc4a2cda9e340d00c4b887;p=flightgear.git diff --git a/src/AIModel/submodel.hxx b/src/AIModel/submodel.hxx index 2abff45ce..71ba8693d 100644 --- a/src/AIModel/submodel.hxx +++ b/src/AIModel/submodel.hxx @@ -13,17 +13,13 @@ #include #include -#include +#include + #include #include -#include
- -using std::vector; -using std::string; -using std::list; - class FGAIBase; +class FGAIManager; class FGSubmodelMgr : public SGSubsystem, public SGPropertyChangeListener { @@ -37,8 +33,8 @@ public: SGPropertyNode_ptr submodel_node; SGPropertyNode_ptr speed_node; - string name; - string model; + std::string name; + std::string model; double speed; bool slaved; bool repeat; @@ -68,13 +64,13 @@ public: bool collision; bool expiry; bool impact; - string impact_report; + std::string impact_report; double fuse_range; - string submodel; + std::string submodel; int sub_id; bool force_stabilised; bool ext_force; - string force_path; + std::string force_path; } submodel; typedef struct { @@ -112,7 +108,7 @@ public: private: - typedef vector submodel_vector_type; + typedef std::vector submodel_vector_type; typedef submodel_vector_type::iterator submodel_vector_iterator; submodel_vector_type submodels; @@ -186,22 +182,17 @@ private: SGPropertyNode_ptr _path_node; SGPropertyNode_ptr _selected_ac; - - FGAIManager* ai; IC_struct IC; - - // A list of pointers to AI objects - typedef list > sm_list_type; - typedef sm_list_type::iterator sm_list_iterator; - typedef sm_list_type::const_iterator sm_list_const_iterator; - - sm_list_type sm_list; - - + + /** + * Helper to retrieve the AI manager, if it currently exists + */ + FGAIManager* aiManager(); + void loadAI(); void loadSubmodels(); - void setData(int id, string& path, bool serviceable); - void setSubData(int id, string& path, bool serviceable); + void setData(int id, std::string& path, bool serviceable); + void setSubData(int id, std::string& path, bool serviceable); void valueChanged (SGPropertyNode *); void transform(submodel *); void setParentNode(int parent_id);