X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9b1ec3c5445076d8f5827f850a9a5e9ea4853696..211acce5bb9cf1a60e14cab26b54367028474d79:/src/cxx/InvalidArgumentException.hpp diff --git a/src/cxx/InvalidArgumentException.hpp b/src/cxx/InvalidArgumentException.hpp index e81fdd406a..5b779b57aa 100644 --- a/src/cxx/InvalidArgumentException.hpp +++ b/src/cxx/InvalidArgumentException.hpp @@ -1,64 +1,69 @@ -/* - * InvalidArgumentException.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_INVALIDARGUMENTEXCEPTION_HPP -#define MSG_INVALIDARGUMENTEXCEPTION_HPP - -#include "Exception.hpp" - -namespace SimGrid -{ - namespace Msg - { - - class InvalidArgumentException : public Exception - { - public: - - // Default constructor. - InvalidArgumentException(); - - // Copy constructor. - InvalidArgumentException(const InvalidArgumentException& rInvalidArgumentException); - - // This constructor takes the name of the invalid argument. - InvalidArgumentException(const char* name); - - // Destructor. - virtual ~InvalidArgumentException(); - - // Operations. - - // Returns the reason of the exception : - // the message "Invalid argument `argument name'" - const char* toString(void) const; - - // Operators. - - // Assignement. - const InvalidArgumentException& operator = (const InvalidArgumentException& rInvalidArgumentException); - - private : - - // Attributes. - - // A buffer used to build the message returned by the methode toString(). - char* reason; - }; - - - } // namespace Msg - -}// namespace SimGrid - - -#endif // !MSG_INVALIDARGUMENTEXCEPTION_HPP +/* + * InvalidArgumentException.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_INVALIDARGUMENTEXCEPTION_HPP +#define MSG_INVALIDARGUMENTEXCEPTION_HPP + +#ifndef __cplusplus + #error InvalidArgumentException.hpp requires C++ compilation (use a .cxx suffix) +#endif + +#include + +namespace SimGrid +{ + namespace Msg + { + + class SIMGRIDX_EXPORT InvalidArgumentException : public Exception + { + public: + + // Default constructor. + InvalidArgumentException(); + + // Copy constructor. + InvalidArgumentException(const InvalidArgumentException& rInvalidArgumentException); + + // This constructor takes the name of the invalid argument. + InvalidArgumentException(const char* name); + + // Destructor. + virtual ~InvalidArgumentException(); + + // Operations. + + // Returns the reason of the exception : + // the message "Invalid argument `argument name'" + const char* toString(void) const; + + // Operators. + + // Assignement. + const InvalidArgumentException& operator = (const InvalidArgumentException& rInvalidArgumentException); + + private : + + // Attributes. + + // A buffer used to build the message returned by the methode toString(). + char* reason; + }; + + + } // namespace Msg + +}// namespace SimGrid + + +#endif // !MSG_INVALIDARGUMENTEXCEPTION_HPP +