OpenMW
Public Member Functions | Private Attributes
Nif::RecordPtrT< X > Class Template Reference

#include <recordptr.hpp>

List of all members.

Public Member Functions

 RecordPtrT ()
void read (NIFStream *nif)
 Read the index from the nif.
void post (NIFFile *nif)
 Resolve index to pointer.
const X * getPtr () const
 Look up the actual object from the index.
X * getPtr ()
const X & get () const
X & get ()
const X * operator-> () const
 Syntactic sugar.
X * operator-> ()
bool empty () const
 Pointers are allowed to be empty.

Private Attributes

union {
   intptr_t   index
   X *   ptr
}; 

Detailed Description

template<class X>
class Nif::RecordPtrT< X >

A reference to another record. It is read as an index from the NIF, and later looked up in the index table to get an actual pointer.


Constructor & Destructor Documentation

template<class X>
Nif::RecordPtrT< X >::RecordPtrT ( ) [inline]

Member Function Documentation

template<class X>
bool Nif::RecordPtrT< X >::empty ( ) const [inline]

Pointers are allowed to be empty.

template<class X>
const X& Nif::RecordPtrT< X >::get ( ) const [inline]
template<class X>
X& Nif::RecordPtrT< X >::get ( ) [inline]
template<class X>
const X* Nif::RecordPtrT< X >::getPtr ( ) const [inline]

Look up the actual object from the index.

template<class X>
X* Nif::RecordPtrT< X >::getPtr ( ) [inline]
template<class X>
const X* Nif::RecordPtrT< X >::operator-> ( ) const [inline]

Syntactic sugar.

template<class X>
X* Nif::RecordPtrT< X >::operator-> ( ) [inline]
template<class X>
void Nif::RecordPtrT< X >::post ( NIFFile nif) [inline]

Resolve index to pointer.

template<class X>
void Nif::RecordPtrT< X >::read ( NIFStream nif) [inline]

Read the index from the nif.


Member Data Documentation

union { ... } [private]
template<class X>
intptr_t Nif::RecordPtrT< X >::index
template<class X>
X* Nif::RecordPtrT< X >::ptr

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