| 630 | } |
| 631 | |
| 632 | std::vector<std::pair<std::string, std::string>> ParameterGrp::GetAttributeMap( |
| 633 | ParamType Type, |
| 634 | const char* sFilter |
| 635 | ) const |
| 636 | { |
| 637 | std::vector<std::pair<std::string, std::string>> res; |
| 638 | if (!_pGroupNode) { |
| 639 | return res; |
| 640 | } |
| 641 | |
| 642 | const char* T = TypeName(Type); |
| 643 | if (!T) { |
| 644 | return res; |
| 645 | } |
| 646 | |
| 647 | std::string Name; |
| 648 | |
| 649 | DOMElement* pcTemp = FindElement(_pGroupNode, T); |
| 650 | while (pcTemp) { |
| 651 | Name = StrX( |
| 652 | static_cast<DOMElement*>(pcTemp) |
| 653 | ->getAttributes() |
| 654 | ->getNamedItem(XStrLiteral("Name").unicodeForm()) |
| 655 | ->getNodeValue() |
| 656 | ) |
| 657 | .c_str(); |
| 658 | // check on filter condition |
| 659 | if (!sFilter || Name.find(sFilter) != std::string::npos) { |
| 660 | if (Type == ParamType::FCGroup) { |
| 661 | res.emplace_back(Name, std::string()); |
| 662 | } |
| 663 | else { |
| 664 | res.emplace_back( |
| 665 | Name, |
| 666 | StrX(static_cast<DOMElement*>(pcTemp)->getAttribute(XStrLiteral("Value").unicodeForm())) |
| 667 | .c_str() |
| 668 | ); |
| 669 | } |
| 670 | } |
| 671 | pcTemp = FindNextElement(pcTemp, T); |
| 672 | } |
| 673 | return res; |
| 674 | } |
| 675 | |
| 676 | void ParameterGrp::_Notify(ParamType Type, const char* Name, const char* Value) |
| 677 | { |
nothing calls this directly
no test coverage detected