]> www.ginac.de Git - ginac.git/blobdiff - ginac/fail.cpp
- introduced info_flags::cinteger, info_flags::crational,
[ginac.git] / ginac / fail.cpp
index b97d0c4edfc89360793b03918ae56a0110bb4154..bc75c47e9b224b13230c2cde45b6728f88913d3f 100644 (file)
@@ -1,8 +1,9 @@
 /** @file fail.cpp
  *
  *  Implementation of class signaling failure of operation. Considered
- *  obsolete all this stuff ought to be replaced by exceptions.
- *
+ *  obsolete all this stuff ought to be replaced by exceptions. */
+
+/*
  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  */
 
 #include "fail.h"
+#include "debugmsg.h"
+
+#ifndef NO_GINAC_NAMESPACE
+namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -86,6 +92,18 @@ basic * fail::duplicate() const
     return new fail(*this);
 }
 
+void fail::print(ostream & os, unsigned upper_precedence) const
+{
+    debugmsg("fail print",LOGLEVEL_PRINT);
+    os << "FAIL";
+}
+
+void fail::printraw(ostream & os) const
+{
+    debugmsg("fail printraw",LOGLEVEL_PRINT);
+    os << "FAIL";
+}
+
 // protected
 
 int fail::compare_same_type(basic const & other) const
@@ -119,3 +137,6 @@ int fail::compare_same_type(basic const & other) const
 const fail some_fail;
 type_info const & typeid_fail=typeid(some_fail);
 
+#ifndef NO_GINAC_NAMESPACE
+} // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE