BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/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; }
37protected:
39 const TrkRep* myConstRep() const;
40 virtual const IfdKey& myKey() const = 0;
41 void setRep(const TrkRep*);
42 void setRep(TrkRep*);
43private:
44 TrkRep* _myRep;
45 bool _nonconst; // keep track of whether we attached const or not
46// Preempt
47 TrkExtInterface& operator= (const TrkExtInterface&);
49};
50
51#endif
52
53
54
55
56
57
58
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