33 _user_data(copy._user_data),
34 _default_user_data(copy._default_user_data)
44 TypedReferenceCount::operator = (copy);
45 _user_data = copy._user_data;
46 _default_user_data = copy._default_user_data;
75 _user_data[user_data->get_type()] = user_data;
76 _default_user_data = user_data;
85 return _default_user_data;
94 UserData::const_iterator ui;
95 ui = _user_data.find(type);
96 if (ui != _user_data.end()) {
108 return !_default_user_data.is_null();
117 UserData::const_iterator ui;
118 ui = _user_data.find(type);
119 return (ui != _user_data.end());
128 _default_user_data.clear();
136 UserData::iterator ui;
137 ui = _user_data.find(type);
138 if (ui != _user_data.end()) {
139 if ((*ui).second == _default_user_data) {
140 _default_user_data.clear();
142 _user_data.erase(ui);
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
void clear_user_data()
Removes *all* user data pointers from the node.
bool has_user_data() const
Returns true if a generic user data pointer has recently been set and not yet cleared,...
virtual EggTransform * as_transform()
Returns this object cross-cast to an EggTransform pointer, if it inherits from EggTransform,...
EggUserData * get_user_data() const
Returns the user data pointer most recently stored on this object, or NULL if nothing was previously ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_user_data(EggUserData *user_data)
Sets the user data associated with this object.
TypeHandle is the identifier used to differentiate C++ class types.
This is a base class for a user-defined data type to extend egg structures in processing code.
The highest-level base class in the egg directory.