| 751 | } |
| 752 | |
| 753 | void ObjectIdentifier::Component::toString(std::ostream& ss, bool toPython) const |
| 754 | { |
| 755 | switch (type) { |
| 756 | case Component::SIMPLE: |
| 757 | ss << name.getString(); |
| 758 | break; |
| 759 | case Component::MAP: |
| 760 | ss << "[" << name.toString(toPython) << "]"; |
| 761 | break; |
| 762 | case Component::ARRAY: |
| 763 | ss << "[" << begin << "]"; |
| 764 | break; |
| 765 | case Component::RANGE: |
| 766 | ss << '['; |
| 767 | if (begin != std::numeric_limits<int>::max()) { |
| 768 | ss << begin; |
| 769 | } |
| 770 | ss << ':'; |
| 771 | if (end != std::numeric_limits<int>::max()) { |
| 772 | ss << end; |
| 773 | } |
| 774 | if (step != 1) { |
| 775 | ss << ':' << step; |
| 776 | } |
| 777 | ss << ']'; |
| 778 | break; |
| 779 | default: |
| 780 | assert(0); |
| 781 | } |
| 782 | } |
| 783 | |
| 784 | enum ResolveFlags |
| 785 | { |
no test coverage detected