Commit 8e70e542 authored by Julien Osman's avatar Julien Osman
Browse files

ENH: Implement a __repr__ method for the TimePoint class

parent a3198511
Pipeline #9210 failed with stages
in 122 minutes and 21 seconds
......@@ -23,7 +23,8 @@
%{
#include "itkBase.includes"
#include "otbWrapperSWIGIncludes.h"
#include <string> // std::string
#include <string>
#include <sstream>
#include <locale>
#include "otbMetaDataKey.h"
#include "otbImageMetadata.h"
......@@ -55,12 +56,12 @@ public:
namespace MetaData
{
class TimePoint : private details::streamable<TimePoint>,
private details::substractable_asym<Duration, TimePoint>,
private boost::equality_comparable<TimePoint>,
private boost::less_than_comparable<TimePoint>
class TimePoint
{
public:
double GetJulianDay() const;
double GetModifiedJulianDay() const;
};
struct LUTAxis
......@@ -108,6 +109,14 @@ public:
};
%extend otb::MetaData::TimePoint{
std::string __repr__() {
std::ostringstream oss;
oss << *$self;
return oss.str().c_str();
}
}
%extend otb::ImageMetadataBase{
bool is_num(const std::string& key) {
......
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