MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / representation

Method representation

src/App/MetadataPyImp.cpp:39–54  ·  view source on GitHub ↗

Returns a string which represents the object e.g. when printed in Python

Source from the content-addressed store, hash-verified

37
38// Returns a string which represents the object e.g. when printed in Python
39std::string MetadataPy::representation() const
40{
41 MetadataPy::PointerType ptr = getMetadataPtr();
42 std::stringstream str;
43 str << "Metadata [Name=(";
44 str << ptr->name();
45 str << "), Description=(";
46 str << ptr->description();
47 if (!ptr->maintainer().empty()) {
48 str << "), Maintainer=(";
49 str << ptr->maintainer().front().name;
50 }
51 str << ")]";
52
53 return str.str();
54}
55
56PyObject* MetadataPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper
57{

Callers

nothing calls this directly

Calls 6

maintainerMethod · 0.80
nameMethod · 0.45
descriptionMethod · 0.45
emptyMethod · 0.45
frontMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected