Classmacro - Processes observation file filter calls creating Classfilter objects.
class __declspec(dllexport) Classmacro {
public:
Classmacro(ClassData *File); // constructor.
~Classmacro(); // destructor.
ClassData *File; // Current ClassData object.
TStringList *FilterList; // List to hold filters used by a ClassData object.
void addfilter(String Line); // Processes filter lines in observation file.
void fixup(void); // Memory is not allocated until after all the header lines in observation file are read.
void execute(long Line); // Executed for every observation line read.
};
Member Functions.
Constructor.
Creates a new FilterList to store observation filters used by current ClassData object.
Destructor
Deletes filters in FilterList and then the FilterList.
void addfilter(String Line);
Processes filter lines in observation file to determine filter type. Then instantiates the filter class and adds the object to the FilterList. If there is an error generates a CHMException.
void fixup(void);
Memory is not allocated until after all header lines in observation file are read. After memory is allocated the FilterList is gone through calling all the filter *->fixup() routines which calculate the actual pointers for observation variables used by the filter.
void execute(long Line);
Executes after every observation line is read. Using the FilterList, it is able to call the doFunction() of every filter. Parameters include Line and using ObsCnt multiple calls are made to handle observations dimensioned greater than 1.