20 _error_type = ET_empty;
31 PythonTagData::const_iterator ti;
32 for (ti = _python_tag_data.begin(); ti != _python_tag_data.end(); ++ti) {
33 PyObject *value = (*ti).second;
43 INLINE
bool PhysxObject::
44 has_python_tags()
const {
46 return _python_tag_data.empty() ? false :
true;
52 INLINE
void PhysxObject::
53 set_python_tag(
const std::string &key, PyObject *value) {
57 std::pair<PythonTagData::iterator, bool> result;
58 result = _python_tag_data.insert(PythonTagData::value_type(key, value));
64 PythonTagData::iterator ti = result.first;
65 PyObject *old_value = (*ti).second;
66 Py_XDECREF(old_value);
74 INLINE PyObject *PhysxObject::
75 get_python_tag(
const std::string &key)
const {
77 PythonTagData::const_iterator ti;
78 ti = _python_tag_data.find(key);
80 if (ti != _python_tag_data.end()) {
81 PyObject *result = (*ti).second;
93 INLINE
bool PhysxObject::
94 has_python_tag(
const std::string &key)
const {
96 PythonTagData::const_iterator ti;
97 ti = _python_tag_data.find(key);
98 return (ti != _python_tag_data.end());
104 INLINE
void PhysxObject::
105 clear_python_tag(
const std::string &key) {
107 PythonTagData::iterator ti;
108 ti = _python_tag_data.find(key);
110 if (ti != _python_tag_data.end()) {
111 PyObject *value = (*ti).second;
113 _python_tag_data.erase(ti);
116 #endif // HAVE_PYTHON