23#define OSG_HAS_VALUEMAP
56 if (
typeid(*(obj))==
typeid(UserValueObject))
58 UserValueObject* uvo =
static_cast<UserValueObject*
>(itr->second.get());
64 return (
_keyValueMap[key] =
new UserValueObject(value)).get();
71 return (itr!=
_keyValueMap.end()) ? itr->second.get() : 0;
76 KeyValueMap::const_iterator itr =
_keyValueMap.find(key);
77 return (itr!=
_keyValueMap.end()) ? itr->second.get() : 0;
85 return (
object &&
typeid(*
object)==
typeid(T)) ?
static_cast<T*
>(object) : 0;
93 return (
object &&
typeid(*
object)==
typeid(T)) ?
static_cast<const T*
>(object) : 0;
104 value = uvo->getValue();
120 value = uvo->getValue();
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Base class/standard interface for objects which require IO support, cloning and reference counting.
Definition Object:61
Object()
Construct an object.
Definition Object:69
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Base class for providing reference counted objects.
Definition Referenced:44
ValueMap(const ValueMap &vm, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
void setKeyValueMap(KeyValueMap &properties)
Definition ValueMap:37
KeyValueMap & getKeyValueMap()
Definition ValueMap:39
bool getValue(const osg::Referenced *key, T &value)
Definition ValueMap:98
META_Object(osg, ValueMap)
T * getValueOfType(const osg::Referenced *key)
Definition ValueMap:82
const KeyValueMap & getKeyValueMap() const
Definition ValueMap:41
KeyValueMap _keyValueMap
Definition ValueMap:134
std::map< osg::ref_ptr< const osg::Referenced >, osg::ref_ptr< osg::Object > > KeyValueMap
Definition ValueMap:35
osg::Object * getValue(const osg::Referenced *key)
Definition ValueMap:68
osg::Object * setValue(const osg::Referenced *key, osg::Object *object)
Definition ValueMap:43
bool getValue(const osg::Referenced *key, T &value) const
Definition ValueMap:114
const osg::Object * getValue(const osg::Referenced *key) const
Definition ValueMap:74
const T * getValueOfType(const osg::Referenced *key) const
Definition ValueMap:90
osg::Object * setValue(const osg::Referenced *key, const T &value)
Definition ValueMap:49
Definition ValueObject:283
#define OSG_EXPORT
Definition Export:39