Line | |
---|
1 | /*! |
---|
2 | * @file campaign_data.h |
---|
3 | * definition of the campaign data tank |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _CAMPAIGN_DATA_H |
---|
7 | #define _CAMPAIGN_DATA_H |
---|
8 | |
---|
9 | |
---|
10 | #include "data_tank.h" |
---|
11 | #include <list> |
---|
12 | |
---|
13 | class StoryEntity; |
---|
14 | |
---|
15 | //! A class that contains the data of the Campaign object |
---|
16 | class CampaignData : public DataTank |
---|
17 | { |
---|
18 | ObjectListDeclaration(CampaignData); |
---|
19 | |
---|
20 | public: |
---|
21 | CampaignData(const TiXmlElement* root); |
---|
22 | virtual ~CampaignData(); |
---|
23 | |
---|
24 | virtual void loadParams(const TiXmlElement* root); |
---|
25 | |
---|
26 | void addStoryEntity(StoryEntity* se); |
---|
27 | |
---|
28 | StoryEntity* getFirstLevel(); |
---|
29 | StoryEntity* getNextLevel(); |
---|
30 | StoryEntity* getLevel(int storyID); |
---|
31 | |
---|
32 | /** @param storyEntity the current entity to be set */ |
---|
33 | inline void setCurrentEntity(StoryEntity* storyEntity) { this->currentEntity = storyEntity; } |
---|
34 | /** @return the current StoryEntity played*/ |
---|
35 | inline StoryEntity* getCurrentEntity() { return this->currentEntity; } |
---|
36 | |
---|
37 | private: |
---|
38 | void loadDataDyn(const TiXmlElement* root); |
---|
39 | |
---|
40 | private: |
---|
41 | StoryEntity* currentEntity; //!< reference to the currently used StoryEntity |
---|
42 | std::list<StoryEntity*> storyEntities; //!< list of story entities |
---|
43 | }; |
---|
44 | |
---|
45 | |
---|
46 | #endif /* _CAMPAIGN_DATA_H */ |
---|
47 | |
---|
Note: See
TracBrowser
for help on using the repository browser.