00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
#ifndef DIME_RECORDHOLDER_H
00031
#define DIME_RECORDHOLDER_H
00032
00033
#include <dime/Base.h>
00034
00035
class dimeInput;
00036
class dimeMemHandler;
00037
class dimeOutput;
00038
class dimeRecord;
00039
00040 class DIME_DLL_API dimeRecordHolder :
public dimeBase
00041 {
00042
public:
00043 dimeRecordHolder(
const int separator);
00044
virtual ~dimeRecordHolder();
00045
00046
void setRecord(
const int groupcode,
const dimeParam &value,
00047
dimeMemHandler *
const memhandler = NULL);
00048
void setRecords(
const int *
const groupcodes,
00049
const dimeParam *
const params,
00050
const int numrecords,
00051
dimeMemHandler *
const memhandler = NULL);
00052
void setIndexedRecord(
const int groupcode,
00053
const dimeParam &value,
00054
const int index,
00055
dimeMemHandler *
const memhandler = NULL);
00056
00057
virtual bool getRecord(
const int groupcode,
00058
dimeParam ¶m,
00059
const int index = 0)
const;
00060
00061
virtual bool read(
dimeInput *
const in);
00062
virtual bool write(
dimeOutput *
const out);
00063
virtual bool isOfType(
const int thetypeid)
const;
00064
virtual int countRecords()
const;
00065
00066
dimeRecord *findRecord(
const int groupcode,
const int index = 0);
00067
00068
int getNumRecordsInRecordHolder(
void)
const;
00069
dimeRecord * getRecordInRecordHolder(
const int idx)
const;
00070
00071
protected:
00072
virtual bool handleRecord(
const int groupcode,
00073
const dimeParam ¶m,
00074
dimeMemHandler *
const memhandler);
00075
00076
bool copyRecords(dimeRecordHolder *
const rh,
00077
dimeMemHandler *
const memhandler)
const;
00078
00079
virtual bool shouldWriteRecord(
const int groupcode)
const;
00080
00081
protected:
00082
dimeRecord **records;
00083
int numRecords;
00084
00085
00086
private:
00087
void setRecordCommon(
const int groupcode,
const dimeParam ¶m,
00088
const int index,
dimeMemHandler *
const memhandler);
00089
00090 };
00091
00092
#endif // ! DIME_RECORDHOLDER_H
00093