PLearn 0.1
|
Public Member Functions | |
ChildB (string schildb="childB") | |
void | print (ostream &out) |
ChildB (const ChildB &other) | |
ChildB * | deepCopy (CopiesMap &copies) const |
Public Attributes | |
string | s_child_b |
string representing number | |
PP< ChildA > | childAPP |
PLearn::ChildB::ChildB | ( | string | schildb = "childB" | ) | [inline] |
PLearn::ChildB::ChildB | ( | const ChildB & | other | ) | [inline] |
< a copy already exists, so return it
Otherwise call the copy constructor to obtain a copy
Put the copy in the map
Reimplemented from PLearn::Parent.
Definition at line 237 of file PPTest.cc.
References childAPP, PLearn::deepCopy(), and PLearn::usage().
{ CopiesMap::iterator it = copies.find(this); if(it!=copies.end()) return (ChildB*) it->second; ChildB* dcopy = new ChildB(*this); dcopy->childAPP = PLearn::deepCopy( childAPP ); if (usage() > 1) copies[this] = dcopy; return dcopy; }
void PLearn::ChildB::print | ( | ostream & | out | ) | [inline] |
Reimplemented from PLearn::Parent.
Definition at line 233 of file PPTest.cc.
References PLearn::flush(), and PLearn::print().
{ out << "* ChildB:\ts_child_b= " << s_child_b << "\t\t" << flush; Parent::print(out); }
Reimplemented from PLearn::Parent.
Definition at line 231 of file PPTest.cc.
Referenced by deepCopy().
string PLearn::ChildB::s_child_b |
string representing number
Definition at line 230 of file PPTest.cc.
Referenced by PLearn::Test_PP::conversionOPchildB(), and PLearn::Test_PP::copieConsOrdinaryPtr().