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

#include <data.hpp>

Inheritance diagram for CSMWorld::Data:
Collaboration diagram for CSMWorld::Data:

Signals

void idListChanged ()
 

Public Member Functions

 Data (ToUTF8::FromType encoding, const ResourcesManager &resourcesManager, const Fallback::Map *fallback, const boost::filesystem::path &resDir)
 
virtual ~Data ()
 
const VFS::ManagergetVFS () const
 
const Fallback::MapgetFallbackMap () const
 
boost::shared_ptr
< Resource::ResourceSystem
getResourceSystem ()
 
boost::shared_ptr< const
Resource::ResourceSystem
getResourceSystem () const
 
const IdCollection< ESM::Global > & getGlobals () const
 
IdCollection< ESM::Global > & getGlobals ()
 
const IdCollection
< ESM::GameSetting > & 
getGmsts () const
 
IdCollection< ESM::GameSetting > & getGmsts ()
 
const IdCollection< ESM::Skill > & getSkills () const
 
IdCollection< ESM::Skill > & getSkills ()
 
const IdCollection< ESM::Class > & getClasses () const
 
IdCollection< ESM::Class > & getClasses ()
 
const IdCollection
< ESM::Faction > & 
getFactions () const
 
IdCollection< ESM::Faction > & getFactions ()
 
const IdCollection< ESM::Race > & getRaces () const
 
IdCollection< ESM::Race > & getRaces ()
 
const IdCollection< ESM::Sound > & getSounds () const
 
IdCollection< ESM::Sound > & getSounds ()
 
const IdCollection< ESM::Script > & getScripts () const
 
IdCollection< ESM::Script > & getScripts ()
 
const IdCollection< ESM::Region > & getRegions () const
 
IdCollection< ESM::Region > & getRegions ()
 
const IdCollection
< ESM::BirthSign > & 
getBirthsigns () const
 
IdCollection< ESM::BirthSign > & getBirthsigns ()
 
const IdCollection< ESM::Spell > & getSpells () const
 
IdCollection< ESM::Spell > & getSpells ()
 
const IdCollection
< ESM::Dialogue > & 
getTopics () const
 
IdCollection< ESM::Dialogue > & getTopics ()
 
const IdCollection
< ESM::Dialogue > & 
getJournals () const
 
IdCollection< ESM::Dialogue > & getJournals ()
 
const InfoCollectiongetTopicInfos () const
 
InfoCollectiongetTopicInfos ()
 
const InfoCollectiongetJournalInfos () const
 
InfoCollectiongetJournalInfos ()
 
const IdCollection< Cell > & getCells () const
 
IdCollection< Cell > & getCells ()
 
const RefIdCollectiongetReferenceables () const
 
RefIdCollectiongetReferenceables ()
 
const RefCollectiongetReferences () const
 
RefCollectiongetReferences ()
 
const IdCollection< ESM::Filter > & getFilters () const
 
IdCollection< ESM::Filter > & getFilters ()
 
const IdCollection
< ESM::Enchantment > & 
getEnchantments () const
 
IdCollection< ESM::Enchantment > & getEnchantments ()
 
const IdCollection
< ESM::BodyPart > & 
getBodyParts () const
 
IdCollection< ESM::BodyPart > & getBodyParts ()
 
const IdCollection
< ESM::DebugProfile > & 
getDebugProfiles () const
 
IdCollection< ESM::DebugProfile > & getDebugProfiles ()
 
const IdCollection
< CSMWorld::Land > & 
getLand () const
 
IdCollection< CSMWorld::Land > & getLand ()
 
const IdCollection
< CSMWorld::LandTexture > & 
getLandTextures () const
 
IdCollection
< CSMWorld::LandTexture > & 
getLandTextures ()
 
const IdCollection
< ESM::SoundGenerator > & 
getSoundGens () const
 
IdCollection
< ESM::SoundGenerator > & 
getSoundGens ()
 
