OpenMW
|
#include <recordptr.hpp>
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 | |
}; |
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.
Nif::RecordPtrT< X >::RecordPtrT | ( | ) | [inline] |
bool Nif::RecordPtrT< X >::empty | ( | ) | const [inline] |
Pointers are allowed to be empty.
const X& Nif::RecordPtrT< X >::get | ( | ) | const [inline] |
X& Nif::RecordPtrT< X >::get | ( | ) | [inline] |
const X* Nif::RecordPtrT< X >::getPtr | ( | ) | const [inline] |
Look up the actual object from the index.
X* Nif::RecordPtrT< X >::getPtr | ( | ) | [inline] |
const X* Nif::RecordPtrT< X >::operator-> | ( | ) | const [inline] |
Syntactic sugar.
X* Nif::RecordPtrT< X >::operator-> | ( | ) | [inline] |
void Nif::RecordPtrT< X >::post | ( | NIFFile * | nif | ) | [inline] |
Resolve index to pointer.
void Nif::RecordPtrT< X >::read | ( | NIFStream * | nif | ) | [inline] |
Read the index from the nif.
union { ... } [private] |
intptr_t Nif::RecordPtrT< X >::index |
X* Nif::RecordPtrT< X >::ptr |