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 bool isUndefined(
std::
string const& name) const;
166 size_t valueCount(
std::
string const& name) const;
177 std::type_info const& typeOf(
std::
string const& name) const;
184 template <typename T>
185 static
std::type_info const& typeOfT();
200 template <typename T>
201 T get(
std::
string const& name) const;
215 template <typename T>
216 T get(
std::
string const& name, T const& defaultValue) const;
229 template <typename T>
230 std::vector<T> getArray(
std::
string const& name) const;
244 bool getAsBool(
std::
string const& name) const;
255 int getAsInt(
std::
string const& name) const;
268 int64_t getAsInt64(
std::
string const& name) const;
279 double getAsDouble(
std::
string const& name) const;
292 std::
string getAsString(
std::
string const& name) const;
302 PropertySet::Ptr getAsPropertySetPtr(
std::
string const& name) const;
312 Persistable::Ptr getAsPersistablePtr(
std::
string const& name) const;
323 virtual
std::
string toString(
bool topLevelOnly = false,
std::
string const& indent = "") const;
335 template <typename T>
336 void set(
std::
string const& name, T const& value);
346 template <typename T>
347 void set(
std::
string const& name,
std::vector<T> const& value);
356 void set(
std::
string const& name,
char const* value);
367 template <typename T>
368 void add(
std::
string const& name, T const& value);
381 template <typename T>
382 void add(
std::
string const& name,
std::vector<T> const& value);
394 void add(
std::
string const& name,
char const* value);
409 virtual
void copy(
std::
string const& dest, ConstPtr source,
std::
string const& name,
410 bool asScalar = false);
425 virtual
void combine(ConstPtr source);
433 virtual
void remove(
std::
string const& name);
445 virtual
void _set(
std::
string const& name,
std::shared_ptr<
std::vector<
boost::any> > vp);
455 virtual
void _add(
std::
string const& name,
std::shared_ptr<
std::vector<
boost::any> > vp);
458 virtual
std::
string _format(
std::
string const& name) const;
470 AnyMap::iterator _find(
std::
string const& name);
478 AnyMap::const_iterator _find(
std::
string const& name) const;
488 virtual
void _findOrInsert(
std::
string const& name,
std::shared_ptr<
std::vector<
boost::any> > vp);
489 void _cycleCheckPtrVec(
std::vector<Ptr> const& v,
std::
string const& name);
490 void _cycleCheckAnyVec(
std::vector<
boost::any> const& v,
std::
string const& name);
491 void _cycleCheckPtr(Ptr const& v,
std::
string const& name);
502 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...