OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
MWWorld::LiveCellRef< X > Struct Template Reference

#include <livecellref.hpp>

Inheritance diagram for MWWorld::LiveCellRef< X >:
Collaboration diagram for MWWorld::LiveCellRef< X >:

Public Member Functions

 LiveCellRef (const ESM::CellRef &cref, const X *b=NULL)
 
 LiveCellRef (const X *b=NULL)
 
virtual void load (const ESM::ObjectState &state)
 
virtual void save (ESM::ObjectState &state) const
 Save LiveCellRef state into state. More...
 
- Public Member Functions inherited from MWWorld::LiveCellRefBase
 LiveCellRefBase (const std::string &type, const ESM::CellRef &cref=ESM::CellRef())
 
virtual ~LiveCellRefBase ()
 

Static Public Member Functions

static bool checkState (const ESM::ObjectState &state)
 

Public Attributes

const X * mBase
 
- Public Attributes inherited from MWWorld::LiveCellRefBase
const ClassmClass
 
MWWorld::CellRef mRef
 
RefData mData
 

Additional Inherited Members

- Protected Member Functions inherited from MWWorld::LiveCellRefBase
void loadImp (const ESM::ObjectState &state)
 
void saveImp (ESM::ObjectState &state) const
 Save LiveCellRef state into state. More...
 
- Static Protected Member Functions inherited from MWWorld::LiveCellRefBase
static bool checkStateImp (const ESM::ObjectState &state)
 

Detailed Description

template<typename X>
struct MWWorld::LiveCellRef< X >

A reference to one object (of any type) in a cell.

Constructing this with a CellRef instance in the constructor means that in practice (where D is RefData) the possibly mutable data is copied across to mData. If later adding data (such as position) to CellRef this would have to be manually copied across.

Constructor & Destructor Documentation

template<typename X>
MWWorld::LiveCellRef< X >::LiveCellRef ( const ESM::CellRef cref,
const X *  b = NULL 
)
inline
template<typename X>
MWWorld::LiveCellRef< X >::LiveCellRef ( const X *  b = NULL)
inline

Member Function Documentation

template<typename X >
bool MWWorld::LiveCellRef< X >::checkState ( const ESM::ObjectState state)
static

Check if state is valid and report errors.

Returns
Valid?
Note
Does not check if the RefId exists.

Here is the caller graph for this function:

template<typename X >
void MWWorld::LiveCellRef< X >::load ( const ESM::ObjectState state)
virtual

Load state into a LiveCellRef, that has already been initialised with base and class.

Attention
Must not be called with an invalid state.

Implements MWWorld::LiveCellRefBase.

Here is the caller graph for this function:

template<typename X >
void MWWorld::LiveCellRef< X >::save ( ESM::ObjectState state) const
virtual

Save LiveCellRef state into state.

Implements MWWorld::LiveCellRefBase.

Here is the caller graph for this function:

Member Data Documentation

template<typename X>
const X* MWWorld::LiveCellRef< X >::mBase

The documentation for this struct was generated from the following file: