PLearn 0.1
Public Member Functions | Public Attributes
PLearn::ChildA Class Reference
Inheritance diagram for PLearn::ChildA:
Inheritance graph
[legend]
Collaboration diagram for PLearn::ChildA:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChildA (int pp=0, string sp="zero_hundred", int cc=0)
void print (ostream &out)
 ChildA (const ChildA &other)
ChildAdeepCopy (CopiesMap &copies) const

Public Attributes

int i_child_a
 regular integer
PP< ParentparentPP
PP< ChildBchildBPP

Detailed Description

Definition at line 191 of file PPTest.cc.


Constructor & Destructor Documentation

PLearn::ChildA::ChildA ( int  pp = 0,
string  sp = "zero_hundred",
int  cc = 0 
) [inline]

Definition at line 198 of file PPTest.cc.

: Parent(pp, sp), i_child_a(cc) {}
PLearn::ChildA::ChildA ( const ChildA other) [inline]

Definition at line 201 of file PPTest.cc.

                              : 
        Parent(other.i_par, other.s_par), 
        i_child_a(other.i_child_a),
        parentPP(other.parentPP), childBPP(other.childBPP){}

Member Function Documentation

ChildA* PLearn::ChildA::deepCopy ( CopiesMap copies) const [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;
  }

Here is the call graph for this function:

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); }

Here is the call graph for this function:


Member Data Documentation

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().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines