25 _error_type = ET_empty;
39 PythonTagData::const_iterator ti;
40 for (ti = _python_tag_data.begin(); ti != _python_tag_data.end(); ++ti) {
41 PyObject *value = (*ti).second;
53 INLINE
bool PhysxObject::
54 has_python_tags()
const {
56 return _python_tag_data.empty() ? false :
true;
64 INLINE
void PhysxObject::
65 set_python_tag(
const string &key, PyObject *value) {
69 pair<PythonTagData::iterator, bool> result;
70 result = _python_tag_data.insert(PythonTagData::value_type(key, value));
77 PythonTagData::iterator ti = result.first;
78 PyObject *old_value = (*ti).second;
79 Py_XDECREF(old_value);
89 INLINE PyObject *PhysxObject::
90 get_python_tag(
const string &key)
const {
92 PythonTagData::const_iterator ti;
93 ti = _python_tag_data.find(key);
95 if (ti != _python_tag_data.end()) {
96 PyObject *result = (*ti).second;
110 INLINE
bool PhysxObject::
111 has_python_tag(
const string &key)
const {
113 PythonTagData::const_iterator ti;
114 ti = _python_tag_data.find(key);
115 return (ti != _python_tag_data.end());
123 INLINE
void PhysxObject::
124 clear_python_tag(
const string &key) {
126 PythonTagData::iterator ti;
127 ti = _python_tag_data.find(key);
129 if (ti != _python_tag_data.end()) {
130 PyObject *value = (*ti).second;
132 _python_tag_data.erase(ti);
135 #endif // HAVE_PYTHON