OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
container.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWCLASS_CONTAINER_H
2 #define GAME_MWCLASS_CONTAINER_H
3 
4 #include "../mwworld/class.hpp"
5 
6 namespace MWClass
7 {
8  class Container : public MWWorld::Class
9  {
10  void ensureCustomData (const MWWorld::Ptr& ptr) const;
11 
12 
13  virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const;
14 
15  public:
16 
17  virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const;
19 
20  virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const;
21 
22  virtual std::string getName (const MWWorld::ConstPtr& ptr) const;
25 
26  virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
27  const MWWorld::Ptr& actor) const;
29 
30  virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
32 
33  virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
35 
36  virtual MWWorld::ContainerStore& getContainerStore (const MWWorld::Ptr& ptr) const;
38 
39  virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
41 
42  virtual float getCapacity (const MWWorld::Ptr& ptr) const;
45 
46  virtual float getEncumbrance (const MWWorld::Ptr& ptr) const;
49 
50  virtual void lock (const MWWorld::Ptr& ptr, int lockLevel = 0) const;
52 
53  virtual void unlock (const MWWorld::Ptr& ptr) const;
55 
56  virtual bool canLock(const MWWorld::ConstPtr &ptr) const;
57 
58  virtual void readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state)
59  const;
61 
62  virtual void writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state)
63  const;
65 
66  static void registerSelf();
67 
68  virtual void respawn (const MWWorld::Ptr& ptr) const;
69 
70  virtual void restock (const MWWorld::Ptr &ptr) const;
71 
72  virtual std::string getModel(const MWWorld::ConstPtr &ptr) const;
73  };
74 }
75 
76 #endif
virtual float getEncumbrance(const MWWorld::Ptr &ptr) const
Definition: container.cpp:268
Definition: tooltips.hpp:18
virtual MWGui::ToolTipInfo getToolTipInfo(const MWWorld::ConstPtr &ptr, int count) const
Definition: container.cpp:235
virtual std::string getModel(const MWWorld::ConstPtr &ptr) const
Definition: container.cpp:106
static void registerSelf()
Definition: container.cpp:221
virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const
Definition: container.cpp:291
virtual MWWorld::ContainerStore & getContainerStore(const MWWorld::Ptr &ptr) const
Return container store.
Definition: container.cpp:206
virtual std::string getScript(const MWWorld::ConstPtr &ptr) const
Return name of the script attached to ptr.
Definition: container.cpp:214
virtual std::string getName(const MWWorld::ConstPtr &ptr) const
Definition: container.cpp:199
void ensureCustomData(const MWWorld::Ptr &ptr) const
Definition: container.cpp:51
virtual void respawn(const MWWorld::Ptr &ptr) const
Definition: container.cpp:70
virtual bool hasToolTip(const MWWorld::ConstPtr &ptr) const
Definition: container.cpp:228
Definition: renderinginterface.hpp:9
virtual void restock(const MWWorld::Ptr &ptr) const
Definition: container.cpp:81
Definition: physicssystem.hpp:51
virtual void unlock(const MWWorld::Ptr &ptr) const
Unlock object.
Definition: container.cpp:281
Base class for referenceable esm records.
Definition: class.hpp:52
virtual void insertObjectRendering(const MWWorld::Ptr &ptr, const std::string &model, MWRender::RenderingInterface &renderingInterface) const
Add reference into a cell for rendering.
Definition: container.cpp:92
<
Definition: objectstate.hpp:19
virtual bool canLock(const MWWorld::ConstPtr &ptr) const
Definition: container.cpp:286
Mutable state of a cell.
Definition: cellstore.hpp:53
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
Definition: container.hpp:8
Definition: containerstore.hpp:41
virtual void insertObject(const MWWorld::Ptr &ptr, const std::string &model, MWPhysics::PhysicsSystem &physics) const
Add reference into a cell for rendering (default implementation: don't render anything).
Definition: container.cpp:99
virtual void lock(const MWWorld::Ptr &ptr, int lockLevel=0) const
Lock object.
Definition: container.cpp:273
virtual boost::shared_ptr< MWWorld::Action > activate(const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const
Generate action for activation.
Definition: container.cpp:117
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
virtual float getCapacity(const MWWorld::Ptr &ptr) const
Definition: container.cpp:260
virtual void writeAdditionalState(const MWWorld::ConstPtr &ptr, ESM::ObjectState &state) const
Write additional state from ptr into state.
Definition: container.cpp:315
virtual void readAdditionalState(const MWWorld::Ptr &ptr, const ESM::ObjectState &state) const
Read additional state from state into ptr.
Definition: container.cpp:298