25 #ifndef LSST_DAF_BASE_PROPERTYSET 26 #define LSST_DAF_BASE_PROPERTYSET 49 #include <unordered_map> 52 #include "boost/any.hpp" 65 #pragma warning(disable : 444) 99 virtual Ptr deepCopy() const;
107 size_t nameCount(
bool topLevelOnly = true) const;
116 std::vector<
std::
string> names(
bool topLevelOnly = true) const;
121 std::vector<
std::
string> paramNames(
bool topLevelOnly = true) const;
126 std::vector<
std::
string> propertySetNames(
bool topLevelOnly = true) const;
134 bool exists(
std::
string const& name) const;
142 bool isArray(
std::
string const& name) const;
150 bool isPropertySetPtr(
std::
string const& name) const;
158 size_t valueCount(
std::
string const& name) const;
169 std::type_info const& typeOf(
std::
string const& name) const;
176 template <typename T>
177 static
std::type_info const& typeOfT();
192 template <typename T>
193 T get(
std::
string const& name) const;
207 template <typename T>
208 T get(
std::
string const& name, T const& defaultValue) const;
221 template <typename T>
222 std::vector<T> getArray(
std::
string const& name) const;
236 bool getAsBool(
std::
string const& name) const;
247 int getAsInt(
std::
string const& name) const;
260 int64_t getAsInt64(
std::
string const& name) const;
271 double getAsDouble(
std::
string const& name) const;
284 std::
string getAsString(
std::
string const& name) const;
294 PropertySet::Ptr getAsPropertySetPtr(
std::
string const& name) const;
304 Persistable::Ptr getAsPersistablePtr(
std::
string const& name) const;
315 virtual
std::
string toString(
bool topLevelOnly = false,
std::
string const& indent = "") const;
327 template <typename T>
328 void set(
std::
string const& name, T const& value);
338 template <typename T>
339 void set(
std::
string const& name,
std::vector<T> const& value);
348 void set(
std::
string const& name,
char const* value);
359 template <typename T>
360 void add(
std::
string const& name, T const& value);
373 template <typename T>
374 void add(
std::
string const& name,
std::vector<T> const& value);
386 void add(
std::
string const& name,
char const* value);
401 virtual
void copy(
std::
string const& dest, ConstPtr source,
std::
string const& name,
402 bool asScalar = false);
417 virtual
void combine(ConstPtr source);
425 virtual
void remove(
std::
string const& name);
437 virtual
void _set(
std::
string const& name,
std::shared_ptr<
std::vector<
boost::any> > vp);
447 virtual
void _add(
std::
string const& name,
std::shared_ptr<
std::vector<
boost::any> > vp);
450 virtual
std::
string _format(
std::
string const& name) const;
462 AnyMap::iterator _find(
std::
string const& name);
470 AnyMap::const_iterator _find(
std::
string const& name) const;
480 virtual
void _findOrInsert(
std::
string const& name,
std::shared_ptr<
std::vector<
boost::any> > vp);
481 void _cycleCheckPtrVec(
std::vector<Ptr> const& v,
std::
string const& name);
482 void _cycleCheckAnyVec(
std::vector<
boost::any> const& v,
std::
string const& name);
483 void _cycleCheckPtr(Ptr const& v,
std::
string const& name);
494 void PropertySet::add<PropertySet::Ptr>(
std::string const& name, Ptr
const& value);
std::shared_ptr< PropertySet > Ptr
std::shared_ptr< PropertySet const > ConstPtr
Interface for Persistable base class.
Class for storing generic metadata.
Base class for all persistable classes.
Citizen is a class that should be among all LSST classes base classes, and handles basic memory manag...