University of Sheffield   

    The Simons
    Component Library

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

DataError.h

00001 
00002 //
00003 //  SCL : Simons Component Library
00004 //
00006 //
00007 //  Filename:   DataError.h
00008 //  Contents:   DataError class, signalling failed data transfer
00009 //  Author:     Anthony J H Simons
00010 //  Revised:    30 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_DATA_ERROR
00020 #define SCL_DATA_ERROR
00021 
00022 #include "Exception.h"          // Include my superclass type
00023 #include "DataErrorID.h"        // Include my pointer type
00024 
00025 #include "StringID.h"           // Depend on the pointer types
00026 #include "StreamID.h"
00027 
00033 
00034 class DataError : public Exception {
00035 protected:
00036         StringID failedMethod;  
00037         ObjectID failedDatum;   
00038         DataError(const DataError&);
00039 public:
00040         DataError();
00041         virtual ~DataError();
00042         DataError(StreamID, StringID, ObjectID, StringID);
00043         StringID method() const;
00044         ObjectID datum() const;
00045 };
00046 
00048 
00051 inline StringID DataError::method() const { return failedMethod; }
00052 
00055 inline ObjectID DataError::datum() const { return failedDatum; }
00056 
00057 
00059 
00062 inline DataErrorID::DataErrorID() {}
00063 
00065 inline DataErrorID::~DataErrorID() {}
00066 
00070 inline DataErrorID::DataErrorID(const Null* null) :
00071         ExceptionID(null) {}
00072         
00076 inline DataErrorID::DataErrorID(const DataError* exception) :
00077         ExceptionID(exception) {}
00078         
00082 inline DataErrorID::DataErrorID(const DataErrorID& pointer) :
00083         ExceptionID(pointer) {}
00084         
00088 inline DataErrorID& DataErrorID::operator=(const DataError* exception) {
00089         assign(exception);
00090         return *this;
00091 }
00092 
00097 inline DataErrorID& DataErrorID::operator=(const DataErrorID& pointer) {
00098         assign(pointer);
00099         return *this;
00100 }
00101 
00102 
00103 #endif
00104 
00105 

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