2 * OutOfBoundsException.hpp
\r
4 * Copyright 2006,2007 Martin Quinson, Malek Cherier
\r
5 * All right reserved.
\r
7 * This program is free software; you can redistribute
\r
8 * it and/or modify it under the terms of the license
\r
9 *(GNU LGPL) which comes with this package.
\r
13 #ifndef MSG_OUTOFBOUNDSEXCEPTION_HPP
\r
14 #define MSG_OUTOFBOUNDSEXCEPTION_HPP
\r
17 #error OutOfBoundsException.hpp requires C++ compilation (use a .cxx suffix)
\r
20 #include <Exception.hpp>
\r
27 class SIMGRIDX_EXPORT OutOfBoundsException : public Exception
\r
31 // Default constructor.
\r
32 OutOfBoundsException();
\r
34 // Copy constructor.
\r
35 OutOfBoundsException(const OutOfBoundsException& rOutOfBoundsException);
\r
37 // This constructor takes the position in the range.
\r
38 OutOfBoundsException(int pos);
\r
40 OutOfBoundsException(int pos1, int pos2);
\r
43 virtual ~OutOfBoundsException();
\r
47 // Returns the reason of the exception :
\r
48 // the message "Out of bounds : `pos'"
\r
49 const char* toString(void) const;
\r
54 const OutOfBoundsException& operator = (const OutOfBoundsException& rOutOfBoundsException);
\r
60 // A buffer used to build the message returned by the methode toString().
\r
67 }// namespace SimGrid
\r
70 #endif // !MSG_MSGEXCEPTION_HPP
\r