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

#include <actoradapter.hpp>

Inheritance diagram for CSMWorld::ActorAdapter:
Collaboration diagram for CSMWorld::ActorAdapter:

Classes

class  ActorData
 
class  RaceData
 Contains base race data shared between actors. More...
 

Public Types

using ActorPartList = std::map< ESM::PartReferenceType, std::pair< std::string, int >>
 A list indexed by ESM::PartReferenceType. More...
 
using RacePartList = std::array< std::string, ESM::BodyPart::MP_Count >
 A list indexed by ESM::BodyPart::MeshPart. More...
 
using StringSet = std::unordered_set< std::string >
 Tracks unique strings. More...
 
using RaceDataPtr = std::shared_ptr< RaceData >
 
using ActorDataPtr = std::shared_ptr< ActorData >
 

Public Slots

void handleReferenceablesInserted (const QModelIndex &, int, int)
 
void handleReferenceableChanged (const QModelIndex &, const QModelIndex &)
 
void handleReferenceablesAboutToBeRemoved (const QModelIndex &, int, int)
 
void handleReferenceablesRemoved (const QModelIndex &, int, int)
 
void handleRacesInserted (const QModelIndex &, int, int)
 
void handleRaceChanged (const QModelIndex &, const QModelIndex &)
 
void handleRacesAboutToBeRemoved (const QModelIndex &, int, int)
 
void handleRacesRemoved (const QModelIndex &, int, int)
 
void handleBodyPartsInserted (const QModelIndex &, int, int)
 
void handleBodyPartChanged (const QModelIndex &, const QModelIndex &)
 
void handleBodyPartsAboutToBeRemoved (const QModelIndex &, int, int)
 
void handleBodyPartsRemoved (const QModelIndex &, int, int)
 

Signals

void actorChanged (const std::string &refId)
 

Public Member Functions

 ActorAdapter (Data &data)
 
ActorDataPtr getActorData (const std::string &refId)
 Obtains the shared data for a given actor. More...
 

Private Member Functions

 ActorAdapter (const ActorAdapter &)=delete
 
ActorAdapteroperator= (const ActorAdapter &)=delete
 
QModelIndex getHighestIndex (QModelIndex) const
 
bool is1stPersonPart (const std::string &id) const
 
RaceDataPtr getRaceData (const std::string &raceId)
 
void setupActor (const std::string &id, ActorDataPtr data)
 
void setupRace (const std::string &id, RaceDataPtr data)
 
void setupNpc (const std::string &id, ActorDataPtr data)
 
void addNpcItem (const std::string &itemId, ActorDataPtr data)
 
void setupCreature (const std::string &id, ActorDataPtr data)
 
void markDirtyDependency (const std::string &dependency)
 
void updateDirty ()
 

Private Attributes

RefIdCollectionmReferenceables
 
IdCollection< ESM::Race > & mRaces
 
IdCollection< ESM::BodyPart > & mBodyParts
 
Misc::WeakCache< std::string,
ActorData
mCachedActors
 
Misc::WeakCache< std::string,
RaceData
mCachedRaces
 
StringSet mDirtyActors
 
StringSet mDirtyRaces
 

Detailed Description

Adapts multiple collections to provide the data needed to render an npc or creature.

Member Typedef Documentation

using CSMWorld::ActorAdapter::ActorPartList = std::map<ESM::PartReferenceType, std::pair<std::string, int>>

A list indexed by ESM::PartReferenceType.

A list indexed by ESM::BodyPart::MeshPart.

using CSMWorld::ActorAdapter::StringSet = std::unordered_set<std::string>

Tracks unique strings.

Constructor & Destructor Documentation

CSMWorld::ActorAdapter::ActorAdapter ( Data data)

Here is the call graph for this function:

CSMWorld::ActorAdapter::ActorAdapter ( const ActorAdapter )
privatedelete

Member Function Documentation

void CSMWorld::ActorAdapter::actorChanged ( const std::string &  refId)
signal

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::addNpcItem ( const std::string &  itemId,
ActorDataPtr  data 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

ActorAdapter::ActorDataPtr CSMWorld::ActorAdapter::getActorData ( const std::string &  refId)

Obtains the shared data for a given actor.

Here is the call graph for this function:

Here is the caller graph for this function:

QModelIndex CSMWorld::ActorAdapter::getHighestIndex ( QModelIndex  index) const
private

Here is the caller graph for this function:

ActorAdapter::RaceDataPtr CSMWorld::ActorAdapter::getRaceData ( const std::string &  raceId)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::handleBodyPartChanged ( const QModelIndex &  topLeft,
const QModelIndex &  botRight 
)
slot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::handleBodyPartsAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
slot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::handleBodyPartsInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
slot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::handleBodyPartsRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
slot

Here is the call graph for this function:

void CSMWorld::ActorAdapter::handleRaceChanged ( const QModelIndex &  topLeft,
const QModelIndex &  botRight 
)
slot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::handleRacesAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
slot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::handleRacesInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
slot

Here is the call graph for this function:

void CSMWorld::ActorAdapter::handleRacesRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
slot

Here is the call graph for this function:

void CSMWorld::ActorAdapter::handleReferenceableChanged ( const QModelIndex &  topLeft,
const QModelIndex &  botRight 
)
slot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::handleReferenceablesAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
slot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::handleReferenceablesInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
slot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::handleReferenceablesRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
slot

Here is the call graph for this function:

bool CSMWorld::ActorAdapter::is1stPersonPart ( const std::string &  id) const
private

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::markDirtyDependency ( const std::string &  dependency)
private

Here is the caller graph for this function:

ActorAdapter& CSMWorld::ActorAdapter::operator= ( const ActorAdapter )
privatedelete
void CSMWorld::ActorAdapter::setupActor ( const std::string &  id,
ActorDataPtr  data 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::setupCreature ( const std::string &  id,
ActorDataPtr  data 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::setupNpc ( const std::string &  id,
ActorDataPtr  data 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::setupRace ( const std::string &  id,
RaceDataPtr  data 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::ActorAdapter::updateDirty ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

IdCollection<ESM::BodyPart>& CSMWorld::ActorAdapter::mBodyParts
private
Misc::WeakCache<std::string, ActorData> CSMWorld::ActorAdapter::mCachedActors
private
Misc::WeakCache<std::string, RaceData> CSMWorld::ActorAdapter::mCachedRaces
private
StringSet CSMWorld::ActorAdapter::mDirtyActors
private
StringSet CSMWorld::ActorAdapter::mDirtyRaces
private
IdCollection<ESM::Race>& CSMWorld::ActorAdapter::mRaces
private
RefIdCollection& CSMWorld::ActorAdapter::mReferenceables
private

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