MCPcopy Create free account
hub / github.com/chokkan/crfsuite / SwigMovePointer

Class SwigMovePointer

swig/python/export_wrap.cpp:19–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17/* SwigValueWrapper is described in swig.swg */
18template<typename T> class SwigValueWrapper {
19 struct SwigMovePointer {
20 T *ptr;
21 SwigMovePointer(T *p) : ptr(p) { }
22 ~SwigMovePointer() { delete ptr; }
23 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
24 } pointer;
25 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
26 SwigValueWrapper(const SwigValueWrapper<T>& rhs);
27public:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected