MCPcopy Create free account
hub / github.com/SimVascular/SimVascular / PyUtilGetFunctionName

Function PyUtilGetFunctionName

Code/Source/PythonAPI/PyUtils.cxx:128–136  ·  view source on GitHub ↗

-------------------------- SvPyUtilGetFunctionName -------------------------- Get the function name used to display error messages for the Python API. Module functions are prefixed with ' _' so replaced the '_' with a '.' to make the name look at it would if referenced from Python.

Source from the content-addressed store, hash-verified

126// with a '.' to make the name look at it would if referenced from Python.
127//
128std::string PyUtilGetFunctionName(const char* functionName)
129{
130 std::string name(functionName);
131 std::size_t pos = name.find("_");
132 if (pos == std::string::npos) {
133 return name;
134 }
135 return name.replace(pos, 1, ".");
136}
137
138//////////////////////////////////////////////////////
139// U t i l i t y F u n c t i o n s //

Callers 2

PyUtilApiFunctionMethod · 0.85
PyUtilSetupApiFunctionFunction · 0.85

Calls 1

findMethod · 0.80

Tested by

no test coverage detected