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