BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/ProxyDict/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) && (__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 void print(std::ostream &o) const
virtual int operator==(const IfdKey &k) const
IfdKey::keyKind getKeyKind(void) const