X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2371d0c1060589bd7b8757f47974ceaa906e0dba..fccf53a380a9a6de6c8bd9eafb182a91d79e1d3c:/src/cxx/NullPointerException.hpp diff --git a/src/cxx/NullPointerException.hpp b/src/cxx/NullPointerException.hpp index a7ce0ea023..d23f8c68af 100644 --- a/src/cxx/NullPointerException.hpp +++ b/src/cxx/NullPointerException.hpp @@ -1,64 +1,69 @@ -/* - * NullPointerException.hpp - * - * Copyright 2006,2007 Martin Quinson, Malek Cherier - * All right reserved. - * - * This program is free software; you can redistribute - * it and/or modify it under the terms of the license - *(GNU LGPL) which comes with this package. - * - */ - -#ifndef MSG_NULLPOINTEREXCEPTION_HPP -#define MSG_NULLPOINTEREXCEPTION_HPP - -#include - -namespace SimGrid -{ - namespace Msg - { - - class SIMGRIDX_EXPORT NullPointerException : public Exception - { - public: - - // Default constructor. - NullPointerException(); - - // Copy constructor. - NullPointerException(const NullPointerException& rNullPointerException); - - // This constructor takes the name of the invalid argument. - NullPointerException(const char* name); - - // Destructor. - virtual ~NullPointerException(); - - // Operations. - - // Returns the reason of the exception : - // the message "Null pointer `pointer name'" - const char* toString(void) const; - - // Operators. - - // Assignement. - const NullPointerException& operator = (const NullPointerException& rNullPointerException); - - private : - - // Attributes. - - // A buffer used to build the message returned by the methode toString(). - char* reason; - }; - - - } // namespace Msg - -}// namespace SimGrid - - -#endif // !MSG_NULLPOINTEREXCEPTION_HPP +/* + * NullPointerException.hpp + * + * Copyright 2006,2007 Martin Quinson, Malek Cherier + * All right reserved. + * + * This program is free software; you can redistribute + * it and/or modify it under the terms of the license + *(GNU LGPL) which comes with this package. + * + */ + +#ifndef MSG_NULLPOINTEREXCEPTION_HPP +#define MSG_NULLPOINTEREXCEPTION_HPP + +#ifndef __cplusplus + #error NullPointerException.hpp requires C++ compilation (use a .cxx suffix) +#endif + +#include + +namespace SimGrid +{ + namespace Msg + { + + class SIMGRIDX_EXPORT NullPointerException : public Exception + { + public: + + // Default constructor. + NullPointerException(); + + // Copy constructor. + NullPointerException(const NullPointerException& rNullPointerException); + + // This constructor takes the name of the invalid argument. + NullPointerException(const char* name); + + // Destructor. + virtual ~NullPointerException(); + + // Operations. + + // Returns the reason of the exception : + // the message "Null pointer `pointer name'" + const char* toString(void) const; + + // Operators. + + // Assignement. + const NullPointerException& operator = (const NullPointerException& rNullPointerException); + + private : + + // Attributes. + + // A buffer used to build the message returned by the methode toString(). + char* reason; + }; + + + } // namespace Msg + +}// namespace SimGrid + + +#endif // !MSG_NULLPOINTEREXCEPTION_HPP +