Moved EXIV2APIs to make MSVC happy

v0.27.3
Andreas Huggel 17 years ago
parent 50983a44b7
commit bee017287f

@ -53,12 +53,12 @@ namespace Exiv2 {
easier for library users (they have the option of catching most easier for library users (they have the option of catching most
things via std::exception). things via std::exception).
*/ */
class EXIV2API AnyError : public std::exception { class AnyError : public std::exception {
public: public:
//! @name Creators //! @name Creators
//@{ //@{
//! Virtual destructor. //! Virtual destructor.
virtual ~AnyError() throw() virtual EXIV2API ~AnyError() throw()
{ {
} }
//@} //@}
@ -67,6 +67,7 @@ namespace Exiv2 {
//@{ //@{
//! Return the error code. //! Return the error code.
virtual int code() const throw() =0; virtual int code() const throw() =0;
//@}
}; // AnyError }; // AnyError
//! %AnyBase output operator //! %AnyBase output operator
@ -79,12 +80,12 @@ namespace Exiv2 {
@brief Simple error class used for exceptions. An output operator is @brief Simple error class used for exceptions. An output operator is
provided to print errors to a stream. provided to print errors to a stream.
*/ */
class EXIV2API Error : public AnyError { class Error : public AnyError {
public: public:
//! @name Creators //! @name Creators
//@{ //@{
//! Constructor taking only an error code //! Constructor taking only an error code
explicit Error(int code) explicit EXIV2API Error(int code)
: code_(code), count_(0) : code_(code), count_(0)
{ {
setMsg(); setMsg();
@ -112,26 +113,22 @@ namespace Exiv2 {
{ {
setMsg(); setMsg();
} }
//! Virtual destructor.
virtual ~Error() throw()
{
}
//@} //@}
//! @name Accessors //! @name Accessors
//@{ //@{
virtual int code() const throw() { return code_; } virtual EXIV2API int code() const throw() { return code_; }
/*! /*!
@brief Return the error message. The pointer returned by what() @brief Return the error message. The pointer returned by what()
is valid only as long as the Error object exists. is valid only as long as the Error object exists.
*/ */
virtual const char* what() const throw() { return msg_.c_str(); } virtual EXIV2API const char* what() const throw() { return msg_.c_str(); }
//@} //@}
private: private:
//! @name Manipulators //! @name Manipulators
//@{ //@{
void setMsg(); EXIV2API void setMsg();
//@} //@}
static int errorIdx(int code); static int errorIdx(int code);

Loading…
Cancel
Save