All Classes Functions Variables Typedefs Friends Pages
CommonStorage.h
1 //------------------------------------------------------------------------------
2 //
3 // Copyright (c) 2012 Glympse Inc. All rights reserved.
4 //
5 //------------------------------------------------------------------------------
6 
7 #ifndef COMMONSTORAGE_H__GLYMPSE__
8 #define COMMONSTORAGE_H__GLYMPSE__
9 
10 namespace Glympse
11 {
12 
20 {
24  protected: int32 _ref;
25 
29  protected: int32 _holders;
30 
35 
36  protected: CommonStorage()
37  : _ref(1)
38  , _holders(0)
39  , _attachedObject()
40  {
41  }
42 
43  protected: inline void attachObject(const GCommon& obj)
44  {
45  _attachedObject = obj;
46  }
47 
48  protected: inline GCommon extractObject()
49  {
50  return _attachedObject;
51  }
52 };
53 
54 }
55 
56 #endif // !COMMONSTORAGE_H__GLYMPSE__