BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkExtInterface.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkExtInterface.h,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
4//
5// Description:
6// Abstract base class; derived classes enable TrkRecoTrk to give
7// users access to representation-specific functions without having
8// the functions in the RecoTrk interface. Users create an object of
9// of one of the derived TrkExtInterface classes and pass it to
10// TrkRecoTrk::attach(), which will either accept it or reject it,
11// depending on whether the TrkRep inside recognizes it. Recognition
12// is implemented by a simple equality test on the Rep's key.
13//
14// Environment:
15// Software developed for the BaBar Detector at the SLAC B-Factory.
16//
17// Author(s): Steve Schaffner
18//
19//------------------------------------------------------------------------
20
21#ifndef TRKEXTINTERFACE_HH
22#define TRKEXTINTERFACE_HH
23
24class TrkRep;
25class IfdKey;
26
27// Class interface //
28class TrkExtInterface {
29
30public:
33 virtual bool attach( TrkRep* );
34 virtual bool attach( const TrkRep* );
35 bool isAttached() const { return _myRep != 0; }
36 bool nonConstAttachment() const { return _nonconst; }
37
38protected:
40 const TrkRep* myConstRep() const;
41 virtual const IfdKey& myKey() const = 0;
42 void setRep( const TrkRep* );
43 void setRep( TrkRep* );
44
45private:
46 TrkRep* _myRep;
47 bool _nonconst; // keep track of whether we attached const or not
48 // Preempt
49 TrkExtInterface& operator=( const TrkExtInterface& );
51};
52
53#endif
void setRep(TrkRep *)
const TrkRep * myConstRep() const
virtual bool attach(TrkRep *)
void setRep(const TrkRep *)
virtual ~TrkExtInterface()
virtual bool attach(const TrkRep *)
TrkRep * myRep()
virtual const IfdKey & myKey() const =0