OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
apparatus.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWCLASS_APPARATUS_H
2 #define GAME_MWCLASS_APPARATUS_H
3 
4 #include "../mwworld/class.hpp"
5 
6 namespace MWClass
7 {
8  class Apparatus : public MWWorld::Class
9  {
10 
11  virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const;
12 
13  public:
14 
15  virtual float getWeight (const MWWorld::ConstPtr& ptr) const;
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 std::string getScript (const MWWorld::ConstPtr& ptr) const;
32 
33  virtual int getValue (const MWWorld::ConstPtr& ptr) const;
35 
36  virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
38 
39  virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
41 
42  static void registerSelf();
43 
44  virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const;
46 
47  virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const;
49 
50  virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const;
52 
53  virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
54  const;
56 
57  virtual std::string getModel(const MWWorld::ConstPtr &ptr) const;
58 
59  virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const;
60  };
61 }
62 
63 #endif
Definition: tooltips.hpp:18
virtual std::string getUpSoundId(const MWWorld::ConstPtr &ptr) const
Return the pick up sound Id.
Definition: apparatus.cpp:81
virtual bool canSell(const MWWorld::ConstPtr &item, int npcServices) const
Determine whether or not item can be sold to an npc with the given npcServices.
Definition: apparatus.cpp:140
virtual int getValue(const MWWorld::ConstPtr &ptr) const
Return trade value of the object. Throws an exception, if the object can't be traded.
Definition: apparatus.cpp:67
Definition: renderinginterface.hpp:9
virtual boost::shared_ptr< MWWorld::Action > activate(const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const
Generate action for activation.
Definition: apparatus.cpp:54
virtual MWGui::ToolTipInfo getToolTipInfo(const MWWorld::ConstPtr &ptr, int count) const
Definition: apparatus.cpp:105
Definition: physicssystem.hpp:51
virtual void insertObjectRendering(const MWWorld::Ptr &ptr, const std::string &model, MWRender::RenderingInterface &renderingInterface) const
Add reference into a cell for rendering.
Definition: apparatus.cpp:24
static void registerSelf()
Definition: apparatus.cpp:74
Base class for referenceable esm records.
Definition: class.hpp:52
virtual std::string getInventoryIcon(const MWWorld::ConstPtr &ptr) const
Return name of inventory icon.
Definition: apparatus.cpp:91
virtual boost::shared_ptr< MWWorld::Action > use(const MWWorld::Ptr &ptr) const
Generate action for using via inventory menu.
Definition: apparatus.cpp:128
virtual std::string getScript(const MWWorld::ConstPtr &ptr) const
Return name of the script attached to ptr.
Definition: apparatus.cpp:60
Mutable state of a cell.
Definition: cellstore.hpp:53
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
virtual std::string getName(const MWWorld::ConstPtr &ptr) const
Definition: apparatus.cpp:47
virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const
Definition: apparatus.cpp:133
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: apparatus.cpp:31
virtual std::string getDownSoundId(const MWWorld::ConstPtr &ptr) const
Return the put down sound Id.
Definition: apparatus.cpp:86
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
Definition: apparatus.hpp:8
virtual std::string getModel(const MWWorld::ConstPtr &ptr) const
Definition: apparatus.cpp:36
virtual bool hasToolTip(const MWWorld::ConstPtr &ptr) const
Definition: apparatus.cpp:98
virtual float getWeight(const MWWorld::ConstPtr &ptr) const
Definition: apparatus.cpp:145