X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Ffail.cpp;h=4fd01997fda73b5c0b1779e31f8d1e204e0e94ea;hb=5136cb28833944aedbd47e1f66cd4a103e6697b1;hp=37baafba9b593d1ac6669bd2b747d8d4281a2da1;hpb=703c6cebb5d3d395437e73e6935f3691aed68e0a;p=ginac.git diff --git a/ginac/fail.cpp b/ginac/fail.cpp index 37baafba..4fd01997 100644 --- a/ginac/fail.cpp +++ b/ginac/fail.cpp @@ -4,7 +4,7 @@ * obsolete all this stuff ought to be replaced by exceptions. */ /* - * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,43 +25,19 @@ #include "archive.h" #include "debugmsg.h" -#ifndef NO_NAMESPACE_GINAC namespace GiNaC { -#endif // ndef NO_NAMESPACE_GINAC GINAC_IMPLEMENT_REGISTERED_CLASS(fail, basic) ////////// -// default constructor, destructor, copy constructor assignment operator and helpers +// default ctor, dtor, copy ctor assignment operator and helpers ////////// // public fail::fail() : inherited(TINFO_fail) { - debugmsg("fail default constructor",LOGLEVEL_CONSTRUCT); -} - -fail::~fail() -{ - debugmsg("fail destructor",LOGLEVEL_DESTRUCT); - destroy(0); -} - -fail::fail(const fail & other) -{ - debugmsg("fail copy constructor",LOGLEVEL_CONSTRUCT); - copy(other); -} - -const fail & fail::operator=(const fail & other) -{ - debugmsg("fail operator=",LOGLEVEL_ASSIGNMENT); - if (this != &other) { - destroy(1); - copy(other); - } - return *this; + debugmsg("fail default ctor",LOGLEVEL_CONSTRUCT); } // protected @@ -76,13 +52,6 @@ void fail::destroy(bool call_parent) if (call_parent) inherited::destroy(call_parent); } - -////////// -// other constructors -////////// - -// none - ////////// // archiving ////////// @@ -90,7 +59,7 @@ void fail::destroy(bool call_parent) /** Construct object from archive_node. */ fail::fail(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("fail constructor from archive_node", LOGLEVEL_CONSTRUCT); + debugmsg("fail ctor from archive_node", LOGLEVEL_CONSTRUCT); } /** Unarchive the object. */ @@ -111,12 +80,6 @@ void fail::archive(archive_node &n) const // public -basic * fail::duplicate() const -{ - debugmsg("fail duplicate",LOGLEVEL_DUPLICATE); - return new fail(*this); -} - void fail::print(std::ostream & os, unsigned upper_precedence) const { debugmsg("fail print",LOGLEVEL_PRINT); @@ -137,31 +100,4 @@ int fail::compare_same_type(const basic & other) const return 0; } -////////// -// new virtual functions which can be overridden by derived classes -////////// - -// none - -////////// -// non-virtual functions in this class -////////// - -// none - -////////// -// static member variables -////////// - -// none - -////////// -// global constants -////////// - -const fail some_fail; -const type_info & typeid_fail=typeid(some_fail); - -#ifndef NO_NAMESPACE_GINAC } // namespace GiNaC -#endif // ndef NO_NAMESPACE_GINAC