25 #ifndef LSST_DAF_BASE_PROPERTYSET
26 #define LSST_DAF_BASE_PROPERTYSET
49 #include <unordered_map>
52 #include "boost/any.hpp"
64 #pragma warning(disable : 444)
98 virtual
Ptr deepCopy() const;
106 size_t nameCount(
bool topLevelOnly = true) const;
115 std::vector<
std::
string> names(
bool topLevelOnly = true) const;
120 std::vector<
std::
string> paramNames(
bool topLevelOnly = true) const;
125 std::vector<
std::
string> propertySetNames(
bool topLevelOnly = true) const;
133 bool exists(
std::
string const& name) const;
141 bool isArray(
std::
string const& name) const;
149 bool isPropertySetPtr(
std::
string const& name) const;
157 bool isUndefined(
std::
string const& name) const;
165 size_t valueCount(
std::
string const& name) const;
176 std::type_info const& typeOf(
std::
string const& name) const;
183 template <typename T>
184 static
std::type_info const& typeOfT();
199 template <typename T>
200 T get(
std::
string const& name) const;
214 template <typename T>
215 T get(
std::
string const& name, T const& defaultValue) const;
228 template <typename T>
229 std::vector<T> getArray(
std::
string const& name) const;
243 bool getAsBool(
std::
string const& name) const;
254 int getAsInt(
std::
string const& name) const;
267 int64_t getAsInt64(
std::
string const& name) const;
278 uint64_t getAsUInt64(
std::
string const& name) const;
289 double getAsDouble(
std::
string const& name) const;
302 std::
string getAsString(
std::
string const& name) const;
333 virtual
std::
string toString(
bool topLevelOnly = false,
std::
string const& indent = "") const;
345 template <typename T>
346 void set(
std::
string const& name, T const& value);
356 template <typename T>
357 void set(
std::
string const& name,
std::vector<T> const& value);
366 void set(
std::
string const& name,
char const* value);
377 template <typename T>
378 void add(
std::
string const& name, T const& value);
391 template <typename T>
392 void add(
std::
string const& name,
std::vector<T> const& value);
404 void add(
std::
string const& name,
char const* value);
419 virtual
void copy(
std::
string const& dest,
ConstPtr source,
std::
string const& name,
420 bool asScalar = false);
443 virtual
void remove(
std::
string const& name);
455 virtual
void _set(
std::
string const& name,
std::shared_ptr<
std::vector<
boost::any> > vp);
465 virtual
void _add(
std::
string const& name,
std::shared_ptr<
std::vector<
boost::any> > vp);
468 virtual
std::
string _format(
std::
string const& name) const;
480 AnyMap::iterator _find(
std::
string const& name);
488 AnyMap::const_iterator _find(
std::
string const& name) const;
498 virtual
void _findOrInsert(
std::
string const& name,
std::shared_ptr<
std::vector<
boost::any> > vp);
499 void _cycleCheckPtrVec(
std::vector<
Ptr> const& v,
std::
string const& name);
500 void _cycleCheckAnyVec(
std::vector<
boost::any> const& v,
std::
string const& name);
501 void _cycleCheckPtr(
Ptr const& v,
std::
string const& name);
512 void PropertySet::add<PropertySet::Ptr>(
std::string const& name, Ptr
const& value);