28 #ifndef __TEMPLATEDATA 29 #define __TEMPLATEDATA 40 typedef enum { fldInt, fldDouble, fldString } fldType;
53 void SetName(ConstCString fname);
54 std::string fieldName;
71 void SetName(ConstCString tname);
72 const char* GetName() {
return fTemplateName.c_str(); };
74 int32 GetNumFields() {
return static_cast<int32
>(fFieldList.size()); };
75 void SetIDIndex(int16 idindex) { fIDIndex = idindex; };
76 int16 GetIDIndex() {
return fIDIndex; };
79 void SetField(int16 index, ConstCString fname, int32 value, bool16 isID = kFalse);
80 void SetField(int16 index, ConstCString fname,
double value, bool16 isID = kFalse);
81 void SetField(int16 index, ConstCString fname,
PMString& value, bool16 isID = kFalse);
83 void GetField(int16 index, int32 *value) { *value = fFieldList[index]->anInt; };
84 void GetField(int16 index,
double *value) { *value = fFieldList[index]->aDouble; };
85 void GetField(int16 index,
PMString& value) { value = *(fFieldList[index]->aString); };
86 fldType GetFieldType(int16 index) {
return fFieldList[index]->fieldType; };
87 const std::string GetFieldName(int16 index) {
return fFieldList[index]->fieldName; };
90 std::string fTemplateName;
97 #endif // __TEMPLATEDATA