SmartFoxServer 2X C++ API
SFSDataWrapper.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of SFSDataWrapper
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __SFSDataWrapper__
12 #define __SFSDataWrapper__
13 
14 #include "SFSDataType.h"
15 #include "../../Util/Common.h"
16 
17 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
18 
19 #if defined(_MSC_VER)
20 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
21 #endif
22 #include <string> // STL library: string object
23 #include <map> // STL library: map object
24 #include <vector> // STL library: vector object
25 using namespace std; // STL library: declare the STL namespace
26 
27 namespace Sfs2X {
28 namespace Entities {
29 namespace Data {
30 
34  class DLLImportExport SFSDataWrapper
35  {
36  public:
37 
38  // -------------------------------------------------------------------
39  // Public methods
40  // -------------------------------------------------------------------
41 
42  SFSDataWrapper(long int type, boost::shared_ptr<void> data);
43  SFSDataWrapper(SFSDataType tp, boost::shared_ptr<void> data);
44  ~SFSDataWrapper();
45 
46  long int Type();
47  boost::shared_ptr<void> Data();
48 
49  // -------------------------------------------------------------------
50  // Public members
51  // -------------------------------------------------------------------
52 
53  protected:
54 
55  // -------------------------------------------------------------------
56  // Protected methods
57  // -------------------------------------------------------------------
58 
59  // -------------------------------------------------------------------
60  // Protected members
61  // -------------------------------------------------------------------
62 
63  private:
64 
65  // -------------------------------------------------------------------
66  // Private methods
67  // -------------------------------------------------------------------
68 
69  // -------------------------------------------------------------------
70  // Private members
71  // -------------------------------------------------------------------
72 
73  long int type;
74  boost::shared_ptr<void> data;
75  };
76 
77 } // namespace Data
78 } // namespace Entities
79 } // namespace Sfs2X
80 
81 #endif
STL namespace.
Definition: SmartFox.cpp:24
A wrapper object used by SFSObject and SFSArray to encapsulate data and relative types ...
Definition: SFSDataWrapper.h:34