| 600 | } |
| 601 | |
| 602 | const char* ParameterGrp::GetAttribute( |
| 603 | ParamType Type, |
| 604 | const char* Name, |
| 605 | std::string& Value, |
| 606 | const char* Default |
| 607 | ) const |
| 608 | { |
| 609 | if (!_pGroupNode) { |
| 610 | return Default; |
| 611 | } |
| 612 | |
| 613 | const char* T = TypeName(Type); |
| 614 | if (!T) { |
| 615 | return Default; |
| 616 | } |
| 617 | |
| 618 | DOMElement* pcElem = FindElement(_pGroupNode, T, Name); |
| 619 | if (!pcElem) { |
| 620 | return Default; |
| 621 | } |
| 622 | |
| 623 | if (Type == ParamType::FCText) { |
| 624 | Value = GetASCII(Name, Default); |
| 625 | } |
| 626 | else if (Type != ParamType::FCGroup) { |
| 627 | Value = StrX(pcElem->getAttribute(XStrLiteral("Value").unicodeForm())).c_str(); |
| 628 | } |
| 629 | return Value.c_str(); |
| 630 | } |
| 631 | |
| 632 | std::vector<std::pair<std::string, std::string>> ParameterGrp::GetAttributeMap( |
| 633 | ParamType Type, |
nothing calls this directly
no test coverage detected