MCPcopy Create free account
hub / github.com/Kitware/VTK / PrintSelf

Method PrintSelf

Common/Misc/vtkFunctionParser.cxx:2185–2240  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2183}
2184//------------------------------------------------------------------------------
2185void vtkFunctionParser::PrintSelf(ostream& os, vtkIndent indent)
2186{
2187 this->Superclass::PrintSelf(os, indent);
2188
2189 os << indent << "Function: " << (this->GetFunction() ? this->GetFunction() : "(none)") << endl;
2190
2191 os << indent
2192 << "FunctionWithSpaces: " << (this->FunctionWithSpaces ? this->FunctionWithSpaces : "(none)")
2193 << endl;
2194
2195 for (int i = 0, max = this->GetNumberOfScalarVariables(); i < max; i++)
2196 {
2197 os << indent << " " << this->GetScalarVariableName(i) << ": "
2198 << this->GetScalarVariableValue(i) << endl;
2199 }
2200
2201 for (int i = 0, max = this->GetNumberOfVectorVariables(); i < max; i++)
2202 {
2203 os << indent << " " << this->GetVectorVariableName(i) << ": ("
2204 << this->GetVectorVariableValue(i)[0] << ", " << this->GetVectorVariableValue(i)[1] << ", "
2205 << this->GetVectorVariableValue(i)[2] << ")" << endl;
2206 }
2207
2208 if (this->Function != nullptr && (this->StackPointer == 0 || this->StackPointer == 2))
2209 {
2210 if (this->StackPointer == 0)
2211 {
2212 os << indent << "ScalarResult: " << this->GetScalarResult() << endl;
2213 os << indent << "VectorResult: "
2214 << "(none)" << endl;
2215 }
2216 else if (this->StackPointer == 2)
2217 {
2218 os << indent << "ScalarResult: "
2219 << "(none)" << endl;
2220 os << indent << "VectorResult: "
2221 << "(" << this->GetVectorResult()[0] << ", " << this->GetVectorResult()[1] << ", "
2222 << this->GetVectorResult()[2] << ")" << endl;
2223 }
2224 }
2225 else
2226 {
2227 os << indent << "ScalarResult: "
2228 << "(none)" << endl;
2229 os << indent << "VectorResult: "
2230 << "(none)" << endl;
2231 }
2232
2233 os << indent << "Replace Invalid Values: " << (this->GetReplaceInvalidValues() ? "On" : "Off")
2234 << endl;
2235 os << indent << "Replacement Value: " << this->GetReplacementValue() << endl;
2236
2237 os << indent << "Parse Error Position: " << this->ParseErrorPositon << endl;
2238
2239 os << indent << "Parse Error: " << (this->ParseError ? this->ParseError : "nullptr") << endl;
2240}
2241
2242//------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 7

GetScalarVariableNameMethod · 0.95
GetVectorVariableNameMethod · 0.95
GetScalarResultMethod · 0.95
GetVectorResultMethod · 0.95
GetFunctionMethod · 0.45

Tested by

no test coverage detected