Pyrogenesis trunk
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
CActorDef Class Reference

Represents an actor file. More...

#include <ObjectBase.h>

Collaboration diagram for CActorDef:
Collaboration graph
[legend]

Public Member Functions

 CActorDef (CObjectManager &objectManager)
 
std::vector< u8QualityLevels () const
 
VfsPath GetPathname () const
 
std::set< CStr > PickSelectionsAtRandom (uint32_t seed) const
 Return a list of selections specifying a particular variant in all groups, based on the seed. More...
 

Protected Member Functions

const std::shared_ptr< CObjectBase > & GetBase (u8 QualityLevel) const
 Return the Object base matching the given quality level. More...
 
bool Load (const VfsPath &pathname)
 Initialise this object by loading from the given file. More...
 
void LoadErrorPlaceholder (const VfsPath &pathname)
 Initialise this object with a default placeholder actor, pretending to be the actor at pathname. More...
 
bool UsesFile (const VfsPath &pathname) const
 Returns whether this actor (including any possible props) uses the given file. More...
 

Protected Attributes

VfsPath m_Pathname
 

Private Member Functions

 NONCOPYABLE (CActorDef)
 

Private Attributes

CObjectManagerm_ObjectManager
 
std::vector< std::shared_ptr< CObjectBase > > m_ObjectBases
 
std::unordered_set< VfsPathm_UsedFiles
 

Friends

class CObjectManager
 
class CObjectBase
 
class CObjectEntry
 

Detailed Description

Represents an actor file.

Actors can contain various quality levels. An ActorDef maintains a CObjectBase for each specified quality level, and provides access to it.

Constructor & Destructor Documentation

◆ CActorDef()

CActorDef::CActorDef ( CObjectManager objectManager)

Member Function Documentation

◆ GetBase()

const std::shared_ptr< CObjectBase > & CActorDef::GetBase ( u8  QualityLevel) const
protected

Return the Object base matching the given quality level.

◆ GetPathname()

VfsPath CActorDef::GetPathname ( ) const
inline

◆ Load()

bool CActorDef::Load ( const VfsPath pathname)
protected

Initialise this object by loading from the given file.

Returns false on error.

◆ LoadErrorPlaceholder()

void CActorDef::LoadErrorPlaceholder ( const VfsPath pathname)
protected

Initialise this object with a default placeholder actor, pretending to be the actor at pathname.

◆ NONCOPYABLE()

CActorDef::NONCOPYABLE ( CActorDef  )
private

◆ PickSelectionsAtRandom()

std::set< CStr > CActorDef::PickSelectionsAtRandom ( uint32_t  seed) const

Return a list of selections specifying a particular variant in all groups, based on the seed.

◆ QualityLevels()

std::vector< u8 > CActorDef::QualityLevels ( ) const

◆ UsesFile()

bool CActorDef::UsesFile ( const VfsPath pathname) const
protected

Returns whether this actor (including any possible props) uses the given file.

(This is used for hotloading.)

Friends And Related Function Documentation

◆ CObjectBase

friend class CObjectBase
friend

◆ CObjectEntry

friend class CObjectEntry
friend

◆ CObjectManager

friend class CObjectManager
friend

Member Data Documentation

◆ m_ObjectBases

std::vector<std::shared_ptr<CObjectBase> > CActorDef::m_ObjectBases
private

◆ m_ObjectManager

CObjectManager& CActorDef::m_ObjectManager
private

◆ m_Pathname

VfsPath CActorDef::m_Pathname
protected

◆ m_UsedFiles

std::unordered_set<VfsPath> CActorDef::m_UsedFiles
private

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