OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
book.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWCLASS_BOOK_H
2 #define GAME_MWCLASS_BOOK_H
3 
4 #include "../mwworld/class.hpp"
5 
6 namespace MWClass
7 {
8  class Book : public MWWorld::Class
9  {
10  virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const;
11 
12  public:
13 
14  virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const;
16 
17  virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const;
18 
19  virtual std::string getName (const MWWorld::ConstPtr& ptr) const;
22 
23  virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
24  const MWWorld::Ptr& actor) const;
26 
27  virtual std::string getScript (const MWWorld::ConstPtr& ptr) 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 int getValue (const MWWorld::ConstPtr& ptr) const;
38 
39  static void registerSelf();
40 
41  virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const;
43 
44  virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const;
46 
47  virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const;
49 
50  virtual std::string getEnchantment (const MWWorld::ConstPtr& ptr) const;
52 
53  virtual std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const;
55 
56  virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr) const;
58 
59  virtual std::string getModel(const MWWorld::ConstPtr &ptr) const;
60 
61  virtual int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const;
62 
63  virtual float getWeight (const MWWorld::ConstPtr& ptr) const;
64 
65  virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const;
66  };
67 }
68 
69 #endif
virtual float getWeight(const MWWorld::ConstPtr &ptr) const
Definition: book.cpp:190
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: book.cpp:81
Definition: tooltips.hpp:18
virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const
Definition: book.cpp:170
virtual std::string getDownSoundId(const MWWorld::ConstPtr &ptr) const
Return the put down sound Id.
Definition: book.cpp:100
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: book.cpp:184
static void registerSelf()
Definition: book.cpp:88
virtual std::string getUpSoundId(const MWWorld::ConstPtr &ptr) const
Return the pick up sound Id.
Definition: book.cpp:95
virtual std::string getEnchantment(const MWWorld::ConstPtr &ptr) const
Definition: book.cpp:144
Definition: renderinginterface.hpp:9
virtual std::string getName(const MWWorld::ConstPtr &ptr) const
Definition: book.cpp:50
virtual boost::shared_ptr< MWWorld::Action > use(const MWWorld::Ptr &ptr) const
Generate action for using via inventory menu.
Definition: book.cpp:165
Definition: physicssystem.hpp:51
Base class for referenceable esm records.
Definition: class.hpp:52
virtual boost::shared_ptr< MWWorld::Action > activate(const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const
Generate action for activation.
Definition: book.cpp:57
virtual MWGui::ToolTipInfo getToolTipInfo(const MWWorld::ConstPtr &ptr, int count) const
Definition: book.cpp:119
virtual int getEnchantmentPoints(const MWWorld::ConstPtr &ptr) const
Definition: book.cpp:177
virtual std::string getModel(const MWWorld::ConstPtr &ptr) const
Definition: book.cpp:39
Mutable state of a cell.
Definition: cellstore.hpp:53
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
virtual std::string getScript(const MWWorld::ConstPtr &ptr) const
Return name of the script attached to ptr.
Definition: book.cpp:74
virtual bool hasToolTip(const MWWorld::ConstPtr &ptr) const
Definition: book.cpp:112
virtual std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string &enchId, int enchCharge, const std::string &newName) const
Creates a new record using ptr as template, with the given name and the given enchantment applied to ...
Definition: book.cpp:151
virtual std::string getInventoryIcon(const MWWorld::ConstPtr &ptr) const
Return name of inventory icon.
Definition: book.cpp:105
Definition: book.hpp:8
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: book.cpp:34
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
virtual void insertObjectRendering(const MWWorld::Ptr &ptr, const std::string &model, MWRender::RenderingInterface &renderingInterface) const
Add reference into a cell for rendering.
Definition: book.cpp:27