Pol
Revision:cb584c9
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
lockable.h
Go to the documentation of this file.
1
7
#ifndef LOCKABLE_H
8
#define LOCKABLE_H
9
10
#include "../clib/compilerspecifics.h"
11
#include "
baseobject.h
"
12
13
namespace
Pol
14
{
15
namespace
Bscript
16
{
17
class
BObjectImp;
18
}
// namespace Bscript
19
namespace
Clib
20
{
21
class
ConfigElem;
22
class
StreamWriter;
23
}
// namespace Clib
24
namespace
Items
25
{
26
class
ItemDesc;
27
}
// namespace Items
28
}
// namespace Pol
29
#ifndef ITEM_H
30
#include "
item/item.h
"
31
#endif
32
33
namespace
Pol
34
{
35
namespace
Core
36
{
37
class
ULockable
:
public
Items::Item
38
{
39
typedef
Item
base
;
40
41
public
:
42
bool
locked()
const
;
43
44
protected
:
45
void
locked(
bool
newvalue );
46
47
virtual
void
printProperties(
Clib::StreamWriter
& sw )
const
POL_OVERRIDE
;
48
virtual
void
readProperties(
Clib::ConfigElem
& elem )
POL_OVERRIDE
;
49
virtual
Bscript::BObjectImp
* get_script_member(
const
char
* membername )
const
POL_OVERRIDE
;
50
virtual
Bscript::BObjectImp
* get_script_member_id(
const
int
id
)
const
POL_OVERRIDE
;
51
virtual
Bscript::BObjectImp
* set_script_member(
const
char
* membername,
int
value )
POL_OVERRIDE
;
52
virtual
Bscript::BObjectImp
* set_script_member_id(
const
int
id
,
53
int
value )
POL_OVERRIDE
;
// id test
54
virtual
bool
script_isa(
unsigned
isatype )
const
POL_OVERRIDE
;
55
56
virtual
Items::Item
* clone() const POL_OVERRIDE;
// dave 12-20
57
virtual ~
ULockable
(){};
58
virtual
size_t
estimatedSize()
const
POL_OVERRIDE
;
59
60
protected
:
61
explicit
ULockable
(
const
Items::ItemDesc
& itemdesc,
UOBJ_CLASS
uobj_class );
62
friend
class
Items::Item
;
63
};
64
65
inline
bool
ULockable::locked
()
const
66
{
67
return
flags_.get( OBJ_FLAGS::LOCKED );
68
}
69
inline
void
ULockable::locked
(
bool
newvalue )
70
{
71
flags_.change( OBJ_FLAGS::LOCKED, newvalue );
72
}
73
}
74
}
75
#endif
POL_OVERRIDE
#define POL_OVERRIDE
Definition:
compilerspecifics.h:74
Pol::Clib::StreamWriter
Definition:
streamsaver.h:21
Pol::Core::UOBJ_CLASS
UOBJ_CLASS
Definition:
baseobject.h:21
Pol::Core::ULockable::base
Item base
Definition:
lockable.h:39
Pol::Items::ItemDesc
Definition:
itemdesc.h:55
Pol::Core::ULockable::locked
bool locked() const
Definition:
lockable.h:65
item.h
Pol::Bscript::BObjectImp
Definition:
bobject.h:59
Pol::Items::Item
Definition:
item.h:78
baseobject.h
Pol::Core::ULockable
Definition:
lockable.h:37
Pol::Clib::ConfigElem
Definition:
cfgelem.h:53
Pol
Definition:
berror.cpp:12
pol
lockable.h
Generated on Wed Oct 10 2018 02:42:01 for Pol by
1.8.11