OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
CSMWorld::ConstInfoSelectWrapper Class Reference

#include <infoselectwrapper.hpp>

Inheritance diagram for CSMWorld::ConstInfoSelectWrapper:
Collaboration diagram for CSMWorld::ConstInfoSelectWrapper:

Public Types

enum  FunctionName {
  Function_RankLow =0, Function_RankHigh, Function_RankRequirement, Function_Reputation,
  Function_Health_Percent, Function_PcReputation, Function_PcLevel, Function_PcHealthPercent,
  Function_PcMagicka, Function_PcFatigue, Function_PcStrength, Function_PcBlock,
  Function_PcArmorer, Function_PcMediumArmor, Function_PcHeavyArmor, Function_PcBluntWeapon,
  Function_PcLongBlade, Function_PcAxe, Function_PcSpear, Function_PcAthletics,
  Function_PcEnchant, Function_PcDestruction, Function_PcAlteration, Function_PcIllusion,
  Function_PcConjuration, Function_PcMysticism, Function_PcRestoration, Function_PcAlchemy,
  Function_PcUnarmored, Function_PcSecurity, Function_PcSneak, Function_PcAcrobatics,
  Function_PcLightArmor, Function_PcShortBlade, Function_PcMarksman, Function_PcMerchantile,
  Function_PcSpeechcraft, Function_PcHandToHand, Function_PcGender, Function_PcExpelled,
  Function_PcCommonDisease, Function_PcBlightDisease, Function_PcClothingModifier, Function_PcCrimeLevel,
  Function_SameSex, Function_SameRace, Function_SameFaction, Function_FactionRankDifference,
  Function_Detected, Function_Alarmed, Function_Choice, Function_PcIntelligence,
  Function_PcWillpower, Function_PcAgility, Function_PcSpeed, Function_PcEndurance,
  Function_PcPersonality, Function_PcLuck, Function_PcCorpus, Function_Weather,
  Function_PcVampire, Function_Level, Function_Attacked, Function_TalkedToPc,
  Function_PcHealth, Function_CreatureTarget, Function_FriendHit, Function_Fight,
  Function_Hello, Function_Alarm, Function_Flee, Function_ShouldAttack,
  Function_Werewolf, Function_PcWerewolfKills =73, Function_Global, Function_Local,
  Function_Journal, Function_Item, Function_Dead, Function_NotId,
  Function_NotFaction, Function_NotClass, Function_NotRace, Function_NotCell,
  Function_NotLocal, Function_None
}
 
enum  RelationType {
  Relation_Equal, Relation_NotEqual, Relation_Greater, Relation_GreaterOrEqual,
  Relation_Less, Relation_LessOrEqual, Relation_None
}
 
enum  ComparisonType { Comparison_Boolean, Comparison_Integer, Comparison_Numeric, Comparison_None }
 

Public Member Functions

 ConstInfoSelectWrapper (const ESM::DialInfo::SelectStruct &select)
 
FunctionName getFunctionName () const
 
RelationType getRelationType () const
 
ComparisonType getComparisonType () const
 
bool hasVariable () const
 
const std::string & getVariableName () const
 
bool conditionIsAlwaysTrue () const
 
bool conditionIsNeverTrue () const
 
bool variantTypeIsValid () const
 
const ESM::VariantgetVariant () const
 
std::string toString () const
 
template<typename T1 , typename T2 >
bool rangeContains (T1 value, std::pair< T2, T2 > range) const
 
template<typename T1 , typename T2 >
bool rangeFullyContains (std::pair< T1, T1 > containingRange, std::pair< T2, T2 > testRange) const
 
template<typename T1 , typename T2 >
bool rangesOverlap (std::pair< T1, T1 > range1, std::pair< T2, T2 > range2) const
 
template<typename T1 , typename T2 >
bool rangesMatch (std::pair< T1, T1 > range1, std::pair< T2, T2 > range2) const
 
template<typename T1 , typename T2 >
bool conditionIsAlwaysTrue (std::pair< T1, T1 > conditionRange, std::pair< T2, T2 > validRange) const
 
