BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkExtInterface Class Referenceabstract

#include <TrkExtInterface.h>

+ Inheritance diagram for TrkExtInterface:

Public Member Functions

 TrkExtInterface ()
 
virtual ~TrkExtInterface ()
 
virtual bool attach (TrkRep *)
 
virtual bool attach (const TrkRep *)
 
bool isAttached () const
 
bool nonConstAttachment () const
 
 TrkExtInterface ()
 
virtual ~TrkExtInterface ()
 
virtual bool attach (TrkRep *)
 
virtual bool attach (const TrkRep *)
 
bool isAttached () const
 
bool nonConstAttachment () const
 

Protected Member Functions

TrkRepmyRep ()
 
const TrkRepmyConstRep () const
 
virtual const IfdKeymyKey () const =0
 
void setRep (const TrkRep *)
 
void setRep (TrkRep *)
 
TrkRepmyRep ()
 
const TrkRepmyConstRep () const
 
virtual const IfdKeymyKey () const =0
 
void setRep (const TrkRep *)
 
void setRep (TrkRep *)
 

Detailed Description

Constructor & Destructor Documentation

◆ TrkExtInterface() [1/2]

TrkExtInterface::TrkExtInterface ( )

Definition at line 22 of file TrkExtInterface.cxx.

22 : _myRep(0), _nonconst(false){
23//------------------------------------------------------------------------
24}

◆ ~TrkExtInterface() [1/2]

TrkExtInterface::~TrkExtInterface ( )
virtual

Definition at line 27 of file TrkExtInterface.cxx.

27 {
28//------------------------------------------------------------------------
29}

◆ TrkExtInterface() [2/2]

TrkExtInterface::TrkExtInterface ( )

◆ ~TrkExtInterface() [2/2]

virtual TrkExtInterface::~TrkExtInterface ( )
virtual

Member Function Documentation

◆ attach() [1/4]

bool TrkExtInterface::attach ( const TrkRep newRep)
virtual

Definition at line 46 of file TrkExtInterface.cxx.

46 {
47//------------------------------------------------------------------------
48 bool retval(false);
49 if (myKey() == newRep->myKey()) {
50 setRep(newRep);
51 retval = true;
52 }
53 return retval;
54}
void setRep(const TrkRep *)
virtual const IfdKey & myKey() const =0
virtual const IfdKey & myKey() const
Definition: TrkRep.cxx:314

◆ attach() [2/4]

virtual bool TrkExtInterface::attach ( const TrkRep )
virtual

◆ attach() [3/4]

bool TrkExtInterface::attach ( TrkRep newRep)
virtual

Definition at line 34 of file TrkExtInterface.cxx.

34 {
35//------------------------------------------------------------------------
36 bool retval(false);
37 if (myKey() == newRep->myKey()) {
38 setRep(newRep);
39 retval = true;
40 }
41 return retval;
42}

Referenced by TrkRecoTrk::attach().

◆ attach() [4/4]

virtual bool TrkExtInterface::attach ( TrkRep )
virtual

◆ isAttached() [1/2]

bool TrkExtInterface::isAttached ( ) const
inline

Definition at line 35 of file InstallArea/include/TrkBase/TrkBase/TrkExtInterface.h.

35{return _myRep != 0;}

◆ isAttached() [2/2]

bool TrkExtInterface::isAttached ( ) const
inline

Definition at line 35 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkExtInterface.h.

35{return _myRep != 0;}

◆ myConstRep() [1/2]

const TrkRep * TrkExtInterface::myConstRep ( ) const
protected

Definition at line 86 of file TrkExtInterface.cxx.

86 {
87//------------------------------------------------------------------------
88 if (0 == _myRep) {
89 std::cout<<"ErrMsg(error) "<< "Cannot use interface without attached rep."
90 << std::endl;
91 return 0;
92 }
93 return _myRep;
94}

◆ myConstRep() [2/2]

const TrkRep * TrkExtInterface::myConstRep ( ) const
protected

◆ myKey() [1/2]

virtual const IfdKey & TrkExtInterface::myKey ( ) const
protectedpure virtual

Implemented in TrkDeadInterface, and TrkDeadInterface.

Referenced by attach().

◆ myKey() [2/2]

virtual const IfdKey & TrkExtInterface::myKey ( ) const
protectedpure virtual

Implemented in TrkDeadInterface, and TrkDeadInterface.

◆ myRep() [1/2]

TrkRep * TrkExtInterface::myRep ( )
protected

Definition at line 70 of file TrkExtInterface.cxx.

70 {
71//------------------------------------------------------------------------
72 if(_myRep != 0 && _nonconst)
73 return _myRep;
74 else if (0 == _myRep) {
75 std::cout<<"ErrMsg(error) "<< "Cannot use interface without attached rep."
76 << std::endl;
77 return 0;
78 } else
79 std::cout<<"ErrMsg(error) "<< "Cannot return non-const rep after const attachment"
80 << std::endl;
81 return 0;
82}

◆ myRep() [2/2]

TrkRep * TrkExtInterface::myRep ( )
protected

◆ nonConstAttachment() [1/2]

bool TrkExtInterface::nonConstAttachment ( ) const
inline

Definition at line 36 of file InstallArea/include/TrkBase/TrkBase/TrkExtInterface.h.

36{ return _nonconst; }

◆ nonConstAttachment() [2/2]

bool TrkExtInterface::nonConstAttachment ( ) const
inline

Definition at line 36 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkExtInterface.h.

36{ return _nonconst; }

◆ setRep() [1/4]

void TrkExtInterface::setRep ( const TrkRep newRep)
protected

Definition at line 57 of file TrkExtInterface.cxx.

57 {
58 _myRep = (TrkRep*) newRep;
59 _nonconst = false;
60}

Referenced by attach().

◆ setRep() [2/4]

void TrkExtInterface::setRep ( const TrkRep )
protected

◆ setRep() [3/4]

void TrkExtInterface::setRep ( TrkRep newRep)
protected

Definition at line 63 of file TrkExtInterface.cxx.

63 {
64 _myRep = newRep;
65 _nonconst = true;
66}

◆ setRep() [4/4]

void TrkExtInterface::setRep ( TrkRep )
protected

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