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;
43INLINE
bool PhysxObject::
44has_python_tags()
const {
46 return _python_tag_data.empty() ? false :
true;
52INLINE
void PhysxObject::
53set_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);
74INLINE PyObject *PhysxObject::
75get_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;
93INLINE
bool PhysxObject::
94has_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());
104INLINE
void PhysxObject::
105clear_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);