Commit bf79f33d authored by Antoine Regimbeau's avatar Antoine Regimbeau

WRG: remove export for Exception class and add export for osstream operator

parent 0de7ea32
......@@ -43,7 +43,7 @@ namespace otb
*
* \ingroup OTBGdalAdapters
*/
class OTBGdalAdapters_EXPORT InvalidCoordinateTransfromationException : public std::runtime_error
class OTBGdalAdapters_HIDDEN InvalidCoordinateTransfromationException : public std::runtime_error
{
public:
// Import parent constructor
......@@ -59,7 +59,7 @@ public:
*
* \ingroup OTBGdalAdapters
*/
class OTBGdalAdapters_EXPORT TransformFailureException : public std::runtime_error
class OTBGdalAdapters_HIDDEN TransformFailureException : public std::runtime_error
{
public:
// Import parent constructor
......
......@@ -38,7 +38,7 @@ namespace otb
*
* \ingroup OTBGdalAdapters
*/
class OTBGdalAdapters_EXPORT InvalidSRDescriptionException : public std::runtime_error
class OTBGdalAdapters_HIDDEN InvalidSRDescriptionException : public std::runtime_error
{
public:
// Import parent constructor
......
......@@ -27,14 +27,15 @@
namespace otb
{
std::ostream & operator << (std::ostream& o, const CoordinateTransformation & i)
OTBGdalAdapters_EXPORT std::ostream & operator << (std::ostream& o, const CoordinateTransformation & i)
{
o << "Source: " << i.GetSourceSpatialReference() << ", Target: " << i.GetTargetSpatialReference();
return o;
}
// equal operator
bool operator==(const CoordinateTransformation& ct1, const CoordinateTransformation& ct2) noexcept
OTBGdalAdapters_EXPORT bool operator==(const CoordinateTransformation& ct1, const CoordinateTransformation& ct2) noexcept
{
auto thisSourceCS = ct1.GetSourceSpatialReference();
auto thisTargetCS = ct1.GetTargetSpatialReference();
......@@ -44,7 +45,7 @@ bool operator==(const CoordinateTransformation& ct1, const CoordinateTransformat
return thisSourceCS == otherSourceCS && thisTargetCS == otherTargetCS;
}
bool operator!=(const CoordinateTransformation& ct1, const CoordinateTransformation & ct2) noexcept
OTBGdalAdapters_EXPORT bool operator!=(const CoordinateTransformation& ct1, const CoordinateTransformation & ct2) noexcept
{
return !(ct1==ct2);
}
......
......@@ -27,20 +27,21 @@
#include <sstream>
namespace otb {
namespace otb
{
std::ostream & operator << (std::ostream& o, const SpatialReference & i)
OTBGdalAdapters_EXPORT std::ostream & operator << (std::ostream& o, const SpatialReference & i)
{
return o << i.ToWkt();
}
std::ostream & operator << (std::ostream& o, const SpatialReference::hemisphere & hem)
OTBGdalAdapters_EXPORT std::ostream & operator << (std::ostream& o, const SpatialReference::hemisphere & hem)
{
return o << (hem == SpatialReference::hemisphere::north ? "N" : "S");
}
bool operator==(const SpatialReference& sr1,const SpatialReference& sr2) noexcept
OTBGdalAdapters_EXPORT bool operator==(const SpatialReference& sr1,const SpatialReference& sr2) noexcept
{
bool rawIsSame ( sr1.m_SR->IsSame(sr2.m_SR.get()) );
......@@ -61,7 +62,7 @@ bool operator==(const SpatialReference& sr1,const SpatialReference& sr2) noexcep
return false;
}
bool operator!=(const SpatialReference& sr1,const SpatialReference& sr2) noexcept
OTBGdalAdapters_EXPORT bool operator!=(const SpatialReference& sr1,const SpatialReference& sr2) noexcept
{
return !(sr1==sr2);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment