Pol  Revision:3cfda13
acscrobj.h
Go to the documentation of this file.
1 
8 #ifndef ACSCROBJ_H
9 #define ACSCROBJ_H
10 
11 #include "../../bscript/bobject.h"
12 #include "../../clib/compilerspecifics.h"
13 #include "../../clib/rawtypes.h"
14 #include "../reftypes.h"
15 
16 namespace Pol
17 {
18 namespace Accounts
19 {
20 class Account;
21 } // namespace Accounts
22 namespace Bscript
23 {
24 class Executor;
25 } // namespace Bscript
26 } // namespace Pol
27 
28 namespace Pol
29 {
30 namespace Accounts
31 {
33 {
34 public:
35  explicit AccountPtrHolder( Core::AccountRef i_acct ) : acct( i_acct ) {}
36  Account* operator->() { return acct.get(); }
37  const Account* operator->() const { return acct.get(); }
38  Account* Ptr() { return acct.get(); }
39 
40 private:
42 };
43 
45 class AccountObjImp : public Bscript::BApplicObj<AccountPtrHolder>
46 {
48 
49 public:
50  explicit AccountObjImp( const AccountPtrHolder& other )
51  : Bscript::BApplicObj<AccountPtrHolder>( &accountobjimp_type, other )
52  {
53  }
54  virtual const char* typeOf() const POL_OVERRIDE;
55  virtual u8 typeOfInt() const POL_OVERRIDE;
56  virtual Bscript::BObjectImp* copy() const POL_OVERRIDE;
57  virtual Bscript::BObjectImp* call_method( const char* methodname,
59  virtual Bscript::BObjectImp* call_method_id( const int id, Bscript::Executor& ex,
60  bool forcebuiltin = false ) POL_OVERRIDE;
61  virtual Bscript::BObjectRef get_member( const char* membername ) POL_OVERRIDE;
62  virtual Bscript::BObjectRef get_member_id( const int id ) POL_OVERRIDE; // id test
63 };
64 }
65 }
66 #endif
unsigned char u8
Definition: rawtypes.h:25
#define POL_OVERRIDE
const Account * operator->() const
Definition: acscrobj.h:37
Bscript::BApplicObjType accountobjimp_type
Definition: acscrobj.cpp:56
AccountPtrHolder(Core::AccountRef i_acct)
Definition: acscrobj.h:35
AccountObjImp(const AccountPtrHolder &other)
Definition: acscrobj.h:50
Bscript::BApplicObj< AccountPtrHolder > base
Definition: acscrobj.h:47
Definition: berror.cpp:12