[Base] rename a variable to please the spellchecker CI
This commit is contained in:
@@ -121,17 +121,17 @@ public:
|
||||
* instead using a overwritten new operator in the
|
||||
* HandledType class! But is not easy to enforce!
|
||||
*/
|
||||
PyHandle(HandledType *ToHandel=0L)
|
||||
:_pHandels(ToHandel) {
|
||||
if (_pHandels)
|
||||
_pHandels->IncRef();
|
||||
PyHandle(HandledType *ToHandle=0L)
|
||||
:_pHandles(ToHandle) {
|
||||
if (_pHandles)
|
||||
_pHandles->IncRef();
|
||||
}
|
||||
|
||||
/// Copy constructor
|
||||
PyHandle(const PyHandle <HandledType> &ToHandel)
|
||||
:_pHandels(ToHandel._pHandels) {
|
||||
if (_pHandels)
|
||||
_pHandels->IncRef();
|
||||
PyHandle(const PyHandle <HandledType> &ToHandle)
|
||||
:_pHandles(ToHandle._pHandles) {
|
||||
if (_pHandles)
|
||||
_pHandles->IncRef();
|
||||
}
|
||||
|
||||
/** destructor
|
||||
@@ -140,8 +140,8 @@ public:
|
||||
* destruct!
|
||||
*/
|
||||
~PyHandle() {
|
||||
if (_pHandels)
|
||||
_pHandels->DecRef();
|
||||
if (_pHandles)
|
||||
_pHandles->DecRef();
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
@@ -149,83 +149,83 @@ public:
|
||||
|
||||
// assign operator from a pointer
|
||||
PyHandle <HandledType> &operator=(/*const*/ HandledType* other) {
|
||||
if (_pHandels)
|
||||
_pHandels->DecRef();
|
||||
// FIXME: Should be without "->_pHandels", shouldn't it? (Werner)
|
||||
_pHandels = other;//_pHandels = other->_pHandels;
|
||||
if (_pHandels)
|
||||
_pHandels->IncRef();
|
||||
if (_pHandles)
|
||||
_pHandles->DecRef();
|
||||
// FIXME: Should be without "->_pHandles", shouldn't it? (Werner)
|
||||
_pHandles = other;//_pHandles = other->_pHandles;
|
||||
if (_pHandles)
|
||||
_pHandles->IncRef();
|
||||
return *this;
|
||||
}
|
||||
|
||||
// assign operator from a handle
|
||||
PyHandle <HandledType> &operator=(const PyHandle <HandledType> &other) {
|
||||
if (_pHandels)
|
||||
_pHandels->DecRef();
|
||||
_pHandels = other._pHandels;
|
||||
if (_pHandels)
|
||||
_pHandels->IncRef();
|
||||
if (_pHandles)
|
||||
_pHandles->DecRef();
|
||||
_pHandles = other._pHandles;
|
||||
if (_pHandles)
|
||||
_pHandles->IncRef();
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// dereference operators
|
||||
HandledType &operator*() {
|
||||
return *_pHandels;
|
||||
return *_pHandles;
|
||||
}
|
||||
|
||||
/// dereference operators
|
||||
HandledType *operator->() {
|
||||
return _pHandels;
|
||||
return _pHandles;
|
||||
}
|
||||
|
||||
/// dereference operators
|
||||
const HandledType &operator*() const {
|
||||
return _pHandels;
|
||||
return _pHandles;
|
||||
}
|
||||
|
||||
/// dereference operators
|
||||
const HandledType *operator->() const {
|
||||
return _pHandels;
|
||||
return _pHandles;
|
||||
}
|
||||
|
||||
/** lower operator
|
||||
* needed for sorting in maps and sets
|
||||
*/
|
||||
bool operator<(const PyHandle<HandledType> &other) const {
|
||||
//return _pHandels<&other;
|
||||
//return _pHandles<&other;
|
||||
// FIXME: Shouldn't we compare both pointers?. (Werner)
|
||||
return _pHandels<other._pHandels;
|
||||
return _pHandles<other._pHandles;
|
||||
}
|
||||
|
||||
/// equal operator
|
||||
bool operator==(const PyHandle<HandledType> &other) const {
|
||||
//return _pHandels==&other;
|
||||
//return _pHandles==&other;
|
||||
// FIXME: Shouldn't we compare both pointers?. (Werner)
|
||||
return _pHandels==other._pHandels;
|
||||
return _pHandles==other._pHandles;
|
||||
}
|
||||
|
||||
/// returns the type as PyObject
|
||||
PyObject* getPyObject() const {
|
||||
// return (PyObject*) _pHandels;
|
||||
// return (PyObject*) _pHandles;
|
||||
// FIXME: Shouldn't we return the pointer's object?. (Werner)
|
||||
return const_cast<HandledType*>(_pHandels)->getPyObject();
|
||||
return const_cast<HandledType*>(_pHandles)->getPyObject();
|
||||
}
|
||||
//**************************************************************************
|
||||
// checking on the state
|
||||
|
||||
/// Test if it handels something
|
||||
/// Test if it handles something
|
||||
bool IsValid() const {
|
||||
return _pHandels!=0;
|
||||
return _pHandles!=0;
|
||||
}
|
||||
|
||||
/// Test if it not handels something
|
||||
/// Test if it not handles something
|
||||
bool IsNull() const {
|
||||
return _pHandels==0;
|
||||
return _pHandles==0;
|
||||
}
|
||||
|
||||
private:
|
||||
/// the pointer on the handled object
|
||||
HandledType *_pHandels;
|
||||
HandledType *_pHandles;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user