J
JustSomeGuy
I have written a C methods to support a medical imaging file format.
I wish to port this class to C++.
I think it should inherit from ifstream.
That is I want to define a class called d3p10_stream.
class d3p10_stream : public ifstream
{
private:
unsigned short myStreamState;
public:
d3p10_stream(void);
d3p10_stream & operator>>(d3p1o_stream & str, someObject & o);
d3p10_stream & operator>>(d3p1o_stream & str, someOtherObject & o);
~d3p10_stream(void);
};
Such that when methods like read, operator>>, close, open are
called my methods are called.
Do you think this is the correct way to implement a specialize
file format reader class?
Do you agree with the methods I've decided to over-ride?
Should other methods be overridden as well?
I wish to port this class to C++.
I think it should inherit from ifstream.
That is I want to define a class called d3p10_stream.
class d3p10_stream : public ifstream
{
private:
unsigned short myStreamState;
public:
d3p10_stream(void);
d3p10_stream & operator>>(d3p1o_stream & str, someObject & o);
d3p10_stream & operator>>(d3p1o_stream & str, someOtherObject & o);
~d3p10_stream(void);
};
Such that when methods like read, operator>>, close, open are
called my methods are called.
Do you think this is the correct way to implement a specialize
file format reader class?
Do you agree with the methods I've decided to over-ride?
Should other methods be overridden as well?