32 #include "StDbElementIndex.hh"
35 StDbElementIndex::StDbElementIndex() { clearIndex(); };
40 mnumIndeces = inval.getNumIndeces();
44 while ( (ctest=inval.printNextIndex(ival)) ){
45 strcpy(mnvals[mcurrent].iname,ctest);
46 mnvals[mcurrent].ival = ival;
59 mnumIndeces = inval->getNumIndeces();
60 inval->resetCounter();
63 while ( (ctest=inval->printNextIndex(ival))){
64 strcpy(mnvals[mcurrent].iname,ctest);
65 mnvals[mcurrent].ival = ival;
70 inval->resetCounter();
76 StDbElementIndex::addNameValuePair(
const char* name,
int ival){
78 strcpy(mnvals[mnumIndeces].iname,name);
79 mnvals[mnumIndeces].ival = ival;
80 int retVal=mnumIndeces;
88 StDbElementIndex::getIndexName(
int indexNumber){
90 if(indexNumber<mnumIndeces){
91 retVal =
new char[strlen((
char*)mnvals[indexNumber].iname)+1];
92 strcpy(retVal,(
char*)mnvals[indexNumber].iname);
100 StDbElementIndex::getNextIndex(
int& indexVal) {
102 if(mcurrent<mnumIndeces){
103 retVal =
new char[strlen((
char*)mnvals[mcurrent].iname)+1];
104 strcpy(retVal,(
char*)mnvals[mcurrent].iname);
105 indexVal=mnvals[mcurrent].ival;
113 StDbElementIndex::printNextIndex(
int& indexVal) {
115 if(mcurrent<mnumIndeces){
116 retVal = (
char*)mnvals[mcurrent].iname;
117 indexVal=mnvals[mcurrent].ival;