Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Dependent Class Reference
Inheritance diagram for Dependent:
Collaboration diagram for Dependent:

Public Member Functions

 Dependent (const std::string &name, unsigned age, Education *education=0)
 
 Dependent (const Dependent &rhs)
 
virtual ~Dependent ()
 
Dependentoperator= (const Dependent &rhs)
 
template<typename Writer >
void Serialize (Writer &writer) const
 
- Public Member Functions inherited from Person
 Person (const std::string &name, unsigned age)
 
 Person (const Person &rhs)
 
virtual ~Person ()
 
Personoperator= (const Person &rhs)
 

Additional Inherited Members

- Protected Member Functions inherited from Person
template<typename Writer >
void Serialize (Writer &writer) const
 

Detailed Description

Definition at line 72 of file serialize.cpp.

Constructor & Destructor Documentation

◆ Dependent() [1/2]

Dependent::Dependent ( const std::string & name,
unsigned age,
Education * education = 0 )
inline

Definition at line 74 of file serialize.cpp.

74: Person(name, age), education_(education) {}
std::string name
Person(const std::string &name, unsigned age)
Definition serialize.cpp:13

◆ Dependent() [2/2]

Dependent::Dependent ( const Dependent & rhs)
inline

Definition at line 75 of file serialize.cpp.

75: Person(rhs), education_(0) { education_ = (rhs.education_ == 0) ? 0 : new Education(*rhs.education_); }

◆ ~Dependent()

Dependent::~Dependent ( )
virtual

Definition at line 106 of file serialize.cpp.

106 {
107 delete education_;
108}

Member Function Documentation

◆ operator=()

Dependent & Dependent::operator= ( const Dependent & rhs)
inline

Definition at line 78 of file serialize.cpp.

78 {
79 if (this == &rhs)
80 return *this;
81 delete education_;
82 education_ = (rhs.education_ == 0) ? 0 : new Education(*rhs.education_);
83 return *this;
84 }

◆ Serialize()

template<typename Writer >
void Dependent::Serialize ( Writer & writer) const
inline

Definition at line 87 of file serialize.cpp.

87 {
88 writer.StartObject();
89
90 Person::Serialize(writer);
91
92 writer.String("education");
93 if (education_)
94 education_->Serialize(writer);
95 else
96 writer.Null();
97
98 writer.EndObject();
99 }
void Serialize(Writer &writer) const
Definition serialize.cpp:51
void Serialize(Writer &writer) const
Definition serialize.cpp:25
bool EndObject(SizeType memberCount=0)
Definition writer.h:230
bool String(const Ch *str, SizeType length, bool copy=false)
Definition writer.h:202
bool StartObject()
Definition writer.h:215
bool Null()
Definition writer.h:181
Here is the call graph for this function:

The documentation for this class was generated from the following file: