| 46 | } |
| 47 | |
| 48 | bool Push(StringPtrT tagName) |
| 49 | { |
| 50 | ASSERT(tagName[0] && tagName[1], ()); |
| 51 | |
| 52 | // Use first two chars as tagKey from tagName. |
| 53 | /// @todo Well, if something goes wrong here, and below, the new OSM tag was added into .osm file dump. |
| 54 | auto const tagKey = OsmElement::EntityType(*reinterpret_cast<uint16_t const *>(tagName)); |
| 55 | |
| 56 | switch (++m_depth) |
| 57 | { |
| 58 | case 1: m_current = nullptr; break; |
| 59 | case 2: |
| 60 | m_current = &m_parent; |
| 61 | m_current->m_type = tagKey; |
| 62 | break; |
| 63 | default: |
| 64 | m_current = &m_child; |
| 65 | m_current->m_type = tagKey; |
| 66 | break; |
| 67 | } |
| 68 | return true; |
| 69 | } |
| 70 | |
| 71 | void Pop(StringPtrT) |
| 72 | { |
no test coverage detected