| 421 | } |
| 422 | |
| 423 | string SlangStructTypeSyntax::getValue(const Value& value, bool /* uniform */) const |
| 424 | { |
| 425 | const AggregateValue& aggValue = static_cast<const AggregateValue&>(value); |
| 426 | |
| 427 | string result = aggValue.getTypeString() + "("; |
| 428 | |
| 429 | string separator = ""; |
| 430 | for (const auto& memberValue : aggValue.getMembers()) |
| 431 | { |
| 432 | result += separator; |
| 433 | separator = ","; |
| 434 | |
| 435 | const string& memberTypeName = memberValue->getTypeString(); |
| 436 | const TypeDesc memberTypeDesc = _parent->getType(memberTypeName); |
| 437 | |
| 438 | // Recursively use the syntax to generate the output, so we can supported nested structs. |
| 439 | result += _parent->getValue(memberTypeDesc, *memberValue, true); |
| 440 | } |
| 441 | |
| 442 | result += ")"; |
| 443 | |
| 444 | return result; |
| 445 | } |
| 446 | |
| 447 | MATERIALX_NAMESPACE_END |
no test coverage detected