1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-02-22 12:44:55 +00:00
dindexer/src/navigate/entrypath.hpp

47 lines
1.3 KiB
C++
Raw Normal View History

2016-02-05 21:01:51 +01:00
/* Copyright 2015, 2016, Michele Santullo
2016-01-26 18:26:16 +01:00
* This file is part of "dindexer".
*
* "dindexer" is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* "dindexer" is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with "dindexer". If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef id0F3472647B3E45AE8A30319AE7C76477
#define id0F3472647B3E45AE8A30319AE7C76477
#include <vector>
#include <string>
2016-01-29 20:15:16 +01:00
#include <cstdint>
2016-01-26 18:26:16 +01:00
namespace din {
2016-04-28 10:20:27 +02:00
class EntryPath {
2016-01-26 18:26:16 +01:00
public:
2016-04-28 10:20:27 +02:00
EntryPath ( void ) = default;
2016-01-26 18:26:16 +01:00
void push_piece ( const std::string& parPiece );
std::string to_string ( void ) const;
2016-01-29 20:15:16 +01:00
uint16_t level ( void ) const;
const std::string& operator[] ( std::size_t parIndex ) const;
2016-01-26 18:26:16 +01:00
uint32_t group_id ( void ) const;
const std::string& group_id_as_string ( void ) const;
std::string file_path ( void ) const;
2016-01-26 18:26:16 +01:00
private:
using StackType = std::vector<std::string>;
StackType m_stack;
};
} //namespace din
#endif