15 #include "eggObject.h" 38 _user_data(copy._user_data),
39 _default_user_data(copy._default_user_data)
51 TypedReferenceCount::operator = (copy);
52 _user_data = copy._user_data;
53 _default_user_data = copy._default_user_data;
90 _user_data[user_data->get_type()] = user_data;
91 _default_user_data = user_data;
103 return _default_user_data;
114 UserData::const_iterator ui;
115 ui = _user_data.find(type);
116 if (ui != _user_data.end()) {
131 return !_default_user_data.is_null();
142 UserData::const_iterator ui;
143 ui = _user_data.find(type);
144 return (ui != _user_data.end());
155 _default_user_data.clear();
165 UserData::iterator ui;
166 ui = _user_data.find(type);
167 if (ui != _user_data.end()) {
168 if ((*ui).second == _default_user_data) {
169 _default_user_data.clear();
171 _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, false otherwise.
virtual EggTransform * as_transform()
Returns this object cross-cast to an EggTransform pointer, if it inherits from EggTransform, or NULL if it does not.
EggUserData * get_user_data() const
Returns the user data pointer most recently stored on this object, or NULL if nothing was previously ...
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.