diff --git a/include/fastcdr/exceptions/BadOptionalAccessException.hpp b/include/fastcdr/exceptions/BadOptionalAccessException.hpp index 36e921de..c7f0311f 100644 --- a/include/fastcdr/exceptions/BadOptionalAccessException.hpp +++ b/include/fastcdr/exceptions/BadOptionalAccessException.hpp @@ -24,7 +24,7 @@ namespace exception { * @brief This class is thrown as an exception when accessing the value of a null optional. * @ingroup EXCEPTIONMODULE */ -class BadOptionalAccessException : public Exception +class Cdr_DllAPI BadOptionalAccessException : public Exception { public: @@ -33,7 +33,7 @@ class BadOptionalAccessException : public Exception * * @param message An error message. This message pointer is copied. */ - Cdr_DllAPI BadOptionalAccessException( + BadOptionalAccessException( const char* const& message) noexcept; /*! @@ -41,7 +41,7 @@ class BadOptionalAccessException : public Exception * * @param ex BadOptionalAccessException that will be copied. */ - Cdr_DllAPI BadOptionalAccessException( + BadOptionalAccessException( const BadOptionalAccessException& ex) noexcept; /*! @@ -49,7 +49,7 @@ class BadOptionalAccessException : public Exception * * @param ex BadOptionalAccessException that will be moved. */ - Cdr_DllAPI BadOptionalAccessException( + BadOptionalAccessException( BadOptionalAccessException&& ex) noexcept; /*! @@ -57,7 +57,7 @@ class BadOptionalAccessException : public Exception * * @param ex BadOptionalAccessException that will be copied. */ - Cdr_DllAPI BadOptionalAccessException& operator =( + BadOptionalAccessException& operator =( const BadOptionalAccessException& ex) noexcept; /*! @@ -69,13 +69,13 @@ class BadOptionalAccessException : public Exception BadOptionalAccessException&& ex) noexcept; //! @brief Default destructor - virtual Cdr_DllAPI ~BadOptionalAccessException() noexcept; + virtual ~BadOptionalAccessException() noexcept; //! @brief This function throws the object as exception. - Cdr_DllAPI void raise() const override; + void raise() const override; //! @brief Default message used in the library. - static Cdr_DllAPI const char* const BAD_OPTIONAL_ACCESS_MESSAGE_DEFAULT; + static const char* const BAD_OPTIONAL_ACCESS_MESSAGE_DEFAULT; }; } //namespace exception } //namespace fastcdr diff --git a/include/fastcdr/exceptions/BadParamException.h b/include/fastcdr/exceptions/BadParamException.h index ca74f54c..662e8f95 100644 --- a/include/fastcdr/exceptions/BadParamException.h +++ b/include/fastcdr/exceptions/BadParamException.h @@ -24,7 +24,7 @@ namespace exception { * @brief This class is thrown as an exception when an invalid parameter is being serialized. * @ingroup EXCEPTIONMODULE */ -class BadParamException : public Exception +class Cdr_DllAPI BadParamException : public Exception { public: @@ -33,7 +33,7 @@ class BadParamException : public Exception * * @param message An error message. This message pointer is copied. */ - Cdr_DllAPI BadParamException( + BadParamException( const char* const& message) noexcept; /*! @@ -41,7 +41,7 @@ class BadParamException : public Exception * * @param ex BadParamException that will be copied. */ - Cdr_DllAPI BadParamException( + BadParamException( const BadParamException& ex) noexcept; /*! @@ -49,7 +49,7 @@ class BadParamException : public Exception * * @param ex BadParamException that will be moved. */ - Cdr_DllAPI BadParamException( + BadParamException( BadParamException&& ex) noexcept; /*! @@ -57,7 +57,7 @@ class BadParamException : public Exception * * @param ex BadParamException that will be copied. */ - Cdr_DllAPI BadParamException& operator =( + BadParamException& operator =( const BadParamException& ex) noexcept; /*! @@ -69,13 +69,13 @@ class BadParamException : public Exception BadParamException&& ex) noexcept; //! @brief Default destructor - virtual Cdr_DllAPI ~BadParamException() noexcept; + virtual ~BadParamException() noexcept; //! @brief This function throws the object as exception. - Cdr_DllAPI void raise() const override; + void raise() const override; //! @brief Default message used in the library. - static Cdr_DllAPI const char* const BAD_PARAM_MESSAGE_DEFAULT; + static const char* const BAD_PARAM_MESSAGE_DEFAULT; }; } //namespace exception } //namespace fastcdr diff --git a/include/fastcdr/exceptions/Exception.h b/include/fastcdr/exceptions/Exception.h index 42700a36..07e3963f 100644 --- a/include/fastcdr/exceptions/Exception.h +++ b/include/fastcdr/exceptions/Exception.h @@ -17,7 +17,6 @@ #include "../fastcdr_dll.h" #include -#include namespace eprosima { namespace fastcdr { @@ -26,22 +25,22 @@ namespace exception { * @brief This abstract class is used to create exceptions. * @ingroup EXCEPTIONMODULE */ -class Exception : public std::exception +class Cdr_DllAPI Exception { public: //! \brief Default destructor. - virtual Cdr_DllAPI ~Exception() noexcept; + virtual ~Exception() noexcept; //! \brief This function throws the object as exception. - virtual Cdr_DllAPI void raise() const = 0; + virtual void raise() const = 0; /*! * @brief This function returns the error message. * * @return The error message. */ - virtual Cdr_DllAPI const char* what() const noexcept override; + virtual const char* what() const noexcept; protected: @@ -50,7 +49,7 @@ class Exception : public std::exception * * @param message A error message. This message pointer is copied. */ - Cdr_DllAPI Exception( + Exception( const char* const& message) noexcept; /*! @@ -58,7 +57,7 @@ class Exception : public std::exception * * @param ex Exception that will be copied. */ - Cdr_DllAPI Exception( + Exception( const Exception& ex) noexcept; /*! @@ -66,7 +65,7 @@ class Exception : public std::exception * * @param ex Exception that will be moved. */ - Cdr_DllAPI Exception( + Exception( Exception&& ex) noexcept; /*! @@ -74,7 +73,7 @@ class Exception : public std::exception * * @param ex Exception that will be copied. */ - Cdr_DllAPI Exception& operator =( + Exception& operator =( const Exception& ex) noexcept; /*! @@ -82,7 +81,7 @@ class Exception : public std::exception * * @param ex Exception that will be moved. */ - Cdr_DllAPI Exception& operator =( + Exception& operator =( Exception&& ex) noexcept; private: diff --git a/include/fastcdr/exceptions/LockedExternalAccessException.hpp b/include/fastcdr/exceptions/LockedExternalAccessException.hpp index 486e0d59..fae0c30b 100644 --- a/include/fastcdr/exceptions/LockedExternalAccessException.hpp +++ b/include/fastcdr/exceptions/LockedExternalAccessException.hpp @@ -24,7 +24,7 @@ namespace exception { * @brief This class is thrown as an exception when accessing to set the value of a locked external. * @ingroup EXCEPTIONMODULE */ -class LockedExternalAccessException : public Exception +class Cdr_DllAPI LockedExternalAccessException : public Exception { public: @@ -33,7 +33,7 @@ class LockedExternalAccessException : public Exception * * @param message An error message. This message pointer is copied. */ - Cdr_DllAPI LockedExternalAccessException( + LockedExternalAccessException( const char* const& message) noexcept; /*! @@ -41,7 +41,7 @@ class LockedExternalAccessException : public Exception * * @param ex LockedExternalAccessException that will be copied. */ - Cdr_DllAPI LockedExternalAccessException( + LockedExternalAccessException( const LockedExternalAccessException& ex) noexcept; /*! @@ -49,7 +49,7 @@ class LockedExternalAccessException : public Exception * * @param ex LockedExternalAccessException that will be moved. */ - Cdr_DllAPI LockedExternalAccessException( + LockedExternalAccessException( LockedExternalAccessException&& ex) noexcept; /*! @@ -57,7 +57,7 @@ class LockedExternalAccessException : public Exception * * @param ex LockedExternalAccessException that will be copied. */ - Cdr_DllAPI LockedExternalAccessException& operator =( + LockedExternalAccessException& operator =( const LockedExternalAccessException& ex) noexcept; /*! @@ -69,13 +69,13 @@ class LockedExternalAccessException : public Exception LockedExternalAccessException&& ex) noexcept; //! @brief Default destructor - virtual Cdr_DllAPI ~LockedExternalAccessException() noexcept; + virtual ~LockedExternalAccessException() noexcept; //! @brief This function throws the object as exception. - Cdr_DllAPI void raise() const override; + void raise() const override; //! @brief Default message used in the library. - static Cdr_DllAPI const char* const LOCKED_EXTERNAL_ACCESS_MESSAGE_DEFAULT; + static const char* const LOCKED_EXTERNAL_ACCESS_MESSAGE_DEFAULT; }; } //namespace exception } //namespace fastcdr diff --git a/include/fastcdr/exceptions/NotEnoughMemoryException.h b/include/fastcdr/exceptions/NotEnoughMemoryException.h index bddf50ff..c884b1e9 100644 --- a/include/fastcdr/exceptions/NotEnoughMemoryException.h +++ b/include/fastcdr/exceptions/NotEnoughMemoryException.h @@ -24,7 +24,7 @@ namespace exception { * @brief This class is thrown as an exception when the buffer's internal memory reachs its size limit. * @ingroup EXCEPTIONMODULE */ -class NotEnoughMemoryException : public Exception +class Cdr_DllAPI NotEnoughMemoryException : public Exception { public: @@ -33,7 +33,7 @@ class NotEnoughMemoryException : public Exception * * @param message An error message. This message pointer is copied. */ - Cdr_DllAPI NotEnoughMemoryException( + NotEnoughMemoryException( const char* const& message) noexcept; /*! @@ -41,7 +41,7 @@ class NotEnoughMemoryException : public Exception * * @param ex NotEnoughMemoryException that will be copied. */ - Cdr_DllAPI NotEnoughMemoryException( + NotEnoughMemoryException( const NotEnoughMemoryException& ex) noexcept; /*! @@ -49,7 +49,7 @@ class NotEnoughMemoryException : public Exception * * @param ex NotEnoughMemoryException that will be moved. */ - Cdr_DllAPI NotEnoughMemoryException( + NotEnoughMemoryException( NotEnoughMemoryException&& ex) noexcept; /*! @@ -57,7 +57,7 @@ class NotEnoughMemoryException : public Exception * * @param ex NotEnoughMemoryException that will be copied. */ - Cdr_DllAPI NotEnoughMemoryException& operator =( + NotEnoughMemoryException& operator =( const NotEnoughMemoryException& ex) noexcept; /*! @@ -65,17 +65,17 @@ class NotEnoughMemoryException : public Exception * * @param ex NotEnoughMemoryException that will be moved. */ - Cdr_DllAPI NotEnoughMemoryException& operator =( + NotEnoughMemoryException& operator =( NotEnoughMemoryException&& ex) noexcept; //! @brief Default destructor - virtual Cdr_DllAPI ~NotEnoughMemoryException() noexcept; + virtual ~NotEnoughMemoryException() noexcept; //! @brief This function throws the object as exception. - Cdr_DllAPI void raise() const override; + void raise() const override; //! @brief Default message used in the library. - static Cdr_DllAPI const char* const NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT; + static const char* const NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT; }; } //namespace exception } //namespace fastcdr