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

#include <universalid.hpp>

Collaboration diagram for CSMWorld::UniversalId:

Public Types

enum  Class {
  Class_None = 0, Class_Record = 1, Class_RefRecord = 2, Class_SubRecord = 4,
  Class_RecordList = 8, Class_Collection = 16, Class_Transient = 32, Class_NonRecord = 64,
  Class_Resource = 128, Class_ResourceList = 256
}
 
enum  ArgumentType { ArgumentType_None, ArgumentType_Id, ArgumentType_Index }
 
enum  Type {
  Type_None = 0, Type_Globals, Type_Global, Type_VerificationResults,
  Type_Gmsts, Type_Gmst, Type_Skills, Type_Skill,
  Type_Classes, Type_Class, Type_Factions, Type_Faction,
  Type_Races, Type_Race, Type_Sounds, Type_Sound,
  Type_Scripts, Type_Script, Type_Regions, Type_Region,
  Type_Birthsigns, Type_Birthsign, Type_Spells, Type_Spell,
  Type_Cells, Type_Cell, Type_Cell_Missing, Type_Referenceables,
  Type_Referenceable, Type_Activator, Type_Potion, Type_Apparatus,
  Type_Armor, Type_Book, Type_Clothing, Type_Container,
  Type_Creature, Type_Door, Type_Ingredient, Type_CreatureLevelledList,
  Type_ItemLevelledList, Type_Light, Type_Lockpick, Type_Miscellaneous,
  Type_Npc, Type_Probe, Type_Repair, Type_Static,
  Type_Weapon, Type_References, Type_Reference, Type_RegionMap,
  Type_Filters, Type_Filter, Type_Topics, Type_Topic,
  Type_Journals, Type_Journal, Type_TopicInfos, Type_TopicInfo,
  Type_JournalInfos, Type_JournalInfo, Type_Scene, Type_Preview,
  Type_LoadErrorLog, Type_Enchantments, Type_Enchantment, Type_BodyParts,
  Type_BodyPart, Type_Meshes, Type_Mesh, Type_Icons,
  Type_Icon, Type_Musics, Type_Music, Type_SoundsRes,
  Type_SoundRes, Type_Textures, Type_Texture, Type_Videos,
  Type_Video, Type_DebugProfiles, Type_DebugProfile, Type_SoundGens,
  Type_SoundGen, Type_MagicEffects, Type_MagicEffect, Type_Pathgrids,
  Type_Pathgrid, Type_StartScripts, Type_StartScript, Type_Search,
  Type_MetaDatas, Type_MetaData, Type_RunLog
}
 
enum  { NumberOfTypes = Type_RunLog+1 }
 

Public Member Functions

 UniversalId (const std::string &universalId)
 
 UniversalId (Type type=Type_None)
 
 UniversalId (Type type, const std::string &id)
 Using a type for a non-ID-argument UniversalId will throw an exception. More...
 
 UniversalId (Type type, int index)
 Using a type for a non-index-argument UniversalId will throw an exception. More...
 
Class getClass () const
 
ArgumentType getArgumentType () const
 
Type getType () const
 
const std::string & getId () const
 Calling this function for a non-ID type will throw an exception. More...
 
int getIndex () const
 Calling this function for a non-index type will throw an exception. More...
 
bool isEqual (const UniversalId &universalId) const
 
bool isLess (const UniversalId &universalId) const
 
std::string getTypeName () const
 
std::string toString () const
 
std::string getIcon () const
 Will return an empty string, if no icon is available. More...
 

Static Public Member Functions

static std::vector< TypelistReferenceableTypes ()
 
static std::vector< TypelistTypes (int classes)
 
static Type getParentType (Type type)
 

Private Attributes

Class mClass
 
ArgumentType mArgumentType
 
Type mType
 
std::string mId
 
int mIndex
 

Member Enumeration Documentation

anonymous enum
Enumerator
NumberOfTypes 
Enumerator
ArgumentType_None 
ArgumentType_Id 
ArgumentType_Index 
Enumerator
Class_None 
Class_Record 
Class_RefRecord 
Class_SubRecord 
Class_RecordList 
Class_Collection 
Class_Transient 
Class_NonRecord 
Class_Resource 
Attention
Resource IDs are unique only within the
Class_ResourceList 

respective collection

