#include <ostream>
#include <string>
#include <vector>
+#include <msp/core/mspcore_api.h>
namespace Msp {
namespace FS {
iteration and slicing. In this context the root directory is treated as a
component of its own.
*/
-class Path
+class MSPCORE_API Path
{
private:
typedef std::vector<std::string::size_type> PositionArray;
public:
- class Iterator
+ class MSPCORE_API Iterator
{
public:
typedef PositionArray::difference_type difference_type;
private:
std::string path;
- std::vector<std::string::size_type> separators;
+ PositionArray separators;
public:
- Path();
+ Path() = default;
Path(const std::string &);
- Path(const char *);
-private:
- void init(const std::string &);
+ Path(const char *p): Path(std::string(p)) { }
-public:
/// Returns the path as a string.
const std::string &str() const { return path; }