| 46 | } |
| 47 | |
| 48 | void vtkRIBProperty::SetVariable(const char* variable, const char* value) |
| 49 | { |
| 50 | delete[] this->Declarations; |
| 51 | |
| 52 | // format of line is: Declare "variable" "type"\n |
| 53 | size_t length = strlen("Declare ") + strlen(variable) + strlen(value) + 8; |
| 54 | this->Declarations = new char[length]; |
| 55 | |
| 56 | auto result = |
| 57 | vtk::format_to_n(this->Declarations, length, "Declare \"{:s}\" \"{:s}\"\n", variable, value); |
| 58 | *result.out = '\0'; |
| 59 | this->Modified(); |
| 60 | } |
| 61 | |
| 62 | void vtkRIBProperty::AddVariable(const char* variable, const char* value) |
| 63 | { |