template<typename T1 , typename T2 >
bool conditionIsNeverTrue (std::pair< T1, T1 > conditionRange, std::pair< T2, T2 > validRange) const
 

Static Public Member Functions

static std::string convertToString (FunctionName name)
 
static std::string convertToString (RelationType type)
 
static std::string convertToString (ComparisonType type)
 

Static Public Attributes

static const size_t RuleMinSize = 5
 
static const size_t FunctionPrefixOffset = 1
 
static const size_t FunctionIndexOffset = 2
 
static const size_t RelationIndexOffset = 4
 
static const size_t VarNameOffset = 5
 
static const char * FunctionEnumStrings []
 
static const char * RelationEnumStrings []
 
static const char * ComparisonEnumStrings []
 

Protected Member Functions

void readRule ()
 
void readFunctionName ()
 
void readRelationType ()
 
void readVariableName ()
 
void updateHasVariable ()
 
void updateComparisonType ()
 
std::pair< int, intgetConditionIntRange () const
 
std::pair< float, float > getConditionFloatRange () const
 
std::pair< int, intgetValidIntRange () const
 
std::pair< float, float > getValidFloatRange () const
 
template<typename Type1 , typename Type2 >
bool rangeContains (Type1 value, std::pair< Type2, Type2 > range) const
 
template<typename Type1 , typename Type2 >
bool rangesOverlap (std::pair< Type1, Type1 > range1, std::pair< Type2, Type2 > range2) const
 
template<typename Type1 , typename Type2 >
bool rangeFullyContains (std::pair< Type1, Type1 > containing, std::pair< Type2, Type2 > test) const
 
template<typename Type1 , typename Type2 >
bool rangesMatch (std::pair< Type1, Type1 > range1, std::pair< Type2, Type2 > range2) const
 
template<typename Type1 , typename Type2 >
bool conditionIsAlwaysTrue (std::pair< Type1, Type1 > conditionRange, std::pair< Type2, Type2 > validRange) const
 
template<typename Type1 , typename Type2 >
bool conditionIsNeverTrue (std::pair< Type1, Type1 > conditionRange, std::pair< Type2, Type2 > validRange) const
 

Protected Attributes

FunctionName mFunctionName
 
RelationType mRelationType
 
ComparisonType mComparisonType
 
bool mHasVariable
 
std::string mVariableName
 

Private Attributes

const ESM::DialInfo::SelectStructmConstSelect
 

Member Enumeration Documentation

Enumerator
Comparison_Boolean 
Comparison_Integer 
Comparison_Numeric 
Comparison_None 
Enumerator
Function_RankLow 
Function_RankHigh 
Function_RankRequirement 
Function_Reputation 
Function_Health_Percent 
Function_PcReputation 
Function_PcLevel 
Function_PcHealthPercent 
Function_PcMagicka 
Function_PcFatigue 
Function_PcStrength 
Function_PcBlock 
Function_PcArmorer 
Function_PcMediumArmor 
Function_PcHeavyArmor 
Function_PcBluntWeapon 
Function_PcLongBlade 
Function_PcAxe 
Function_PcSpear 
Function_PcAthletics 
Function_PcEnchant 
Function_PcDestruction 
Function_PcAlteration 
Function_PcIllusion 
Function_PcConjuration 
Function_PcMysticism 
Function_PcRestoration 
Function_PcAlchemy 
Function_PcUnarmored 
Function_PcSecurity 
Function_PcSneak 
Function_PcAcrobatics 
Function_PcLightArmor 
Function_PcShortBlade 
Function_PcMarksman 
Function_PcMerchantile 
Function_PcSpeechcraft 
Function_PcHandToHand 
Function_PcGender 
Function_PcExpelled 
Function_PcCommonDisease 
Function_PcBlightDisease 
Function_PcClothingModifier 
Function_PcCrimeLevel 
Function_SameSex 
Function_SameRace 
Function_SameFaction 
Function_FactionRankDifference 
Function_Detected 
Function_Alarmed 
Function_Choice 
Function_PcIntelligence 
Function_PcWillpower 
Function_PcAgility 
Function_PcSpeed 
Function_PcEndurance 
Function_PcPersonality 
Function_PcLuck 
Function_PcCorpus 
Function_Weather 
Function_PcVampire 
Function_Level 
Function_Attacked 
Function_TalkedToPc 
Function_PcHealth 
Function_CreatureTarget 
Function_FriendHit 
Function_Fight 
Function_Hello 
Function_Alarm 
Function_Flee 
Function_ShouldAttack 
Function_Werewolf 
Function_PcWerewolfKills 
Function_Global 
Function_Local 
Function_Journal 
Function_Item 
Function_Dead 
Function_NotId 
Function_NotFaction 
Function_NotClass 
Function_NotRace 
Function_NotCell 
Function_NotLocal 
Function_None 
Enumerator
Relation_Equal 
Relation_NotEqual 
Relation_Greater 
Relation_GreaterOrEqual 
Relation_Less 
Relation_LessOrEqual 
Relation_None 

