University of Sheffield   

    The Simons
    Component Library

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

TypeFailure.h

00001 
00002 //
00003 //  SCL : Simons Component Library
00004 //
00006 //
00007 //  Filename:   TypeFailure.h
00008 //  Contents:   TypeFailure class, signalling an invalid Object
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_TYPE_FAILURE
00020 #define SCL_TYPE_FAILURE
00021 
00022 #include "ObjectError.h"        // Include my superclass type
00023 #include "TypeFailureID.h"      // Include my pointer type
00024 
00025 #include "TypeID.h"             // Depend on the pointer type
00026 
00043 
00044 class TypeFailure : public ObjectError {
00045 protected:
00046         TypeFailure(const TypeFailure&);
00047 public:
00048         TypeFailure();
00049         virtual ~TypeFailure();
00050         TypeFailure(ObjectID, TypeID);
00051         TypeFailure(ObjectID, ObjectID);
00052         virtual ObjectID clone() const;
00053         TypeID actualType() const;
00054 };
00055 
00057 
00060 inline TypeID TypeFailure::actualType() const {
00061         return failedObject->type();
00062 }
00063 
00065 
00068 inline TypeFailureID::TypeFailureID() {}
00069 
00071 inline TypeFailureID::~TypeFailureID() {}
00072 
00076 inline TypeFailureID::TypeFailureID(const Null* null) :
00077         ObjectErrorID(null) {}
00078         
00082 inline TypeFailureID::TypeFailureID(const TypeFailure* exception) :
00083         ObjectErrorID(exception) {}
00084         
00088 inline TypeFailureID::TypeFailureID(const TypeFailureID& pointer) :
00089         ObjectErrorID(pointer) {}
00090         
00094 inline TypeFailureID& TypeFailureID::operator=(const TypeFailure* exception) {
00095         assign(exception);
00096         return *this;
00097 }
00098 
00103 inline TypeFailureID& TypeFailureID::operator=(const TypeFailureID& pointer) {
00104         assign(pointer);
00105         return *this;
00106 }
00107 
00108 
00109 #endif
00110 
00111 

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