Pol  Revision:cb584c9
door.h
Go to the documentation of this file.
1 
7 #ifndef DOOR_H
8 #define DOOR_H
9 
10 #include "../clib/compilerspecifics.h"
11 #ifndef LOCKABLE_H
12 #include "lockable.h"
13 #endif
14 
15 #ifndef ITEM_H
16 #include "item/item.h"
17 #endif
18 
19 namespace Pol
20 {
21 namespace Network
22 {
23 class Client;
24 namespace Pol
25 {
26 namespace Bscript
27 {
28 class BObjectImp;
29 class Executor;
30 } // namespace Bscript
31 } // namespace Pol
32 }
33 namespace Items
34 {
35 class DoorDesc;
36 }
37 namespace Core
38 {
39 class UDoor : public ULockable
40 {
41  typedef ULockable base;
42 
43 public:
44  virtual ~UDoor() = default;
45  virtual size_t estimatedSize() const POL_OVERRIDE;
46 
47 private:
48  virtual void builtin_on_use( Network::Client* client ) POL_OVERRIDE;
49  void toggle();
50  void open();
51  void close();
52  bool is_open() const;
53  virtual Bscript::BObjectImp* get_script_member( const char* membername ) const POL_OVERRIDE;
54  virtual Bscript::BObjectImp* get_script_member_id( const int id ) const POL_OVERRIDE;
55  virtual Bscript::BObjectImp* script_method( const char* methodname,
56  Bscript::Executor& ex ) POL_OVERRIDE;
57  virtual Bscript::BObjectImp* script_method_id( const int id, Bscript::Executor& ex ) POL_OVERRIDE;
58  virtual bool script_isa( unsigned isatype ) const POL_OVERRIDE;
59 
60 protected:
61  UDoor( const Items::DoorDesc& descriptor );
62  friend class Items::Item;
63 };
64 }
65 }
66 #endif
#define POL_OVERRIDE
ULockable base
Definition: door.h:41
Definition: berror.cpp:12