7 #ifndef __FWCAMP_CAMP_MAPPROPERTY_HPP__ 8 #define __FWCAMP_CAMP_MAPPROPERTY_HPP__ 10 #include <camp/property.hpp> 11 #include <camp/value.hpp> 12 #include <camp/userobject.hpp> 13 #include <camp/camptype.hpp> 15 #include "fwCamp/config.hpp" 24 typedef std::pair< Value, Value > ValuePair;
25 typedef std::pair< UserObject, UserObject> ObjectPair;
27 FWCAMP_API
MapProperty(
const std::string& name, Type elementType);
31 FWCAMP_API
virtual ~MapProperty();
38 FWCAMP_API Type elementType()
const;
49 FWCAMP_API
virtual Value getValue(
const UserObject&
object)
const;
59 FWCAMP_API
virtual void setValue(
const UserObject&
object,
const Value& value)
const;
69 FWCAMP_API
virtual std::size_t getSize(
const UserObject&
object)
const = 0;
76 FWCAMP_API
virtual void accept(ClassVisitor& visitor)
const;
78 FWCAMP_API
virtual ValuePair getElement(
const UserObject&
object, std::size_t index)
const = 0;
80 FWCAMP_API
virtual void set(
const UserObject& object,
const Value& key,
const Value& value)
const = 0;
89 CAMP_TYPE(camp::MapProperty::ValuePair);