Pol  Revision:4b29d2b
berror.h
Go to the documentation of this file.
1 
7 #ifndef BSCRIPT_BERROR_H
8 #define BSCRIPT_BERROR_H
9 
10 #include <istream>
11 #include <string>
12 
13 #include "../clib/compilerspecifics.h"
14 #include "../clib/rawtypes.h"
15 #include "bobject.h"
16 #include "bstruct.h"
17 
18 namespace Pol
19 {
20 namespace Bscript
21 {
22 class ContIterator;
23 } // namespace Bscript
24 } // namespace Pol
25 
26 namespace Pol
27 {
28 namespace Bscript
29 {
30 class BError : public BStruct
31 {
32 public:
33  BError();
34  explicit BError( const char* errortext );
35  explicit BError( const std::string& errortext );
36 
37  static BObjectImp* unpack( std::istream& is );
38 
39  static unsigned int creations();
40 
41 protected:
42  BError( const BError& i );
43  BError( std::istream& is, unsigned size );
44 
45  virtual BObjectImp* copy() const POL_OVERRIDE;
46  virtual BObjectRef OperSubscript( const BObject& obj ) POL_OVERRIDE;
47  virtual BObjectImp* array_assign( BObjectImp* idx, BObjectImp* target, bool copy ) POL_OVERRIDE;
48 
49  virtual char packtype() const POL_OVERRIDE;
50  virtual const char* typetag() const POL_OVERRIDE;
51  virtual const char* typeOf() const POL_OVERRIDE;
52  virtual u8 typeOfInt() const POL_OVERRIDE;
53 
54  virtual bool operator==( const BObjectImp& objimp ) const POL_OVERRIDE;
55  virtual bool operator<( const BObjectImp& objimp ) const POL_OVERRIDE;
56  virtual bool isTrue() const POL_OVERRIDE;
57 
58  virtual ContIterator* createIterator( BObject* pIterVal ) POL_OVERRIDE;
59 
60 private:
61  static unsigned int creations_;
62 };
63 }
64 }
65 #endif
unsigned char u8
Definition: rawtypes.h:25
#define POL_OVERRIDE
bool operator<(T *ptr, const ref_ptr< T > &rptr)
Definition: refptr.h:323
bool operator==(T *ptr, const ref_ptr< T > &rptr)
Definition: refptr.h:311
static unsigned int creations_
Definition: berror.h:61
Definition: berror.cpp:12