-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIString.h
39 lines (29 loc) · 794 Bytes
/
IString.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef IntactObjects_ObjectSerializer_h_IsIncluded
#define IntactObjects_ObjectSerializer_h_IsIncluded
#include <string>
#include"IntactObjects/IncludeExtLibs.h"
#include"IntactObjects/Export.h"
namespace IntactObjects
{
class DLL_STATE IString : public MicroMiddleware::RmiObjectBase
{
public:
IString(std::string str) : istring_(str)
{}
IString(const std::string &str) : istring_(str)
{}
virtual void Write(NetworkLib::SerializeWriter *writer)
{
writer->WriteString(istring_);
}
virtual void Read(NetworkLib::SerializeReader *reader)
{
istring_ = reader->ReadString();
}
std::string GetString() const { return istring_; }
void SetString(const std::string &str) { istring_ = str; }
private:
std::string istring_;
};
} // namespace IntactObjects
#endif //