BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/ProxyDict/include/ProxyDict/IfdIntKey.h
Go to the documentation of this file.
1#ifndef IFDINTKEY_HH
2#define IFDINTKEY_HH
3//--------------------------------------------------------------------------
4// File and Version Information:
5// $Id: IfdIntKey.h,v 1.1.1.1 2005/04/21 01:18:05 zhangy Exp $
6//
7// Description:
8//
9// Author List:
10// Ed Frank University of Pennsylvania
11//
12// History:
13// Ed Frank 17 Nov 96 Creation of first version
14//
15// Bugs:
16//
17//------------------------------------------------------------------------
18
19#include "ProxyDict/IfdKey.h"
20#if !( defined( __GNUC__ ) && ( __GNUC__ < 3 ) && \
21 ( __GNUC_MINOR__ < 95 ) ) // BABAR_IOSTREAMS_MIGRATION
22# include <iostream>
23#else // BABAR_IOSTREAMS_MIGRATION
24# include <iostream.h>
25#endif // BABAR_IOSTREAMS_MIGRATION
26#include <stdlib.h>
27
28class IfdIntKey : public IfdKey {
29public:
30 IfdIntKey( const int i );
31 // See also protected:IfdIntKey()
32
33 virtual int operator==( const IfdKey& k ) const {
34 return ( intKey == k.getKeyKind() ) && ( intVal == k.intVal );
35 }
36
37 virtual ~IfdIntKey() {}
38
39 virtual IfdKey* clone( void ) const { return new IfdIntKey( intVal ); }
40 // Caller owns returned copy of this key.
41
42#if !( defined( __GNUC__ ) && ( __GNUC__ < 3 ) && \
43 ( __GNUC_MINOR__ < 95 ) ) // BABAR_IOSTREAMS_MIGRATION
44 virtual void print( std::ostream& o ) const
45#else // BABAR_IOSTREAMS_MIGRATION
46 virtual void print( ostream& o ) const
47#endif // BABAR_IOSTREAMS_MIGRATION
48 {
49 o << "IfdIntKey(" << intVal << ")";
50 }
51
52protected:
53private:
54 // Copy ctor and assignemnt op are not allowed. This keeps
55 // the class behavior like its base, IfdKey. See that class for
56 // more info.
57 IfdIntKey( const IfdIntKey& );
58 IfdIntKey& operator=( IfdIntKey& );
59};
60
61#endif /* IFDINTKEY_HH */
IfdIntKey(const int i)
IfdKey(keyKind kind)
Definition IfdKey.cxx:23