All Classes Functions Variables Typedefs Friends Pages
ICommon.h
1 //------------------------------------------------------------------------------
2 //
3 // Copyright (c) 2012 Glympse Inc. All rights reserved.
4 //
5 //------------------------------------------------------------------------------
6 
7 #ifndef ICOMMON_H__GLYMPSE__
8 #define ICOMMON_H__GLYMPSE__
9 
10 namespace Glympse
11 {
12 
13 /*C*/
14 // 64bit int definition.
15 #if defined(WIN32) || defined(__MINGW32__) // Windows environment
16  typedef int int32;
17  typedef __int64 int64;
18 #else // Everyone else
19  typedef int int32;
20  typedef long long int int64;
21 #endif
22 
23 
24 /*C*/
25 // Typedefs for character arrays and buffers.
26 typedef char byte;
27 typedef char* CharBuffer;
28 typedef char* ByteBuffer;
29 
30 // Preliminary GCommon declaration.
31 struct ICommon;
32 typedef O< ICommon > GCommon;
33 typedef GCommon GCommonObj;
34 
35 // Preliminary IString declaration.
36 struct IString;
37 typedef O< IString > GString;
38 
39 
43 /*O*public**/ struct ICommon
44 {
48  /*C*/public: virtual int32 retain() = 0;
49 
53  /*C*/public: virtual int32 release() = 0;
54 
58  /*C*/public: virtual int32 hold() = 0;
59 
63  /*C*/public: virtual int32 unhold() = 0;
64 
68  /*C*/public: virtual int32 hashCode() = 0;
69 
81  /*C*/public: virtual bool equals(const GCommonObj& o) = 0;
82 
92  /*C*/public: virtual GString toString() = 0;
93 
97  /*C*/public: virtual void attachObject(const GCommon& obj) = 0;
98 
102  /*C*/public: virtual GCommon extractObject() = 0;
103 
109  /*C*/protected: virtual ~ICommon()
110  {
111  }
112 
113 };
114 
115 }
116 
117 #endif // !ICOMMON_H__GLYMPSE__