On 10/2/2017 6:15 PM,
asetof...@gmail.com wrote:
> For me "error object" is one special object (among all objects can be in its type)
>
> one real object with its memory etc all ok, only differ with a bit on, or one its member for example int ==1
>
Nope. This is an fstream object with a state that indicates an error.
It is not an error object.
> example for
> 0..255 type number (8 bit unsigned) would be the value 255
> 0..0xFFFFFFFF type number error object would be
> 0xFFFFFFFF
> [one should have 0..0xFFFFFFFE for normal value and 0xFFFFFFFF for error ]
> for
> class name{int e; char*a; u32 sz};
> with
> name x;
> should be the object with x.e==1
> (if it is 0 than all ok)
> And so on
>
It makes no difference. It is an fstream object - as defined in the
source code. The fact there was an open error does not change that.
And in OO, a properly defined object will only allow valid operations;
it will not allow invalid operations. For instance, writing to an
fstream which has not been opened will also cause an error.
You REALLY need to understand proper OO design and terminology. It is
obvious you don't (as well as having a crappy programming style that no
project manager in his right mind would accept).