14 #include "../../Protocol/Serialization/DefaultObjectDumpFormatter.h" 15 #include "../../Protocol/Serialization/DefaultSFSDataSerializer.h" 16 #include "ISFSObject.h" 17 #include "../../Util/StringFormatter.h" 18 #include <boost/exception/exception.hpp> 19 #include <boost/exception/all.hpp> 20 #include <boost/shared_ptr.hpp> 21 #include <boost/enable_shared_from_this.hpp> 24 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug 67 static boost::shared_ptr<SFSObject> NewFromObject(boost::shared_ptr<void> o);
78 static boost::shared_ptr<SFSObject> NewFromBinaryData(boost::shared_ptr<ByteArray> ba);
86 static boost::shared_ptr<SFSObject> NewInstance();
97 boost::shared_ptr<SFSDataWrapper> GetData(
string key);
98 boost::shared_ptr<SFSDataWrapper> GetData(boost::shared_ptr<string> key);
100 boost::shared_ptr<bool> GetBool(
string key);
101 boost::shared_ptr<bool> GetBool(boost::shared_ptr<string> key);
102 boost::shared_ptr<unsigned char> GetByte(
string key);
103 boost::shared_ptr<unsigned char> GetByte(boost::shared_ptr<string> key);
104 boost::shared_ptr<short int> GetShort(
string key);
105 boost::shared_ptr<short int> GetShort(boost::shared_ptr<string> key);
106 boost::shared_ptr<long int> GetInt(
string key);
107 boost::shared_ptr<long int> GetInt(boost::shared_ptr<string> key);
108 boost::shared_ptr<long long> GetLong(
string key);
109 boost::shared_ptr<long long> GetLong(boost::shared_ptr<string> key);
110 boost::shared_ptr<float> GetFloat(
string key);
111 boost::shared_ptr<float> GetFloat(boost::shared_ptr<string> key);
112 boost::shared_ptr<double> GetDouble(
string key);
113 boost::shared_ptr<double> GetDouble(boost::shared_ptr<string> key);
114 boost::shared_ptr<string> GetUtfString(
string key);
115 boost::shared_ptr<string> GetUtfString(boost::shared_ptr<string> key);
116 boost::shared_ptr<string> GetText(
string key);
117 boost::shared_ptr<string> GetText(boost::shared_ptr<string> key);
118 boost::shared_ptr<vector<unsigned char> > GetArray(
string key);
119 boost::shared_ptr<vector<unsigned char> > GetArray(boost::shared_ptr<string> key);
120 boost::shared_ptr<vector<bool> > GetBoolArray(
string key);
121 boost::shared_ptr<vector<bool> > GetBoolArray(boost::shared_ptr<string> key);
122 boost::shared_ptr<ByteArray> GetByteArray(
string key);
123 boost::shared_ptr<ByteArray> GetByteArray(boost::shared_ptr<string> key);
124 boost::shared_ptr<vector<short int> > GetShortArray(
string key);
125 boost::shared_ptr<vector<short int> > GetShortArray(boost::shared_ptr<string> key);
126 boost::shared_ptr<vector<long int> > GetIntArray(
string key);
127 boost::shared_ptr<vector<long int> > GetIntArray(boost::shared_ptr<string> key);
128 boost::shared_ptr<vector<long long> > GetLongArray(
string key);
129 boost::shared_ptr<vector<long long> > GetLongArray(boost::shared_ptr<string> key);
130 boost::shared_ptr<vector<float> > GetFloatArray(
string key);
131 boost::shared_ptr<vector<float> > GetFloatArray(boost::shared_ptr<string> key);
132 boost::shared_ptr<vector<double> > GetDoubleArray(
string key);
133 boost::shared_ptr<vector<double> > GetDoubleArray(boost::shared_ptr<string> key);
134 boost::shared_ptr<vector<string> > GetUtfStringArray(
string key);
135 boost::shared_ptr<vector<string> > GetUtfStringArray(boost::shared_ptr<string> key);
136 boost::shared_ptr<ISFSArray> GetSFSArray(
string key);
137 boost::shared_ptr<ISFSArray> GetSFSArray(boost::shared_ptr<string> key);
138 boost::shared_ptr<ISFSObject> GetSFSObject(
string key);
139 boost::shared_ptr<ISFSObject> GetSFSObject(boost::shared_ptr<string> key);
141 void PutNull(
string key);
142 void PutNull(boost::shared_ptr<string> key);
143 void PutBool(
string key, boost::shared_ptr<bool> val);
144 void PutBool(boost::shared_ptr<string> key, boost::shared_ptr<bool> val);
145 void PutBool(
string key,
bool val);
146 void PutBool(boost::shared_ptr<string> key,
bool val);
147 void PutByte(
string key, boost::shared_ptr<unsigned char> val);
148 void PutByte(boost::shared_ptr<string> key, boost::shared_ptr<unsigned char> val);
149 void PutByte(
string key,
unsigned char val);
150 void PutByte(boost::shared_ptr<string> key,
unsigned char val);
151 void PutShort(
string key, boost::shared_ptr<short int> val);
152 void PutShort(boost::shared_ptr<string> key, boost::shared_ptr<short int> val);
153 void PutShort(
string key,
short int val);
154 void PutShort(boost::shared_ptr<string> key,
short int val);
155 void PutInt(
string key, boost::shared_ptr<long int> val);
156 void PutInt(boost::shared_ptr<string> key, boost::shared_ptr<long int> val);
157 void PutInt(
string key,
long int val);
158 void PutInt(boost::shared_ptr<string> key,
long int val);
159 void PutLong(
string key, boost::shared_ptr<long long> val);
160 void PutLong(boost::shared_ptr<string> key, boost::shared_ptr<long long> val);
161 void PutLong(
string key,
long long val);
162 void PutLong(boost::shared_ptr<string> key,
long long val);
163 void PutFloat(
string key, boost::shared_ptr<float> val);
164 void PutFloat(boost::shared_ptr<string> key, boost::shared_ptr<float> val);
165 void PutFloat(
string key,
float val);
166 void PutFloat(boost::shared_ptr<string> key,
float val);
167 void PutDouble(
string key, boost::shared_ptr<double> val);
168 void PutDouble(boost::shared_ptr<string> key, boost::shared_ptr<double> val);
169 void PutDouble(
string key,
double val);
170 void PutDouble(boost::shared_ptr<string> key,
double val);
171 void PutUtfString(
string key, boost::shared_ptr<string> val);
172 void PutUtfString(boost::shared_ptr<string> key, boost::shared_ptr<string> val);
173 void PutUtfString(
string key,
string val);
174 void PutUtfString(boost::shared_ptr<string> key,
string val);
175 void PutText(
string key, boost::shared_ptr<string> val);
176 void PutText(boost::shared_ptr<string> key, boost::shared_ptr<string> val);
177 void PutText(
string key,
string val);
178 void PutText(boost::shared_ptr<string> key,
string val);
180 void PutBoolArray(
string key, boost::shared_ptr<vector<bool> > val);
181 void PutBoolArray(boost::shared_ptr<string> key, boost::shared_ptr<vector<bool> > val);
182 void PutByteArray(
string key, boost::shared_ptr<ByteArray> val);
183 void PutByteArray(boost::shared_ptr<string> key, boost::shared_ptr<ByteArray> val);
184 void PutShortArray(
string key, boost::shared_ptr<vector<short int> > val);
185 void PutShortArray(boost::shared_ptr<string> key, boost::shared_ptr<vector<short int> > val);
186 void PutIntArray(
string key, boost::shared_ptr<vector<long int> > val);
187 void PutIntArray(boost::shared_ptr<string> key, boost::shared_ptr<vector<long int> > val);
188 void PutLongArray(
string key, boost::shared_ptr<vector<long long> > val);
189 void PutLongArray(boost::shared_ptr<string> key, boost::shared_ptr<vector<long long> > val);
190 void PutFloatArray(
string key, boost::shared_ptr<vector<float> > val);
191 void PutFloatArray(boost::shared_ptr<string> key, boost::shared_ptr<vector<float> > val);
192 void PutDoubleArray(
string key, boost::shared_ptr<vector<double> > val);
193 void PutDoubleArray(boost::shared_ptr<string> key, boost::shared_ptr<vector<double> > val);
194 void PutUtfStringArray(
string key, boost::shared_ptr<vector<string> > val);
195 void PutUtfStringArray(boost::shared_ptr<string> key, boost::shared_ptr<vector<string> > val);
196 void PutSFSArray(
string key, boost::shared_ptr<ISFSArray> val);
197 void PutSFSArray(boost::shared_ptr<string> key, boost::shared_ptr<ISFSArray> val);
198 void PutSFSObject(
string key, boost::shared_ptr<ISFSObject> val);
199 void PutSFSObject(boost::shared_ptr<string> key, boost::shared_ptr<ISFSObject> val);
201 void Put(
string key, boost::shared_ptr<SFSDataWrapper> val);
202 void Put(boost::shared_ptr<string> key, boost::shared_ptr<SFSDataWrapper> val);
203 bool ContainsKey(
string key);
204 bool ContainsKey(boost::shared_ptr<string> key);
205 boost::shared_ptr<void> GetClass(
string key);
206 boost::shared_ptr<void> GetClass(boost::shared_ptr<string> key);
207 boost::shared_ptr<string> GetDump(
bool format);
208 boost::shared_ptr<string> GetDump();
209 boost::shared_ptr<string> GetHexDump();
211 boost::shared_ptr<vector<string> > GetKeys();
212 bool IsNull(boost::shared_ptr<string> key);
213 bool IsNull(
string key);
214 void PutClass(
string key, boost::shared_ptr<void> val);
215 void PutClass(boost::shared_ptr<string> key, boost::shared_ptr<void> val);
216 void RemoveElement(
string key);
217 void RemoveElement(boost::shared_ptr<string> key);
219 boost::shared_ptr<ByteArray> ToBinary();
241 boost::shared_ptr<string> Dump();
247 boost::shared_ptr<map<string, boost::shared_ptr<SFSDataWrapper> > > dataHolder;
248 boost::shared_ptr<ISFSDataSerializer> serializer;
Definition: DefaultObjectDumpFormatter.cpp:15
Definition: SFSCodecError.cpp:14
SFSObject interface
Definition: ISFSObject.h:45
Definition: BuddyOnlineState.h:15
SFSObject
Definition: SFSObject.h:50
Definition: SmartFox.cpp:24