| 645 | } |
| 646 | |
| 647 | std::string IndexToClassificatorType(uint32_t index) |
| 648 | { |
| 649 | auto const & c = classif(); |
| 650 | if (!c.HasTypesMapping()) |
| 651 | throw std::runtime_error("Types mapping is not loaded."); |
| 652 | |
| 653 | uint32_t t; |
| 654 | try |
| 655 | { |
| 656 | t = c.GetTypeForIndex(index); |
| 657 | } |
| 658 | catch (std::out_of_range const & exc) |
| 659 | { |
| 660 | throw std::runtime_error("Type is not found. index: " + std::to_string(index)); |
| 661 | } |
| 662 | |
| 663 | if (!c.IsTypeValid(t)) |
| 664 | throw std::runtime_error("Type is not valid. type: " + std::to_string(t)); |
| 665 | |
| 666 | return c.GetReadableObjectName(t); |
| 667 | } |
| 668 | } // namespace |
| 669 | |
| 670 | BOOST_PYTHON_MODULE(pykmlib) |
nothing calls this directly
no test coverage detected