3 * Implementation of class signaling failure of operation. Considered
4 * obsolete all this stuff ought to be replaced by exceptions. */
9 // default constructor, destructor, copy constructor assignment operator and helpers
14 fail::fail() : basic(TINFO_FAIL)
16 debugmsg("fail default constructor",LOGLEVEL_CONSTRUCT);
21 debugmsg("fail destructor",LOGLEVEL_DESTRUCT);
25 fail::fail(fail const & other)
27 debugmsg("fail copy constructor",LOGLEVEL_CONSTRUCT);
31 fail const & fail::operator=(fail const & other)
33 debugmsg("fail operator=",LOGLEVEL_ASSIGNMENT);
43 void fail::copy(fail const & other)
48 void fail::destroy(bool call_parent)
50 if (call_parent) basic::destroy(call_parent);
61 // functions overriding virtual functions from bases classes
66 basic * fail::duplicate() const
68 debugmsg("fail duplicate",LOGLEVEL_DUPLICATE);
69 return new fail(*this);
74 int fail::compare_same_type(basic const & other) const
76 // two fails are always identical
81 // new virtual functions which can be overridden by derived classes
87 // non-virtual functions in this class
93 // static member variables
102 const fail some_fail;
103 type_info const & typeid_fail=typeid(some_fail);