Constructor & Destructor Documentation

CSMWorld::ConstInfoSelectWrapper::ConstInfoSelectWrapper ( const ESM::DialInfo::SelectStruct select)

Here is the call graph for this function:

Member Function Documentation

bool CSMWorld::ConstInfoSelectWrapper::conditionIsAlwaysTrue ( ) const

Here is the caller graph for this function:

template<typename Type1 , typename Type2 >
bool CSMWorld::ConstInfoSelectWrapper::conditionIsAlwaysTrue ( std::pair< Type1, Type1 >  conditionRange,
std::pair< Type2, Type2 >  validRange 
) const
protected
template<typename T1 , typename T2 >
bool CSMWorld::ConstInfoSelectWrapper::conditionIsAlwaysTrue ( std::pair< T1, T1 >  conditionRange,
std::pair< T2, T2 >  validRange 
) const
bool CSMWorld::ConstInfoSelectWrapper::conditionIsNeverTrue ( ) const

Here is the caller graph for this function:

template<typename Type1 , typename Type2 >
bool CSMWorld::ConstInfoSelectWrapper::conditionIsNeverTrue ( std::pair< Type1, Type1 >  conditionRange,
std::pair< Type2, Type2 >  validRange 
) const
protected
template<typename T1 , typename T2 >
bool CSMWorld::ConstInfoSelectWrapper::conditionIsNeverTrue ( std::pair< T1, T1 >  conditionRange,
std::pair< T2, T2 >  validRange 
) const
std::string CSMWorld::ConstInfoSelectWrapper::convertToString ( FunctionName  name)
static
std::string CSMWorld::ConstInfoSelectWrapper::convertToString ( RelationType  type)
static
std::string CSMWorld::ConstInfoSelectWrapper::convertToString ( ComparisonType  type)
static
CSMWorld::ConstInfoSelectWrapper::ComparisonType CSMWorld::ConstInfoSelectWrapper::getComparisonType ( ) const

Here is the caller graph for this function:

std::pair< float, float > CSMWorld::ConstInfoSelectWrapper::getConditionFloatRange ( ) const
protected
std::pair< int, int > CSMWorld::ConstInfoSelectWrapper::getConditionIntRange ( ) const
protected
CSMWorld::ConstInfoSelectWrapper::FunctionName CSMWorld::ConstInfoSelectWrapper::getFunctionName ( ) const

Here is the caller graph for this function:

CSMWorld::ConstInfoSelectWrapper::RelationType CSMWorld::ConstInfoSelectWrapper::getRelationType ( ) const

Here is the caller graph for this function:

std::pair< float, float > CSMWorld::ConstInfoSelectWrapper::getValidFloatRange ( ) const
protected
std::pair< int, int > CSMWorld::ConstInfoSelectWrapper::getValidIntRange ( ) const
protected
const std::string & CSMWorld::ConstInfoSelectWrapper::getVariableName ( ) const

Here is the caller graph for this function:

const ESM::Variant & CSMWorld::ConstInfoSelectWrapper::getVariant ( ) const

Here is the caller graph for this function:

bool CSMWorld::ConstInfoSelectWrapper::hasVariable ( ) const

Here is the caller graph for this function:

