K
Krivenok Dmitry
Hello All!
I have problem, but I don't know how to implement it.
Problem description:
I have file with records (usually record = string).
I want encapsulate all work with file in secial class "Source".
I suggest This class should contain ifstream object and GetRecord
method.
But I have several source files with different formats (very
different!)
And of course I want use my class in all cases!
Therein lies a problem!!!
I see following solution:
Constructor of Source class have 2 params:
1) Name of source file
2) Regular expression (std::string)
GetRecord method should get records from ifstream in accordance with
regular expression!
But how to implement this idea in C++???
I have problem, but I don't know how to implement it.
Problem description:
I have file with records (usually record = string).
I want encapsulate all work with file in secial class "Source".
I suggest This class should contain ifstream object and GetRecord
method.
But I have several source files with different formats (very
different!)
And of course I want use my class in all cases!
Therein lies a problem!!!
I see following solution:
Constructor of Source class have 2 params:
1) Name of source file
2) Regular expression (std::string)
GetRecord method should get records from ifstream in accordance with
regular expression!
But how to implement this idea in C++???