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

Method AddVariable

IO/Export/vtkRIBProperty.cxx:62–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void vtkRIBProperty::AddVariable(const char* variable, const char* value)
63{
64 if (this->Declarations == nullptr)
65 {
66 this->SetVariable(variable, value);
67 }
68 else
69 {
70 auto newVariable = vtk::format("Declare \"{}\" \"{}\"\n", variable, value);
71 char* oldDeclarations = this->Declarations;
72
73 this->Declarations = new char[strlen(oldDeclarations) + newVariable.size() + 1];
74 strcpy(this->Declarations, oldDeclarations);
75 strcat(this->Declarations, newVariable.c_str());
76 delete[] oldDeclarations;
77 this->Modified();
78 }
79}
80
81void vtkRIBProperty::SetParameter(const char* parameter, const char* value)
82{

Callers 7

clothFunction · 0.80
stippledFunction · 0.80
spatterFunction · 0.80
stoneFunction · 0.80
woodFunction · 0.80
TestRIBPropertyFunction · 0.80
testCellsMethod · 0.80

Calls 5

SetVariableMethod · 0.95
formatFunction · 0.50
sizeMethod · 0.45
c_strMethod · 0.45
ModifiedMethod · 0.45

Tested by 6

clothFunction · 0.64
stippledFunction · 0.64
spatterFunction · 0.64
stoneFunction · 0.64
woodFunction · 0.64
TestRIBPropertyFunction · 0.64