Reputation: 87
I am working on an application that reads files from an input directory,processes them and loads them on to DB. The two classes Filelist and CurrentFile are part of the application. The class defintions are as below.
class Filelist
{
//list of files
list of files;
// pointer to the current file
CurrentFile *ptr
};
class CurrentFile
{
vector<list of records>
methods to process the records
..
..
};
I have to add another Audit structure that keeps track of successfully processed records and errored out records. This audit structure gets loaded into the DB after all the files are processed.
struct Recaudit
{
//record to keep track of
//Various counts
int successcnt;
int errorcnt;
billedcnt;
some other counts related to the records
};
This audit record has its data set across multiple methods of CurrentFile.
Can this audit record be made a member variable of CurrentFile (or) should I declare it as a static global variable?
Upvotes: 0
Views: 132
Reputation: 25927
I guess, that Audit is some kind of log? You have to make a decision about its purpose.
Upvotes: 1