BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
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) && (__GNUC_MINOR__ < 95)) // BABAR_IOSTREAMS_MIGRATION
21#include <iostream>
22#else // BABAR_IOSTREAMS_MIGRATION
23#include <iostream.h>
24#endif // BABAR_IOSTREAMS_MIGRATION
25#include <stdlib.h>
26
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) && (__GNUC_MINOR__ < 95)) // BABAR_IOSTREAMS_MIGRATION
43 virtual void print( std::ostream &o) const
44#else // BABAR_IOSTREAMS_MIGRATION
45 virtual void print( ostream &o) const
46#endif // BABAR_IOSTREAMS_MIGRATION
47 { o << "IfdIntKey(" << intVal << ")"; }
48
49protected:
50
51private:
52 // Copy ctor and assignemnt op are not allowed. This keeps
53 // the class behavior like its base, IfdKey. See that class for
54 // more info.
55 IfdIntKey( const IfdIntKey &);
56 IfdIntKey& operator=( IfdIntKey &);
57
58
59};
60
61
62#endif /* IFDINTKEY_HH */
virtual ~IfdIntKey()
Definition: IfdIntKey.h:37
virtual void print(std::ostream &o) const
Definition: IfdIntKey.h:43
virtual int operator==(const IfdKey &k) const
Definition: IfdIntKey.h:33
virtual IfdKey * clone(void) const
Definition: IfdIntKey.h:39
Definition: IfdKey.h:48
friend class IfdIntKey
Definition: IfdKey.h:132
int intVal
Definition: IfdKey.h:126
@ intKey
Definition: IfdKey.h:88
IfdKey::keyKind getKeyKind(void) const
Definition: IfdKey.h:98