OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
referenceablecheck.hpp
Go to the documentation of this file.
1 #ifndef REFERENCEABLECHECKSTAGE_H
2 #define REFERENCEABLECHECKSTAGE_H
3 
4 #include "../world/universalid.hpp"
5 #include "../doc/stage.hpp"
6 #include "../world/data.hpp"
7 #include "../world/refiddata.hpp"
8 
9 namespace CSMTools
10 {
12  {
13  public:
14 
15  ReferenceableCheckStage (const CSMWorld::RefIdData& referenceable,
20 
21  virtual void perform(int stage, CSMDoc::Messages& messages);
22  virtual int setup();
23 
24  private:
25  //CONCRETE CHECKS
26  void bookCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Book >& records, CSMDoc::Messages& messages);
27  void activatorCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Activator >& records, CSMDoc::Messages& messages);
28  void potionCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Potion>& records, CSMDoc::Messages& messages);
29  void apparatusCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Apparatus>& records, CSMDoc::Messages& messages);
30  void armorCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Armor>& records, CSMDoc::Messages& messages);
31  void clothingCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Clothing>& records, CSMDoc::Messages& messages);
32  void containerCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Container>& records, CSMDoc::Messages& messages);
33  void creatureCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Creature>& records, CSMDoc::Messages& messages);
34  void doorCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Door>& records, CSMDoc::Messages& messages);
35  void ingredientCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Ingredient>& records, CSMDoc::Messages& messages);
38  void lightCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Light>& records, CSMDoc::Messages& messages);
39  void lockpickCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Lockpick>& records, CSMDoc::Messages& messages);
40  void miscCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Miscellaneous>& records, CSMDoc::Messages& messages);
41  void npcCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::NPC>& records, CSMDoc::Messages& messages);
42  void weaponCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Weapon>& records, CSMDoc::Messages& messages);
43  void probeCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Probe>& records, CSMDoc::Messages& messages);
44  void repairCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Repair>& records, CSMDoc::Messages& messages);
45  void staticCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Static>& records, CSMDoc::Messages& messages);
46 
47  //FINAL CHECK
48  void finalCheck (CSMDoc::Messages& messages);
49 
50  //Convenience functions
51  void inventoryListCheck(const std::vector<ESM::ContItem>& itemList, CSMDoc::Messages& messages, const std::string& id);
52 
53  template<typename ITEM> void inventoryItemCheck(const ITEM& someItem,
54  CSMDoc::Messages& messages,
55  const std::string& someID,
56  bool enchantable); //for all enchantable items.
57 
58  template<typename ITEM> void inventoryItemCheck(const ITEM& someItem,
59  CSMDoc::Messages& messages,
60  const std::string& someID); //for non-enchantable items.
61 
62  template<typename TOOL> void toolCheck(const TOOL& someTool,
63  CSMDoc::Messages& messages,
64  const std::string& someID,
65  bool canbebroken); //for tools with uses.
66 
67  template<typename TOOL> void toolCheck(const TOOL& someTool,
68  CSMDoc::Messages& messages,
69  const std::string& someID); //for tools without uses.
70 
71  template<typename LIST> void listCheck(const LIST& someList,
72  CSMDoc::Messages& messages,
73  const std::string& someID);
74 
75  template<typename TOOL> void scriptCheck(const TOOL& someTool,
76  CSMDoc::Messages& messages,
77  const std::string& someID);
78 
85  };
86 }
87 #endif // REFERENCEABLECHECKSTAGE_H
const CSMWorld::IdCollection< ESM::Class > & mClasses
Definition: referenceablecheck.hpp:81
ReferenceableCheckStage(const CSMWorld::RefIdData &referenceable, const CSMWorld::IdCollection< ESM::Race > &races, const CSMWorld::IdCollection< ESM::Class > &classes, const CSMWorld::IdCollection< ESM::Faction > &factions, const CSMWorld::IdCollection< ESM::Script > &scripts)
Definition: referenceablecheck.cpp:8
const CSMWorld::IdCollection< ESM::Script > & mScripts
Definition: referenceablecheck.hpp:83
void inventoryListCheck(const std::vector< ESM::ContItem > &itemList, CSMDoc::Messages &messages, const std::string &id)
Definition: referenceablecheck.cpp:903
const CSMWorld::IdCollection< ESM::Race > & mRaces
Definition: referenceablecheck.hpp:80
void listCheck(const LIST &someList, CSMDoc::Messages &messages, const std::string &someID)
bool mPlayerPresent
Definition: referenceablecheck.hpp:84
void weaponCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Weapon > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:758
void apparatusCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Apparatus > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:301
Definition: refiddata.hpp:219
void staticCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Static > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:878
void bookCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Book > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:234
void npcCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::NPC > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:635
Definition: messages.hpp:38
virtual void perform(int stage, CSMDoc::Messages &messages)
Messages resulting from this stage will be appended to messages.
Definition: referenceablecheck.cpp:23
Definition: referenceablecheck.hpp:11
void armorCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Armor > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:324
void doorCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Door > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:484
void miscCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Miscellaneous > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:614
void creatureCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Creature > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:408
void inventoryItemCheck(const ITEM &someItem, CSMDoc::Messages &messages, const std::string &someID, bool enchantable)
virtual int setup()
Definition: referenceablecheck.cpp:228
void toolCheck(const TOOL &someTool, CSMDoc::Messages &messages, const std::string &someID, bool canbebroken)
Definition: stage.hpp:15
void finalCheck(CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:896
void creaturesLevListCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::CreatureLevList > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:528
void containerCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Container > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:373
void potionCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Potion > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:278
void lightCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Light > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:564
void scriptCheck(const TOOL &someTool, CSMDoc::Messages &messages, const std::string &someID)
const CSMWorld::IdCollection< ESM::Faction > & mFactions
Definition: referenceablecheck.hpp:82
void activatorCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Activator > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:255
void ingredientCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Ingredient > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:507
void itemLevelledListCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::ItemLevList > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:546
void probeCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Probe > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:837
void repairCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Repair > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:859
void clothingCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Clothing > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:353
void lockpickCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Lockpick > &records, CSMDoc::Messages &messages)
Definition: referenceablecheck.cpp:591
const CSMWorld::RefIdData & mReferencables
Definition: referenceablecheck.hpp:79