| 67 | |
| 68 | template <class TTraits> |
| 69 | class TPathSplitBase: public TTraits { |
| 70 | public: |
| 71 | inline TPathSplitBase() = default; |
| 72 | |
| 73 | inline TPathSplitBase(const TStringBuf part) { |
| 74 | this->ParseFirstPart(part); |
| 75 | } |
| 76 | |
| 77 | inline TPathSplitBase& AppendHint(size_t hint) { |
| 78 | this->DoAppendHint(hint); |
| 79 | |
| 80 | return *this; |
| 81 | } |
| 82 | |
| 83 | inline TPathSplitBase& ParseFirstPart(const TStringBuf part) { |
| 84 | this->DoParseFirstPart(part); |
| 85 | |
| 86 | return *this; |
| 87 | } |
| 88 | |
| 89 | inline TPathSplitBase& ParsePart(const TStringBuf part) { |
| 90 | this->DoParsePart(part); |
| 91 | |
| 92 | return *this; |
| 93 | } |
| 94 | |
| 95 | template <class It> |
| 96 | inline TPathSplitBase& AppendMany(It b, It e) { |
| 97 | this->AppendHint(e - b); |
| 98 | |
| 99 | while (b != e) { |
| 100 | this->AppendComponent(*b++); |
| 101 | } |
| 102 | |
| 103 | return *this; |
| 104 | } |
| 105 | }; |
| 106 | |
| 107 | using TPathSplit = TPathSplitBase<TPathSplitTraitsLocal>; |
| 108 | using TPathSplitUnix = TPathSplitBase<TPathSplitTraitsUnix>; |
nothing calls this directly
no test coverage detected