X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9b1ec3c5445076d8f5827f850a9a5e9ea4853696..10d3db6766e9f19b11986ac1859bc6e6ca2ed49a:/src/cxx/Exception.hpp diff --git a/src/cxx/Exception.hpp b/src/cxx/Exception.hpp index ad22e99387..2fc3067809 100644 --- a/src/cxx/Exception.hpp +++ b/src/cxx/Exception.hpp @@ -1,61 +1,68 @@ -/* - * Exception.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_EXCEPTION_HPP -#define MSG_EXCEPTION_HPP - -namespace SimGrid -{ - namespace Msg - { - - class Exception - { - public: - - // Default constructor. - Exception(); - - // Copy constructor. - Exception(const Exception& rException); - - // This constructor takes the reason of the exception. - Exception(const char* reason); - - // Destructor. - virtual ~Exception(); - - // Operations. - - // Returns the reason of the exception. - const char* toString(void) const; - - // Operators. - - // Assignement. - const Exception& operator = (const Exception& rException); - - private : - - // Attributes. - - // The reason of the exceptions. - const char* reason; - }; - - - } // namespace Msg - -}// namespace SimGrid - - -#endif // !MSG_EXCEPTION_HPP +/* + * Exception.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_EXCEPTION_HPP +#define MSG_EXCEPTION_HPP + +#ifndef __cplusplus + #error Exception.hpp requires C++ compilation (use a .cxx suffix) +#endif + +#include + +namespace SimGrid +{ + namespace Msg + { + + class SIMGRIDX_EXPORT Exception + { + public: + + // Default constructor. + Exception(); + + // Copy constructor. + Exception(const Exception& rException); + + // This constructor takes the reason of the exception. + Exception(const char* reason); + + // Destructor. + virtual ~Exception(); + + // Operations. + + // Returns the reason of the exception. + const char* toString(void) const; + + // Operators. + + // Assignement. + const Exception& operator = (const Exception& rException); + + private : + + // Attributes. + + // The reason of the exceptions. + const char* reason; + }; + + + } // namespace Msg + +}// namespace SimGrid + + +#endif // !MSG_EXCEPTION_HPP +