/////////////////////////////////////////////////////////// // Softwarebauelemente II, Aufgabe C1.1 // // author: Stephan Brumme // last changes: July 3, 2001 #if !defined(AFX_EXCEPTION_H__183BDBA1_545F_11D5_9BB8_A7F13DB29851__INCLUDED_) #define AFX_EXCEPTION_H__183BDBA1_545F_11D5_9BB8_A7F13DB29851__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "BasicClass.h" class CException : public CBasicClass { public: // construct new exception CException(); CException(const string strError, const CBasicClass* pSource); CException(const CException& exception); virtual ~CException() {}; // return class name virtual string ClassnameOf() const { return "CException"; } // display the attributes virtual string Show() const; // only for internal purposes ! virtual string ShowDebug() const; // validate an exception virtual bool ClassInvariant() const; // compare two exceptions bool operator==(const CException& house) const; virtual bool EqualValue(const CBasicClass* pClass) const; // copy one exception to another one CException& operator=(const CException &house); virtual bool Copy(const CBasicClass* pClass); private: string m_strError; const CBasicClass* m_pSource; }; #endif // !defined(AFX_EXCEPTION_H__183BDBA1_545F_11D5_9BB8_A7F13DB29851__INCLUDED_)