Note
A record list type must always be immediately followed by the matching record type, if this type is of class SubRecord or Record.
Enumerator
Type_None 
Type_Globals 
Type_Global 
Type_VerificationResults 
Type_Gmsts 
Type_Gmst 
Type_Skills 
Type_Skill 
Type_Classes 
Type_Class 
Type_Factions 
Type_Faction 
Type_Races 
Type_Race 
Type_Sounds 
Type_Sound 
Type_Scripts 
Type_Script 
Type_Regions 
Type_Region 
Type_Birthsigns 
Type_Birthsign 
Type_Spells 
Type_Spell 
Type_Cells 
Type_Cell 
Type_Cell_Missing 
Type_Referenceables 
Type_Referenceable 
Type_Activator 
Type_Potion 
Type_Apparatus 
Type_Armor 
Type_Book 
Type_Clothing 
Type_Container 
Type_Creature 
Type_Door 
Type_Ingredient 
Type_CreatureLevelledList 
Type_ItemLevelledList 
Type_Light 
Type_Lockpick 
Type_Miscellaneous 
Type_Npc 
Type_Probe 
Type_Repair 
Type_Static 
Type_Weapon 
Type_References 
Type_Reference 
Type_RegionMap 
Type_Filters 
Type_Filter 
Type_Topics 
Type_Topic 
Type_Journals 
Type_Journal 
Type_TopicInfos 
Type_TopicInfo 
Type_JournalInfos 
Type_JournalInfo 
Type_Scene 
Type_Preview 
Type_LoadErrorLog 
Type_Enchantments 
Type_Enchantment 
Type_BodyParts 
Type_BodyPart 
Type_Meshes 
Type_Mesh 
Type_Icons 
Type_Icon 
Type_Musics 
Type_Music 
Type_SoundsRes 
Type_SoundRes 
Type_Textures 
Type_Texture 
Type_Videos 
Type_Video 
Type_DebugProfiles 
Type_DebugProfile 
Type_SoundGens 
Type_SoundGen 
Type_MagicEffects 
Type_MagicEffect 
Type_Pathgrids 
Type_Pathgrid 
Type_StartScripts 
Type_StartScript 
Type_Search 
Type_MetaDatas 
Type_MetaData 
Type_RunLog 

Constructor & Destructor Documentation

CSMWorld::UniversalId::UniversalId ( const std::string &  universalId)
CSMWorld::UniversalId::UniversalId ( Type  type = Type_None)
CSMWorld::UniversalId::UniversalId ( Type  type,
const std::string &  id 
)

Using a type for a non-ID-argument UniversalId will throw an exception.

CSMWorld::UniversalId::UniversalId ( Type  type,
int  index 
)

Using a type for a non-index-argument UniversalId will throw an exception.

Member Function Documentation

CSMWorld::UniversalId::ArgumentType CSMWorld::UniversalId::getArgumentType ( ) const
CSMWorld::UniversalId::Class CSMWorld::UniversalId::getClass ( ) const
std::string CSMWorld::UniversalId::getIcon ( ) const

Will return an empty string, if no icon is available.

Here is the caller graph for this function:

const std::string & CSMWorld::UniversalId::getId ( ) const

Calling this function for a non-ID type will throw an exception.

Here is the caller graph for this function:

int CSMWorld::UniversalId::getIndex ( ) const

Calling this function for a non-index type will throw an exception.

Here is the caller graph for this function:

CSMWorld::UniversalId::Type CSMWorld::UniversalId::getParentType ( Type  type)
static

If type is a SubRecord, RefRecord or Record type return the type of the table that contains records of type type. Otherwise return Type_None.

Here is the caller graph for this function:

CSMWorld::UniversalId::Type CSMWorld::UniversalId::getType ( ) const

Here is the caller graph for this function:

std::string CSMWorld::UniversalId::getTypeName ( ) const

Here is the caller graph for this function:

bool CSMWorld::UniversalId::isEqual ( const UniversalId universalId) const

Here is the caller graph for this function:

bool CSMWorld::UniversalId::isLess ( const UniversalId universalId) const

Here is the caller graph for this function:

std::vector< CSMWorld::UniversalId::Type > CSMWorld::UniversalId::listReferenceableTypes ( )
static

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< CSMWorld::UniversalId::Type > CSMWorld::UniversalId::listTypes ( int  classes)
static

Here is the call graph for this function:

Here is the caller graph for this function:

std::string CSMWorld::UniversalId::toString ( ) const

Here is the caller graph for this function:

Member Data Documentation

ArgumentType CSMWorld::UniversalId::mArgumentType
private
Class CSMWorld::UniversalId::mClass
private
std::string CSMWorld::UniversalId::mId
private
int CSMWorld::UniversalId::mIndex
private
Type CSMWorld::UniversalId::mType
private

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