PLearn 0.1
|
Public Member Functions | |
ChildA (int pp=0, string sp="zero_hundred", int cc=0) | |
void | print (ostream &out) |
ChildA (const ChildA &other) | |
ChildA * | deepCopy (CopiesMap &copies) const |
Public Attributes | |
int | i_child_a |
regular integer | |
PP< Parent > | parentPP |
PP< ChildB > | childBPP |
PLearn::ChildA::ChildA | ( | const ChildA & | 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 206 of file PPTest.cc.
References childBPP, PLearn::deepCopy(), parentPP, and PLearn::usage().
{ CopiesMap::iterator it = copies.find(this); if(it!=copies.end()) return (ChildA*) it->second; ChildA* dcopy = new ChildA(*this); dcopy->parentPP = PLearn::deepCopy( parentPP ); dcopy->childBPP = PLearn::deepCopy( childBPP ); if (usage() > 1) copies[this] = dcopy; return dcopy; }
void PLearn::ChildA::print | ( | ostream & | out | ) | [inline] |
Reimplemented from PLearn::Parent.
Definition at line 199 of file PPTest.cc.
References PLearn::flush(), and PLearn::print().
{ out << "* ChildA:\ti_child_a= " << i_child_a << "\t\t\t" << flush; Parent::print(out); }
Reimplemented from PLearn::Parent.
Definition at line 197 of file PPTest.cc.
Referenced by deepCopy().
regular integer
Definition at line 195 of file PPTest.cc.
Referenced by PLearn::Test_PP::conversionOPchildA(), and PLearn::Test_PP::copieConsOrdinaryPtr().
Definition at line 196 of file PPTest.cc.
Referenced by deepCopy().