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

Function bindObject

src/IECorePython/ObjectBinding.cpp:83–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81{
82
83void bindObject()
84{
85
86 RunTimeTypedClass<Object>()
87 .def( self == self )
88 .def( self != self )
89 .def( "copy", &Object::copy )
90 .def( "copyFrom", (void (Object::*)( const Object * ) )&Object::copyFrom )
91 .def( "isType", (bool (*)( const std::string &) )&Object::isType )
92 .def( "isType", (bool (*)( TypeId) )&Object::isType )
93 .staticmethod( "isType" )
94 .def( "isAbstractType", (bool (*)( const std::string &) )&Object::isAbstractType )
95 .def( "isAbstractType", (bool (*)( TypeId ) )&Object::isAbstractType )
96 .staticmethod( "isAbstractType" )
97 .def( "create", (ObjectPtr (*)( const std::string &) )&Object::create )
98 .def( "create", (ObjectPtr (*)( TypeId ) )&Object::create )
99 .staticmethod( "create" )
100 .def( "load", loadWrapper, ( arg( "ioInterface" ), arg( "name" ), arg( "canceller" ) = object() ) )
101 .staticmethod( "load" )
102 .def( "save", (void (Object::*)( IndexedIOPtr, const IndexedIO::EntryID & )const )&Object::save )
103 .def( "memoryUsage", (size_t (Object::*)()const )&Object::memoryUsage, "Returns the number of bytes this instance occupies in memory" )
104 .def( "hash", (MurmurHash (Object::*)() const)&Object::hash )
105 .def( "hash", (void (Object::*)( MurmurHash & ) const)&Object::hash )
106 .def( "registerType", registerType, ( arg( "typeId" ), arg( "typeName" ), arg( "creator" ) = object() ) )
107 .staticmethod( "registerType" )
108 ;
109
110}
111
112}

Callers 1

BOOST_PYTHON_MODULEFunction · 0.85

Calls 1

MurmurHashClass · 0.85

Tested by

no test coverage detected