MCPcopy Create free account
hub / github.com/ImageEngine/cortex / bindRefCounted

Function bindRefCounted

src/IECorePython/RefCountedBinding.cpp:76–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void bindRefCounted()
77{
78 class_<RefCounted, boost::noncopyable, Detail::GILReleasePtr<RefCounted> >( "RefCounted", "A simple class to count references." )
79 .def( "__eq__", equal )
80 .def( "__ne__", notEqual )
81 .def( "__hash__", hash )
82 .def( "isSame", &is )
83 .def( "refCount", &RefCounted::refCount )
84 .def( "numWrappedInstances", &WrapperGarbageCollector::numWrappedInstances ).staticmethod( "numWrappedInstances" )
85 .add_static_property( "garbageCollectionThreshold", &WrapperGarbageCollector::getCollectThreshold, &WrapperGarbageCollector::setCollectThreshold )
86 .def( "collectGarbage", &WrapperGarbageCollector::collect ).staticmethod( "collectGarbage" )
87 ;
88
89 Detail::IntrusivePtrToPython<RefCounted>();
90 Detail::IntrusivePtrFromPython<RefCounted>();
91
92 implicitly_convertible<RefCountedPtr, ConstRefCountedPtr>();
93}
94
95}
96

Callers 1

BOOST_PYTHON_MODULEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected