diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-01-22 00:08:42 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-01-22 00:08:42 +0100 |
| commit | 5c86b290e2c5686cbf5100eb71e32b0362a989fc (patch) | |
| tree | 512b64e121df7e8a672613d707c0deaa98af711b /src/iso19111/common.cpp | |
| parent | 6a541b3a3926282ffc2e4bb20d2f6d78549572b5 (diff) | |
| download | PROJ-5c86b290e2c5686cbf5100eb71e32b0362a989fc.tar.gz PROJ-5c86b290e2c5686cbf5100eb71e32b0362a989fc.zip | |
ISO19111: clean interface of DataEpoch class
Diffstat (limited to 'src/iso19111/common.cpp')
| -rw-r--r-- | src/iso19111/common.cpp | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/src/iso19111/common.cpp b/src/iso19111/common.cpp index ad816275..ca9d3b3e 100644 --- a/src/iso19111/common.cpp +++ b/src/iso19111/common.cpp @@ -642,9 +642,7 @@ const std::string &IdentifiedObject::remarks() PROJ_PURE_DEFN { * * \remark Extension of \ref ISO_19111_2018 */ -bool IdentifiedObject::isDeprecated() PROJ_PURE_DEFN { - return d->isDeprecated; -} +bool IdentifiedObject::isDeprecated() PROJ_PURE_DEFN { return d->isDeprecated; } // --------------------------------------------------------------------------- //! @cond Doxygen_Suppress @@ -1111,5 +1109,45 @@ bool ObjectUsage::_isEquivalentTo( } //! @endcond +// --------------------------------------------------------------------------- + +//! @cond Doxygen_Suppress +struct DataEpoch::Private { + Measure coordinateEpoch_{}; + + explicit Private(const Measure &coordinateEpochIn) + : coordinateEpoch_(coordinateEpochIn) {} +}; +//! @endcond + +// --------------------------------------------------------------------------- + +DataEpoch::DataEpoch() + : d(internal::make_unique<Private>(Measure())) {} + +// --------------------------------------------------------------------------- + +DataEpoch::DataEpoch(const Measure &coordinateEpochIn) + : d(internal::make_unique<Private>(coordinateEpochIn)) {} + +// --------------------------------------------------------------------------- + +DataEpoch::DataEpoch(const DataEpoch &other) + : d(internal::make_unique<Private>(*(other.d))) {} + +// --------------------------------------------------------------------------- + +//! @cond Doxygen_Suppress +DataEpoch::~DataEpoch() = default; +//! @endcond + +// --------------------------------------------------------------------------- + +/** \brief Return the coordinate epoch, as a measure in decimal year. + */ +const Measure &DataEpoch::coordinateEpoch() const { + return d->coordinateEpoch_; +} + } // namespace common NS_PROJ_END |
