1 #ifndef GAME_MWWORLD_PTR_H
2 #define GAME_MWWORLD_PTR_H
15 struct LiveCellRefBase;
44 throw std::runtime_error(
"Cannot get class of an empty object");
53 std::stringstream str;
54 str<<
"Bad LiveCellRef cast to "<<
typeid(
T).
name()<<
" from ";
56 else str<<
"an empty object";
58 throw std::runtime_error(str.str());
84 operator const void *();
120 throw std::runtime_error(
"Cannot get class of an empty object");
129 std::stringstream str;
130 str<<
"Bad LiveCellRef cast to "<<
typeid(
T).
name()<<
" from ";
132 else str<<
"an empty object";
134 throw std::runtime_error(str.str());
168 operator const void *();
179 return !(left==right);
189 return !(left<right);
199 return !(left>right);
209 return !(left==right);
219 return !(left<right);
229 return !(left>right);
MWWorld::LiveCellRefBase * getBase() const
Definition: ptr.cpp:16
Used to create pointers to hold any type of LiveCellRef<> object.
Definition: livecellref.hpp:22
Encapsulated variant of ESM::CellRef with change tracking.
Definition: cellref.hpp:15
const Class & getClass() const
Definition: ptr.hpp:40
const std::string & getTypeName() const
Definition: ptr.cpp:9
bool operator==(const LiveCellRef< X > &ref, int pRefnum)
Definition: cellstore.cpp:207
const Class & getClass() const
Definition: ptr.hpp:116
bool isInCell() const
Definition: ptr.hpp:73
const MWWorld::CellRef & getCellRef() const
Definition: ptr.hpp:139
MWWorld::CellRef mRef
Definition: livecellref.hpp:29
ContainerStore * mContainerStore
Definition: ptr.hpp:25
Definition: livecellref.hpp:77
const MWWorld::LiveCellRefBase * mRef
Definition: ptr.hpp:94
void setContainerStore(const ContainerStore *store)
Must not be called on references that are in a cell.
Definition: ptr.cpp:73
const Class * mClass
Definition: livecellref.hpp:24
const MWWorld::LiveCellRefBase * getBase() const
Definition: ptr.cpp:65
Definition: refdata.hpp:29
RefData mData
Definition: livecellref.hpp:32
CellStore * mCell
Definition: ptr.hpp:24
const CellStore * getCell() const
Definition: ptr.hpp:151
Base class for referenceable esm records.
Definition: class.hpp:51
const ContainerStore * mContainerStore
Definition: ptr.hpp:96
MWWorld::LiveCellRefBase * mRef
Definition: ptr.hpp:23
const RefData & getRefData() const
Definition: ptr.hpp:145
Mutable state of a cell.
Definition: cellstore.hpp:51
CellStore * getCell() const
Definition: ptr.hpp:67
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
bool operator<=(const Ptr &left, const Ptr &right)
Definition: ptr.hpp:197
Definition: containerstore.hpp:48
ConstPtr(const MWWorld::LiveCellRefBase *liveCellRef=0, const CellStore *cell=0)
Definition: ptr.hpp:99
const ContainerStore * getContainerStore() const
May return a 0-pointer, if reference is not in a container.
Definition: ptr.cpp:81
ConstPtr(const MWWorld::Ptr &ptr)
Definition: ptr.hpp:104
bool operator>(const Ptr &left, const Ptr &right)
Definition: ptr.hpp:192
bool operator<(const Ptr &left, const Ptr &right)
Definition: ptr.hpp:182
ContainerStore * getContainerStore() const
May return a 0-pointer, if reference is not in a container.
Definition: ptr.cpp:46
const std::string & getTypeName() const
Definition: ptr.cpp:58
bool isEmpty() const
Definition: ptr.hpp:33
bool isInCell() const
Definition: ptr.hpp:157
bool isEmpty() const
Definition: ptr.hpp:109
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
bool operator!=(const CellStore &left, const CellStore &right)
Definition: cellstore.cpp:930
MWWorld::CellRef & getCellRef() const
Definition: ptr.cpp:24
RefData & getRefData() const
Definition: ptr.cpp:31
void setContainerStore(ContainerStore *store)
Must not be called on references that are in a cell.
Definition: ptr.cpp:38
const CellStore * mCell
Definition: ptr.hpp:95
bool operator>=(const Ptr &left, const Ptr &right)
Definition: ptr.hpp:187
const char * name
Definition: crashcatcher.cpp:67
Ptr(MWWorld::LiveCellRefBase *liveCellRef=0, CellStore *cell=0)
Definition: ptr.hpp:28