25#ifndef LSST_DAF_BASE_PROPERTYSET
26#define LSST_DAF_BASE_PROPERTYSET
49#include <unordered_map>
63#pragma warning(disable : 444)
97 virtual
Ptr deepCopy() const;
105 size_t nameCount(
bool topLevelOnly = true) const;
114 std::vector<
std::
string> names(
bool topLevelOnly = true) const;
119 std::vector<
std::
string> paramNames(
bool topLevelOnly = true) const;
124 std::vector<
std::
string> propertySetNames(
bool topLevelOnly = true) const;
132 bool exists(
std::
string const& name) const;
140 bool isArray(
std::
string const& name) const;
148 bool isPropertySetPtr(
std::
string const& name) const;
156 bool isUndefined(
std::
string const& name) const;
164 size_t valueCount() const;
172 size_t valueCount(
std::
string const& name) const;
183 std::type_info const& typeOf(
std::
string const& name) const;
190 template <typename T>
191 static
std::type_info const& typeOfT();
206 template <typename T>
207 T get(
std::
string const& name) const;
221 template <typename T>
222 T get(
std::
string const& name, T const& defaultValue) const;
235 template <typename T>
236 std::vector<T> getArray(
std::
string const& name) const;
250 bool getAsBool(
std::
string const& name) const;
261 int getAsInt(
std::
string const& name) const;
274 int64_t getAsInt64(
std::
string const& name) const;
285 uint64_t getAsUInt64(
std::
string const& name) const;
296 double getAsDouble(
std::
string const& name) const;
309 std::
string getAsString(
std::
string const& name) const;
340 virtual
std::
string toString(
bool topLevelOnly = false,
std::
string const& indent = "") const;
352 template <typename T>
353 void set(
std::
string const& name, T const& value);
363 template <typename T>
364 void set(
std::
string const& name,
std::vector<T> const& value);
373 void set(
std::
string const& name,
char const* value);
384 template <typename T>
385 void add(
std::
string const& name, T const& value);
398 template <typename T>
399 void add(
std::
string const& name,
std::vector<T> const& value);
411 void add(
std::
string const& name,
char const* value);
426 virtual
void copy(
std::
string const& dest,
ConstPtr source,
std::
string const& name,
427 bool asScalar = false);
450 virtual
void remove(
std::
string const& name);
462 virtual
void _set(
std::
string const& name,
std::shared_ptr<
std::vector<
std::any> > vp);
472 virtual
void _add(
std::
string const& name,
std::shared_ptr<
std::vector<
std::any> > vp);
475 virtual
std::
string _format(
std::
string const& name) const;
487 AnyMap::iterator _find(
std::
string const& name);
495 AnyMap::const_iterator _find(
std::
string const& name) const;
505 virtual
void _findOrInsert(
std::
string const& name,
std::shared_ptr<
std::vector<
std::any> > vp);
506 void _cycleCheckPtrVec(
std::vector<
Ptr> const& v,
std::
string const& name);
507 void _cycleCheckAnyVec(
std::vector<
std::any> const& v,
std::
string const& name);
508 void _cycleCheckPtr(
Ptr const& v,
std::
string const& name);
519void PropertySet::add<PropertySet::Ptr>(
std::string const& name, Ptr
const& value);
Interface for Persistable base class.
Base class for all persistable classes.
Class for storing generic metadata.
std::shared_ptr< PropertySet > Ptr
std::shared_ptr< PropertySet const > ConstPtr
PropertySet(bool flat=false)
Construct an empty PropertySet.
virtual ~PropertySet() noexcept
Destructor.