University of Sheffield   

    The Simons
    Component Library

Introduction   Class Hierarchy   Class Listing   Index of Classes   Index of Methods   Header Files  

MethodError.h

00001 
00002 //
00003 //  SCL : Simons Component Library
00004 //
00006 //
00007 //  Filename:   MethodError.h
00008 //  Contents:   MethodError class, signalling an invalid Method
00009 //  Author:     Anthony J H Simons
00010 //  Revised:    29 November 2005
00011 
00012 // This software is distributed free in the hope that others will
00013 // find it useful.  However, it comes WITHOUT ANY WARRANTY.  No
00014 // liability can be accepted for software failure, merchantability
00015 // or fitness for a particular purpose.  You can redistribute this
00016 // software in its original form, or in a modified form, provided
00017 // that this disclaimer is retained in the file banner.
00018 
00019 #ifndef SCL_METHOD_ERROR
00020 #define SCL_METHOD_ERROR
00021 
00022 #include "Exception.h"          // Include my superclass type
00023 #include "MethodErrorID.h"      // Include my pointer type
00024 
00025 #include "StringID.h"           // Depend on the pointer type
00026 
00033 
00034 class MethodError : public Exception {
00035 protected:
00036         StringID failedMethod;  
00037         MethodError(const MethodError&);
00038 public:
00039         MethodError();
00040         virtual ~MethodError();
00041         MethodError(ObjectID, StringID, StringID);
00042         StringID method() const;
00043 };
00044 
00046 
00049 inline StringID MethodError::method() const { return failedMethod; }
00050 
00051 
00053 
00056 inline MethodErrorID::MethodErrorID() {}
00057 
00059 inline MethodErrorID::~MethodErrorID() {}
00060 
00064 inline MethodErrorID::MethodErrorID(const Null* null) :
00065         ExceptionID(null) {}
00066         
00070 inline MethodErrorID::MethodErrorID(const MethodError* exception) :
00071         ExceptionID(exception) {}
00072         
00076 inline MethodErrorID::MethodErrorID(const MethodErrorID& pointer) :
00077         ExceptionID(pointer) {}
00078         
00082 inline MethodErrorID& MethodErrorID::operator=(const MethodError* exception) {
00083         assign(exception);
00084         return *this;
00085 }
00086 
00091 inline MethodErrorID& MethodErrorID::operator=(const MethodErrorID& pointer) {
00092         assign(pointer);
00093         return *this;
00094 }
00095 
00096 
00097 #endif
00098 
00099 

Generated on Fri May 5 17:17:15 2006 for The Simons Component Library by doxygen1.3