const IdCollection
< ESM::MagicEffect > & 
getMagicEffects () const
 
IdCollection< ESM::MagicEffect > & getMagicEffects ()
 
const SubCellCollection
< Pathgrid > & 
getPathgrids () const
 
SubCellCollection< Pathgrid > & getPathgrids ()
 
const IdCollection
< ESM::StartScript > & 
getStartScripts () const
 
IdCollection< ESM::StartScript > & getStartScripts ()
 
const ResourcesgetResources (const UniversalId &id) const
 Throws an exception, if id does not match a resources list. More...
 
const MetaDatagetMetaData () const
 
void setMetaData (const MetaData &metaData)
 
QAbstractItemModelgetTableModel (const UniversalId &id)
 
void merge ()
 Merge modified into base. More...
 
int startLoading (const boost::filesystem::path &path, bool base, bool project)
 
bool continueLoading (CSMDoc::Messages &messages)
 
bool hasId (const std::string &id) const
 
std::vector< std::string > getIds (bool listDeleted=true) const
 
int count (RecordBase::State state) const
 Return number of top-level records with the given state. More...
 

Private Slots

void dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
void rowsChanged (const QModelIndex &parent, int start, int end)
 

Private Member Functions

 Data (const Data &)
 
Dataoperator= (const Data &)
 
void addModel (QAbstractItemModel *model, UniversalId::Type type, bool update=true)
 

Static Private Member Functions

static void appendIds (std::vector< std::string > &ids, const CollectionBase &collection, bool listDeleted)
 Append all IDs from collection to ids. More...
 
static int count (RecordBase::State state, const CollectionBase &collection)
 

Private Attributes

ToUTF8::Utf8Encoder mEncoder
 
IdCollection< ESM::GlobalmGlobals
 
IdCollection< ESM::GameSettingmGmsts
 
IdCollection< ESM::SkillmSkills
 
IdCollection< ESM::ClassmClasses
 
NestedIdCollection< ESM::FactionmFactions
 
NestedIdCollection< ESM::RacemRaces
 
IdCollection< ESM::SoundmSounds
 
IdCollection< ESM::ScriptmScripts
 
NestedIdCollection< ESM::RegionmRegions
 
NestedIdCollection
< ESM::BirthSign
mBirthsigns
 
NestedIdCollection< ESM::SpellmSpells
 
IdCollection< ESM::DialoguemTopics
 
IdCollection< ESM::DialoguemJournals
 
NestedIdCollection
< ESM::Enchantment
mEnchantments
 
IdCollection< ESM::BodyPartmBodyParts
 
IdCollection< ESM::MagicEffectmMagicEffects
 
SubCellCollection< PathgridmPathgrids
 
IdCollection< ESM::DebugProfilemDebugProfiles
 
IdCollection< ESM::SoundGeneratormSoundGens
 
IdCollection< ESM::StartScriptmStartScripts
 
NestedInfoCollection mTopicInfos
 
InfoCollection mJournalInfos
 
NestedIdCollection< CellmCells
 
IdCollection< LandTexturemLandTextures
 
IdCollection< LandmLand
 
RefIdCollection mReferenceables
 
RefCollection mRefs
 
IdCollection< ESM::FiltermFilters
 
Collection< MetaDatamMetaData
 
const ResourcesManagermResourcesManager
 
const Fallback::MapmFallbackMap
 
std::vector< QAbstractItemModel * > mModels
 
std::map< UniversalId::Type,
QAbstractItemModel * > 
mModelIndex
 
ESM::ESMReadermReader
 
const ESM::DialoguemDialogue
 
bool mBase
 
bool mProject
 
std::map< std::string,
std::map< ESM::RefNum,
std::string > > 
mRefLoadCache
 
int mReaderIndex
 
boost::shared_ptr
< Resource::ResourceSystem
mResourceSystem
 
std::vector< boost::shared_ptr
< ESM::ESMReader > > 
mReaders
 
