32 #ifndef STDBELEMENTINDEX_HH
33 #define STDBELEMENTINDEX_HH
35 #define N_MAX_INDEXVALS 10
57 virtual void clearIndex();
60 virtual int addNameValuePair(
const char* name,
int ival);
61 virtual int getNumIndeces()
const;
62 virtual int getIndexVal(
int indexNumber);
63 virtual char* getIndexName(
int indexNumber);
64 virtual char* printIndexName(
int indexNumber);
66 virtual void resetCounter();
67 virtual char* getNextIndex(
int& indexVal);
68 virtual char* printNextIndex(
int& indexVal);
72 inline void StDbElementIndex::clearIndex() {
73 mcurrent=0; mnumIndeces=0;
76 inline int StDbElementIndex::getNumIndeces()
const {
return mnumIndeces; }
78 inline int StDbElementIndex::getIndexVal(
int indexNum) {
79 if(indexNum>=N_MAX_INDEXVALS)
return -1;
80 return mnvals[indexNum].ival;
82 inline char* StDbElementIndex::printIndexName(
int indexNum) {
83 if(indexNum>=N_MAX_INDEXVALS)
return (
char*)0;
84 return (
char*)mnvals[indexNum].iname;
86 inline void StDbElementIndex::resetCounter() { mcurrent=0; }