OpenMW
apps/openmw/mwdialogue/selectwrapper.hpp
Go to the documentation of this file.
00001 #ifndef GAME_MWDIALOGUE_SELECTWRAPPER_H
00002 #define GAME_MWDIALOGUE_SELECTWRAPPER_H
00003 
00004 #include <components/esm/loadinfo.hpp>
00005 
00006 namespace MWDialogue
00007 {
00008     class SelectWrapper
00009     {
00010             const ESM::DialInfo::SelectStruct& mSelect;
00011 
00012         public:
00013 
00014             enum Function
00015             {
00016                 Function_None, Function_False,
00017                 Function_Journal,
00018                 Function_Item,
00019                 Function_Dead,
00020                 Function_NotId,
00021                 Function_NotFaction,
00022                 Function_NotClass,
00023                 Function_NotRace,
00024                 Function_NotCell,
00025                 Function_NotLocal,
00026                 Function_Local,
00027                 Function_Global,
00028                 Function_SameGender, Function_SameRace, Function_SameFaction,
00029                 Function_Choice,
00030                 Function_PcCommonDisease, Function_PcBlightDisease, Function_PcCorprus,
00031                 Function_AiSetting,
00032                 Function_PcAttribute, Function_PcSkill,
00033                 Function_PcExpelled,
00034                 Function_PcVampire,
00035                 Function_FriendlyHit,
00036                 Function_TalkedToPc,
00037                 Function_PcLevel, Function_PcHealthPercent, Function_PcDynamicStat,
00038                 Function_PcGender, Function_PcClothingModifier, Function_PcCrimeLevel,
00039                 Function_RankRequirement,
00040                 Function_HealthPercent, Function_Level, Function_PCReputation,
00041                 Function_Weather,
00042                 Function_Reputation, Function_Alarmed, Function_FactionRankDiff, Function_Detected,
00043                 Function_Attacked, Function_ShouldAttack,
00044                 Function_CreatureTargetted,
00045                 Function_Werewolf, Function_WerewolfKills,
00046                 Function_RankLow, Function_RankHigh
00047             };
00048 
00049             enum Type
00050             {
00051                 Type_None,
00052                 Type_Integer,
00053                 Type_Numeric,
00054                 Type_Boolean,
00055                 Type_Inverted
00056             };
00057 
00058         private:
00059 
00060             Function decodeFunction() const;
00061 
00062         public:
00063 
00064             SelectWrapper (const ESM::DialInfo::SelectStruct& select);
00065 
00066             Function getFunction() const;
00067 
00068             int getArgument() const;
00069 
00070             Type getType() const;
00071 
00072             bool isNpcOnly() const;
00074 
00075             bool selectCompare (int value) const;
00076 
00077             bool selectCompare (float value) const;
00078 
00079             bool selectCompare (bool value) const;
00080 
00081             std::string getName() const;
00083     };
00084 }
00085 
00086 #endif