std::map< std::string, intmContentFileNames
 

Constructor & Destructor Documentation

CSMWorld::Data::Data ( const Data )
private
CSMWorld::Data::Data ( ToUTF8::FromType  encoding,
const ResourcesManager resourcesManager,
const Fallback::Map fallback,
const boost::filesystem::path &  resDir 
)

Here is the call graph for this function:

CSMWorld::Data::~Data ( )
virtual

Member Function Documentation

void CSMWorld::Data::addModel ( QAbstractItemModel model,
UniversalId::Type  type,
bool  update = true 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::Data::appendIds ( std::vector< std::string > &  ids,
const CollectionBase collection,
bool  listDeleted 
)
staticprivate

Append all IDs from collection to ids.

Here is the call graph for this function:

bool CSMWorld::Data::continueLoading ( CSMDoc::Messages messages)
Returns
Finished?

Here is the call graph for this function:

Here is the caller graph for this function:

int CSMWorld::Data::count ( RecordBase::State  state,
const CollectionBase collection 
)
staticprivate

Here is the call graph for this function:

int CSMWorld::Data::count ( RecordBase::State  state) const

Return number of top-level records with the given state.

void CSMWorld::Data::dataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
privateslot

Here is the caller graph for this function:

const CSMWorld::IdCollection< ESM::BirthSign > & CSMWorld::Data::getBirthsigns ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::BirthSign > & CSMWorld::Data::getBirthsigns ( )
const CSMWorld::IdCollection< ESM::BodyPart > & CSMWorld::Data::getBodyParts ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::BodyPart > & CSMWorld::Data::getBodyParts ( )
const CSMWorld::IdCollection< CSMWorld::Cell > & CSMWorld::Data::getCells ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< CSMWorld::Cell > & CSMWorld::Data::getCells ( )
const CSMWorld::IdCollection< ESM::Class > & CSMWorld::Data::getClasses ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Class > & CSMWorld::Data::getClasses ( )
const CSMWorld::IdCollection< ESM::DebugProfile > & CSMWorld::Data::getDebugProfiles ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::DebugProfile > & CSMWorld::Data::getDebugProfiles ( )
const CSMWorld::IdCollection< ESM::Enchantment > & CSMWorld::Data::getEnchantments ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Enchantment > & CSMWorld::Data::getEnchantments ( )
const CSMWorld::IdCollection< ESM::Faction > & CSMWorld::Data::getFactions ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Faction > & CSMWorld::Data::getFactions ( )
const Fallback::Map * CSMWorld::Data::getFallbackMap ( ) const

Here is the caller graph for this function:

const CSMWorld::IdCollection< ESM::Filter > & CSMWorld::Data::getFilters ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Filter > & CSMWorld::Data::getFilters ( )
const CSMWorld::IdCollection< ESM::Global > & CSMWorld::Data::getGlobals ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Global > & CSMWorld::Data::getGlobals ( )
const CSMWorld::IdCollection< ESM::GameSetting > & CSMWorld::Data::getGmsts ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::GameSetting > & CSMWorld::Data::getGmsts ( )
std::vector< std::string > CSMWorld::Data::getIds ( bool  listDeleted = true) const

Return a sorted collection of all IDs that are not internal to the editor.

Parameters
listDeletedinclude deleted record in the list
const CSMWorld::InfoCollection & CSMWorld::Data::getJournalInfos ( ) const

Here is the caller graph for this function:

CSMWorld::InfoCollection & CSMWorld::Data::getJournalInfos ( )
const CSMWorld::IdCollection< ESM::Dialogue > & CSMWorld::Data::getJournals ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Dialogue > & CSMWorld::Data::getJournals ( )
const CSMWorld::IdCollection< CSMWorld::Land > & CSMWorld::Data::getLand ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< CSMWorld::Land > & CSMWorld::Data::getLand ( )
const CSMWorld::IdCollection< CSMWorld::LandTexture > & CSMWorld::Data::getLandTextures ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< CSMWorld::LandTexture > & CSMWorld::Data::getLandTextures ( )
const CSMWorld::IdCollection< ESM::MagicEffect > & CSMWorld::Data::getMagicEffects ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::MagicEffect > & CSMWorld::Data::getMagicEffects ( )
const CSMWorld::MetaData & CSMWorld::Data::getMetaData ( ) const
const CSMWorld::SubCellCollection< CSMWorld::Pathgrid > & CSMWorld::Data::getPathgrids ( ) const

Here is the caller graph for this function:

CSMWorld::SubCellCollection< CSMWorld::Pathgrid > & CSMWorld::Data::getPathgrids ( )
const CSMWorld::IdCollection< ESM::Race > & CSMWorld::Data::getRaces ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Race > & CSMWorld::Data::getRaces ( )
const CSMWorld::RefIdCollection & CSMWorld::Data::getReferenceables ( ) const

Here is the caller graph for this function:

CSMWorld::RefIdCollection & CSMWorld::Data::getReferenceables ( )
const CSMWorld::RefCollection & CSMWorld::Data::getReferences ( ) const

Here is the caller graph for this function:

CSMWorld::RefCollection & CSMWorld::Data::getReferences ( )
const CSMWorld::IdCollection< ESM::Region > & CSMWorld::Data::getRegions ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Region > & CSMWorld::Data::getRegions ( )
const CSMWorld::Resources & CSMWorld::Data::getResources ( const UniversalId id) const

Throws an exception, if id does not match a resources list.

boost::shared_ptr< Resource::ResourceSystem > CSMWorld::Data::getResourceSystem ( )

Here is the caller graph for this function:

boost::shared_ptr< const Resource::ResourceSystem > CSMWorld::Data::getResourceSystem ( ) const
const CSMWorld::IdCollection< ESM::Script > & CSMWorld::Data::getScripts ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Script > & CSMWorld::Data::getScripts ( )
const CSMWorld::IdCollection< ESM::Skill > & CSMWorld::Data::getSkills ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Skill > & CSMWorld::Data::getSkills ( )
const CSMWorld::IdCollection< ESM::SoundGenerator > & CSMWorld::Data::getSoundGens ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::SoundGenerator > & CSMWorld::Data::getSoundGens ( )
const CSMWorld::IdCollection< ESM::Sound > & CSMWorld::Data::getSounds ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Sound > & CSMWorld::Data::getSounds ( )
const CSMWorld::IdCollection< ESM::Spell > & CSMWorld::Data::getSpells ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Spell > & CSMWorld::Data::getSpells ( )
const CSMWorld::IdCollection< ESM::StartScript > & CSMWorld::Data::getStartScripts ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::StartScript > & CSMWorld::Data::getStartScripts ( )
QAbstractItemModel * CSMWorld::Data::getTableModel ( const UniversalId id)

If no table model is available for id, an exception is thrown.

Note
The returned table may either be the model for the ID itself or the model that contains the record specified by the ID.

Here is the call graph for this function:

Here is the caller graph for this function:

const CSMWorld::InfoCollection & CSMWorld::Data::getTopicInfos ( ) const

Here is the caller graph for this function:

CSMWorld::InfoCollection & CSMWorld::Data::getTopicInfos ( )
const CSMWorld::IdCollection< ESM::Dialogue > & CSMWorld::Data::getTopics ( ) const

Here is the caller graph for this function:

CSMWorld::IdCollection< ESM::Dialogue > & CSMWorld::Data::getTopics ( )
const VFS::Manager * CSMWorld::Data::getVFS ( ) const
bool CSMWorld::Data::hasId ( const std::string &  id) const
void CSMWorld::Data::idListChanged ( )
signal
void CSMWorld::Data::merge ( )

Merge modified into base.

Data& CSMWorld::Data::operator= ( const Data )
private
void CSMWorld::Data::rowsChanged ( const QModelIndex &  parent,
int  start,
int  end 
)
privateslot

Here is the caller graph for this function:

void CSMWorld::Data::setMetaData ( const MetaData metaData)
int CSMWorld::Data::startLoading ( const boost::filesystem::path &  path,
bool  base,
bool  project 
)

Begin merging content of a file into base or modified.

Parameters
projectload project file instead of content file
Returns
estimated number of records

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool CSMWorld::Data::mBase
private
NestedIdCollection<ESM::BirthSign> CSMWorld::Data::mBirthsigns
private
IdCollection<ESM::BodyPart> CSMWorld::Data::mBodyParts
private
NestedIdCollection<Cell> CSMWorld::Data::mCells
private
IdCollection<ESM::Class> CSMWorld::Data::mClasses
private
std::map<std::string, int> CSMWorld::Data::mContentFileNames
private
IdCollection<ESM::DebugProfile> CSMWorld::Data::mDebugProfiles
private
const ESM::Dialogue* CSMWorld::Data::mDialogue
private
NestedIdCollection<ESM::Enchantment> CSMWorld::Data::mEnchantments
private
ToUTF8::Utf8Encoder CSMWorld::Data::mEncoder
private
NestedIdCollection<ESM::Faction> CSMWorld::Data::mFactions
private
const Fallback::Map* CSMWorld::Data::mFallbackMap
private
IdCollection<ESM::Filter> CSMWorld::Data::mFilters
private
IdCollection<ESM::Global> CSMWorld::Data::mGlobals
private
IdCollection<ESM::GameSetting> CSMWorld::Data::mGmsts
private
InfoCollection CSMWorld::Data::mJournalInfos
private
IdCollection<ESM::Dialogue> CSMWorld::Data::mJournals
private
IdCollection<Land> CSMWorld::Data::mLand
private
IdCollection<LandTexture> CSMWorld::Data::mLandTextures
private
IdCollection<ESM::MagicEffect> CSMWorld::Data::mMagicEffects
private
Collection<MetaData> CSMWorld::Data::mMetaData
private
std::map<UniversalId::Type, QAbstractItemModel *> CSMWorld::Data::mModelIndex
private
std::vector<QAbstractItemModel *> CSMWorld::Data::mModels
private
SubCellCollection<Pathgrid> CSMWorld::Data::mPathgrids
private
bool CSMWorld::Data::mProject
private
NestedIdCollection<ESM::Race> CSMWorld::Data::mRaces
private
ESM::ESMReader* CSMWorld::Data::mReader
private
int CSMWorld::Data::mReaderIndex
private
std::vector<boost::shared_ptr<ESM::ESMReader> > CSMWorld::Data::mReaders
private
RefIdCollection CSMWorld::Data::mReferenceables
private
std::map<std::string, std::map<ESM::RefNum, std::string> > CSMWorld::Data::mRefLoadCache
private
RefCollection CSMWorld::Data::mRefs
private
NestedIdCollection<ESM::Region> CSMWorld::Data::mRegions
private
const ResourcesManager& CSMWorld::Data::mResourcesManager
private
boost::shared_ptr<Resource::ResourceSystem> CSMWorld::Data::mResourceSystem
private
IdCollection<ESM::Script> CSMWorld::Data::mScripts
private
IdCollection<ESM::Skill> CSMWorld::Data::mSkills
private
IdCollection<ESM::SoundGenerator> CSMWorld::Data::mSoundGens
private
IdCollection<ESM::Sound> CSMWorld::Data::mSounds
private
NestedIdCollection<ESM::Spell> CSMWorld::Data::mSpells
private
IdCollection<ESM::StartScript> CSMWorld::Data::mStartScripts
private
NestedInfoCollection CSMWorld::Data::mTopicInfos
private
IdCollection<ESM::Dialogue> CSMWorld::Data::mTopics
private

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