BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
IfdKey Class Referenceabstract

#include <IfdKey.h>

+ Inheritance diagram for IfdKey:

Public Member Functions

virtual ~IfdKey ()
 
virtual int operator== (const IfdKey &) const =0
 
int operator!= (const IfdKey &k) const
 
virtual void add (const IfdKey &)
 
int cardinality (void) const
 
virtual void print (std::ostream &o) const =0
 
virtual IfdKeyclone (void) const =0
 
virtual unsigned int hash (void) const
 

Static Public Member Functions

static unsigned int nHashBuckets (void)
 

Public Attributes

unsigned int _hashVal
 

Protected Types

enum  { _nHashBuckets = 1031 }
 
enum  keyKind {
  intKey , strKey , compositeKey , typeKey ,
  odfTypeKey
}
 

Protected Member Functions

 IfdKey (keyKind kind)
 
IfdKey::keyKind getKeyKind (void) const
 

Protected Attributes

keyKind _myKeyKind
 
int _myCardinality
 
union { 
 
   int   intVal 
 
   unsigned int   uintVal 
 
   char *   strVal 
 
};  
 

Friends

class IfdIntKey
 
class IfdStrKey
 
class IfdTypeKeyIFace
 
class IfdCompositeKey
 
class BdbOdfIfdTypeKeyIFace
 
std::ostream & operator<< (std::ostream &o, const IfdKey &k)
 
unsigned ifdKeyHash (const IfdDictKey &k)
 

Detailed Description

Definition at line 48 of file IfdKey.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
_nHashBuckets 

Definition at line 86 of file IfdKey.h.

86{ _nHashBuckets = 1031 }; // .33 msec/ev, not opt
@ _nHashBuckets
Definition IfdKey.h:86

◆ keyKind

enum IfdKey::keyKind
protected
Enumerator
intKey 
strKey 
compositeKey 
typeKey 
odfTypeKey 

Definition at line 88 of file IfdKey.h.

@ typeKey
Definition IfdKey.h:89
@ intKey
Definition IfdKey.h:88
@ odfTypeKey
Definition IfdKey.h:89
@ compositeKey
Definition IfdKey.h:88
@ strKey
Definition IfdKey.h:88

Constructor & Destructor Documentation

◆ ~IfdKey()

IfdKey::~IfdKey ( )
virtual

Definition at line 29 of file IfdKey.cxx.

30{}

◆ IfdKey()

IfdKey::IfdKey ( keyKind kind)
protected

Definition at line 23 of file IfdKey.cxx.

24 : _hashVal( 0 )
25 , _myKeyKind( kind )
26 , _myCardinality( 0 )
27{}
keyKind _myKeyKind
Definition IfdKey.h:116
int _myCardinality
Definition IfdKey.h:122
unsigned int _hashVal
Definition IfdKey.h:80

Member Function Documentation

◆ add()

void IfdKey::add ( const IfdKey & )
virtual

Definition at line 34 of file IfdKey.cxx.

34 {
35 // only makes sense for the composite class.
36
37 assert( 0 );
38}

◆ cardinality()

int IfdKey::cardinality ( void ) const
inline

Definition at line 166 of file IfdKey.h.

166 {
167//*****************************************************************************
168 return _myCardinality;
169}

◆ clone()

virtual IfdKey * IfdKey::clone ( void ) const
pure virtual

Implemented in IfdIntKey, and IfdStrKey.

◆ getKeyKind()

IfdKey::keyKind IfdKey::getKeyKind ( void ) const
inlineprotected

Definition at line 98 of file IfdKey.h.

98{ return _myKeyKind; }

Referenced by IfdStrKey::operator<(), IfdIntKey::operator==(), and IfdStrKey::operator==().

◆ hash()

virtual unsigned int IfdKey::hash ( void ) const
inlinevirtual

Definition at line 77 of file IfdKey.h.

78 { return _hashVal;}

◆ nHashBuckets()

static unsigned int IfdKey::nHashBuckets ( void )
inlinestatic

Definition at line 82 of file IfdKey.h.

83 { return _nHashBuckets; }

◆ operator!=()

int IfdKey::operator!= ( const IfdKey & k) const
inline

Definition at line 182 of file IfdKey.h.

182 {
183//*****************************************************************************
184
185 return ! ( *this == k );
186}

◆ operator==()

virtual int IfdKey::operator== ( const IfdKey & ) const
pure virtual

Implemented in IfdIntKey, and IfdStrKey.

◆ print()

virtual void IfdKey::print ( std::ostream & o) const
pure virtual

Implemented in IfdIntKey, and IfdStrKey.

Referenced by operator<<().

Friends And Related Symbol Documentation

◆ BdbOdfIfdTypeKeyIFace

friend class BdbOdfIfdTypeKeyIFace
friend

Definition at line 136 of file IfdKey.h.

◆ IfdCompositeKey

friend class IfdCompositeKey
friend

Definition at line 135 of file IfdKey.h.

◆ IfdIntKey

friend class IfdIntKey
friend

Definition at line 132 of file IfdKey.h.

Referenced by IfdIntKey::clone().

◆ ifdKeyHash

unsigned ifdKeyHash ( const IfdDictKey & k)
friend

◆ IfdStrKey

friend class IfdStrKey
friend

Definition at line 133 of file IfdKey.h.

Referenced by IfdStrKey::clone().

◆ IfdTypeKeyIFace

friend class IfdTypeKeyIFace
friend

Definition at line 134 of file IfdKey.h.

◆ operator<<

std::ostream & operator<< ( std::ostream & o,
const IfdKey & k )
friend

Member Data Documentation

◆ [union]

union { ... } IfdKey

◆ _hashVal

unsigned int IfdKey::_hashVal

◆ _myCardinality

int IfdKey::_myCardinality
protected

Definition at line 122 of file IfdKey.h.

Referenced by cardinality().

◆ _myKeyKind

keyKind IfdKey::_myKeyKind
protected

Definition at line 116 of file IfdKey.h.

Referenced by getKeyKind().

◆ intVal

int IfdKey::intVal

◆ strVal

◆ uintVal

unsigned int IfdKey::uintVal

Definition at line 127 of file IfdKey.h.


The documentation for this class was generated from the following files: