Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

StDbStoreInfo Class Reference

#include <StDbStoreInfo.hh>

List of all members.

Public Member Functions

 StDbStoreInfo ()
 ~StDbStoreInfo ()
int * getDataIDs (int &numRows)
void addWrittenRow (int dataID)
void commit ()
bool canRollBack ()
bool hasData ()
void resetStoreInfo ()

Protected Member Functions

void reSizeInternalStore ()

Protected Attributes

int * mdataIDs
int mnumRows
int mMaxRows
bool mcanRollBack


Constructor & Destructor Documentation

StDbStoreInfo::StDbStoreInfo  ) 
 

Definition at line 38 of file StDbStoreInfo.cc.

00038 : mdataIDs(0), mnumRows(0), mMaxRows(0), mcanRollBack(false) {};

StDbStoreInfo::~StDbStoreInfo  ) 
 

Definition at line 40 of file StDbStoreInfo.cc.

00040 { resetStoreInfo(); }


Member Function Documentation

void StDbStoreInfo::addWrittenRow int  dataID  ) 
 

Definition at line 68 of file StDbStoreInfo.cc.

00068 { 00069 00070 if(mnumRows==mMaxRows)reSizeInternalStore(); 00071 mdataIDs[mnumRows]=dataID; 00072 mnumRows++; 00073 00074 };

bool StDbStoreInfo::canRollBack  )  [inline]
 

Definition at line 67 of file StDbStoreInfo.hh.

00067 { return mcanRollBack; }

void StDbStoreInfo::commit  )  [inline]
 

Definition at line 66 of file StDbStoreInfo.hh.

00066 { mcanRollBack=false; }

int * StDbStoreInfo::getDataIDs int &  numRows  ) 
 

Definition at line 61 of file StDbStoreInfo.cc.

00061 { 00062 numRows=mnumRows; 00063 return mdataIDs; 00064 }

bool StDbStoreInfo::hasData  )  [inline]
 

Definition at line 68 of file StDbStoreInfo.hh.

00068 { return (bool) mnumRows; };

void StDbStoreInfo::resetStoreInfo  ) 
 

Definition at line 77 of file StDbStoreInfo.cc.

00077 { 00078 if(mdataIDs) delete [] mdataIDs; 00079 mdataIDs=0; 00080 mnumRows=0; 00081 mMaxRows=0; 00082 mcanRollBack=false; 00083 }

void StDbStoreInfo::reSizeInternalStore  )  [protected]
 

Definition at line 44 of file StDbStoreInfo.cc.

00044 { 00045 00046 int newMaxRows = mMaxRows+N_ROWS_INCREMENT; 00047 int* newDataIDs = new int[newMaxRows]; 00048 00049 memset(newDataIDs,0,newMaxRows*sizeof(int)); 00050 if(mdataIDs){ 00051 memcpy(newDataIDs,mdataIDs,mnumRows*sizeof(int)); 00052 delete [] mdataIDs; 00053 } 00054 mdataIDs = newDataIDs; 00055 mMaxRows = newMaxRows; 00056 00057 }


Member Data Documentation

bool StDbStoreInfo::mcanRollBack [protected]
 

Definition at line 45 of file StDbStoreInfo.hh.

int* StDbStoreInfo::mdataIDs [protected]
 

Definition at line 41 of file StDbStoreInfo.hh.

int StDbStoreInfo::mMaxRows [protected]
 

Definition at line 43 of file StDbStoreInfo.hh.

int StDbStoreInfo::mnumRows [protected]
 

Definition at line 42 of file StDbStoreInfo.hh.


The documentation for this class was generated from the following files:
Generated on Thu Aug 24 14:46:03 2006 for Doxygen by doxygen 1.3.7