Pol  Revision:3cfda13
boatcomp.cpp
Go to the documentation of this file.
1 
9 #include "boatcomp.h"
10 
11 #include "../baseobject.h"
12 #include "../lockable.h"
13 
14 namespace Pol
15 {
16 namespace Multi
17 {
18 UPlank::UPlank( const Items::ItemDesc& descriptor )
19  : Core::ULockable( descriptor, Core::UOBJ_CLASS::CLASS_ITEM )
20 {
21 }
22 
23 void UPlank::setboat( UBoat* boat )
24 {
25  boat_.set( boat );
26 }
27 
29 {
30  boat_.clear();
31  base::destroy();
32 }
33 
34 size_t UPlank::estimatedSize() const
35 {
36  return base::estimatedSize() + sizeof( ref_ptr<UBoat> );
37 }
38 }
39 }
void setboat(UBoat *boat)
Definition: boatcomp.cpp:23
virtual size_t estimatedSize() const POL_OVERRIDE
Definition: boatcomp.cpp:34
virtual void destroy()
Definition: uobject.cpp:122
Definition: refptr.h:64
ref_ptr< UBoat > boat_
id test
Definition: boatcomp.h:58
UPlank(const Items::ItemDesc &descriptor)
Definition: boatcomp.cpp:18
virtual void destroy() POL_OVERRIDE
Definition: boatcomp.cpp:28
virtual size_t estimatedSize() const POL_OVERRIDE
Definition: lockable.cpp:45
Definition: berror.cpp:12