X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d5ee9e974615a1c7f82bf9f86c5c71e00b8e61f4..8b9f1461e3444561c67dbf0b688d69172b1a8d31:/src/cxx/FileNotFoundException.hpp diff --git a/src/cxx/FileNotFoundException.hpp b/src/cxx/FileNotFoundException.hpp new file mode 100644 index 0000000000..398f1536e9 --- /dev/null +++ b/src/cxx/FileNotFoundException.hpp @@ -0,0 +1,64 @@ +/* + * FileNotFoundException.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_FILENOTFOUND_HPP +#define MSG_FILENOTFOUND_HPP + +#include + +namespace SimGrid +{ + namespace Msg + { + + class FileNotFoundException : public Exception + { + public: + + // Default constructor. + FileNotFoundException(); + + // Copy constructor. + FileNotFoundException(const FileNotFoundException& rFileNotFoundException); + + // This constructor takes the name of the file. + FileNotFoundException(const char* file); + + // Destructor. + virtual ~FileNotFoundException(); + + // Operations. + + // Returns the reason of the exception : + // the message "File not found : `object name'" + const char* toString(void) const; + + // Operators. + + // Assignement. + const FileNotFoundException& operator = (const FileNotFoundException& rFileNotFoundException); + + private : + + // Attributes. + + // A buffer used to build the message returned by the methode toString(). + char* reason; + }; + + + } // namespace Msg + +}// namespace SimGrid + + +#endif // !MSG_MSGEXCEPTION_HPP