template<typename Type1 , typename Type2 >
bool CSMWorld::ConstInfoSelectWrapper::rangeContains ( Type1  value,
std::pair< Type2, Type2 >  range 
) const
protected
template<typename T1 , typename T2 >
bool CSMWorld::ConstInfoSelectWrapper::rangeContains ( T1  value,
std::pair< T2, T2 >  range 
) const
template<typename Type1 , typename Type2 >
bool CSMWorld::ConstInfoSelectWrapper::rangeFullyContains ( std::pair< Type1, Type1 >  containing,
std::pair< Type2, Type2 >  test 
) const
protected
template<typename T1 , typename T2 >
bool CSMWorld::ConstInfoSelectWrapper::rangeFullyContains ( std::pair< T1, T1 >  containingRange,
std::pair< T2, T2 >  testRange 
) const
template<typename Type1 , typename Type2 >
bool CSMWorld::ConstInfoSelectWrapper::rangesMatch ( std::pair< Type1, Type1 >  range1,
std::pair< Type2, Type2 >  range2 
) const
protected
template<typename T1 , typename T2 >
bool CSMWorld::ConstInfoSelectWrapper::rangesMatch ( std::pair< T1, T1 >  range1,
std::pair< T2, T2 >  range2 
) const
template<typename Type1 , typename Type2 >
bool CSMWorld::ConstInfoSelectWrapper::rangesOverlap ( std::pair< Type1, Type1 >  range1,
std::pair< Type2, Type2 >  range2 
) const
protected
template<typename T1 , typename T2 >
bool CSMWorld::ConstInfoSelectWrapper::rangesOverlap ( std::pair< T1, T1 >  range1,
std::pair< T2, T2 >  range2 
) const
void CSMWorld::ConstInfoSelectWrapper::readFunctionName ( )
protected
void CSMWorld::ConstInfoSelectWrapper::readRelationType ( )
protected
void CSMWorld::ConstInfoSelectWrapper::readRule ( )
protected

Here is the caller graph for this function:

void CSMWorld::ConstInfoSelectWrapper::readVariableName ( )
protected
std::string CSMWorld::ConstInfoSelectWrapper::toString ( ) const

Here is the caller graph for this function:

void CSMWorld::ConstInfoSelectWrapper::updateComparisonType ( )
protected
void CSMWorld::ConstInfoSelectWrapper::updateHasVariable ( )
protected
bool CSMWorld::ConstInfoSelectWrapper::variantTypeIsValid ( ) const

Here is the caller graph for this function:

Member Data Documentation

const char * CSMWorld::ConstInfoSelectWrapper::ComparisonEnumStrings
static
Initial value:
=
{
"Boolean",
"Integer",
"Numeric",
0
}
const char * CSMWorld::ConstInfoSelectWrapper::FunctionEnumStrings
static
const size_t CSMWorld::ConstInfoSelectWrapper::FunctionIndexOffset = 2
static
const size_t CSMWorld::ConstInfoSelectWrapper::FunctionPrefixOffset = 1
static
ComparisonType CSMWorld::ConstInfoSelectWrapper::mComparisonType
protected
const ESM::DialInfo::SelectStruct& CSMWorld::ConstInfoSelectWrapper::mConstSelect
private
FunctionName CSMWorld::ConstInfoSelectWrapper::mFunctionName
protected
bool CSMWorld::ConstInfoSelectWrapper::mHasVariable
protected
RelationType CSMWorld::ConstInfoSelectWrapper::mRelationType
protected
std::string CSMWorld::ConstInfoSelectWrapper::mVariableName
protected
const char * CSMWorld::ConstInfoSelectWrapper::RelationEnumStrings
static
Initial value:
=
{
"=",
"!=",
">",
">=",
"<",
"<=",
0
}
const size_t CSMWorld::ConstInfoSelectWrapper::RelationIndexOffset = 4
static
const size_t CSMWorld::ConstInfoSelectWrapper::RuleMinSize = 5
static
const size_t CSMWorld::ConstInfoSelectWrapper::VarNameOffset = 5
static

The documentation for this class was generated from the following files: