MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / defRepr

Function defRepr

src/bindings/python/PyUtils.h:18–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16// Define __repr__ implementation compatible with *most* OCIO classes
17template<typename T, typename ... EXTRA>
18void defRepr(py::class_<T, OCIO_SHARED_PTR<T>, EXTRA ...> & cls)
19{
20 cls.def("__repr__", [](OCIO_SHARED_PTR<T> & self)
21 {
22 std::ostringstream os;
23 os << (*self);
24 return os.str();
25 });
26}
27
28template<typename T>
29void defRepr(py::class_<T> & cls)

Callers 15

bindPyViewingRulesFunction · 0.85
bindPyLookFunction · 0.85
bindPyViewTransformFunction · 0.85
bindPyNamedTransformFunction · 0.85
bindPyColorSpaceFunction · 0.85
bindPyTransformFunction · 0.85
bindPyGradingDataFunction · 0.85
bindPyContextFunction · 0.85
bindPyFileRulesFunction · 0.85
bindPyRangeTransformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected