27 template <
typename SCHEME_CAPABLE>
39 const int32_t
val)
override 45 const uint32_t
val)
override 51 const int64_t
val)
override 53 m_val =
typename SCHEME_CAPABLE::Int64(
val);
57 const uint64_t
val)
override 59 m_val =
typename SCHEME_CAPABLE::UInt64(
val);
68 const double val)
override 74 const std::nullptr_t
val)
override 80 const std::string
val)
override 91 explicit operator int32_t()
const override {
return m_val.asInt(); }
92 explicit operator uint32_t()
const override {
return m_val.asUInt(); }
93 explicit operator int64_t()
const override {
return m_val.asInt64(); }
94 explicit operator uint64_t()
const override {
return m_val.asUInt64(); }
95 explicit operator float()
const override {
return m_val.asFloat(); }
96 explicit operator double()
const override {
return m_val.asDouble(); }
97 explicit operator bool()
const override {
return m_val.asBool(); }
98 explicit operator std::string()
const override {
return m_val.asString(); }
120 m_val[std::string(str)]));
CSchemeArchive()
Ctor that creates an own SCHEME_CAPABLE object.
mrpt::serialization::CSchemeArchiveBase & operator=(const bool val) override
Pure virtual class carrying the implementation of CSchemeArchiveBase as per the PIMPL idiom...
mrpt::serialization::CSchemeArchiveBase & operator=(const mrpt::serialization::CSerializable &obj) override
Writes object to archive, with synxtax out["name"] = obj;
void WriteObject(CSchemeArchiveBase &in, CSerializable &obj)
mrpt::serialization::CSchemeArchiveBase & operator=(const uint32_t val) override
mrpt::serialization::CSchemeArchiveBase & operator=(const std::nullptr_t val) override
std::istream & readFromStream(std::istream &in) override
Reads the scheme from a plain-text input.
mrpt::serialization::CSchemeArchiveBase operator[](size_t idx) override
mrpt::serialization::CSchemeArchiveBase & operator=(const int32_t val) override
Virtual base class for "schematic archives" (JSON, XML,...)
mrpt::serialization::CSchemeArchiveBase operator[](std::string str) override
void readTo(mrpt::serialization::CSerializable &obj) override
Reads object from the archive.
CSchemeArchiveBase * m_parent
Base template class for schema-capable "archives", e.g.
mrpt::vision::TStereoCalibResults out
std::ostream & writeToStream(std::ostream &out) const override
Writes the scheme to a plain-text output.
mrpt::serialization::CSchemeArchiveBase & operator=(const double val) override
The virtual base class which provides a unified interface for all persistent objects in MRPT...
mrpt::serialization::CSchemeArchiveBase & operator=(const std::string val) override
CSchemeArchive(SCHEME_CAPABLE &val)
Ctor that uses user-providen SCHEME_CAPABLE object.
mrpt::serialization::CSchemeArchiveBase & operator=(const uint64_t val) override
CSchemeArchiveBase archiveJSON()
Returns an archive for reading/writing in JSON format.
std::optional< SCHEME_CAPABLE > m_own_val
mrpt::serialization::CSchemeArchiveBase & operator=(const int64_t val) override
void ReadObject(CSchemeArchiveBase &out, const CSerializable &obj)
mrpt::serialization::CSchemeArchiveBase & operator=(const float val) override