source: soft/giet_vm/memo/include/path_handler.h @ 562

Last change on this file since 562 was 163, checked in by karaoui, 12 years ago

changing mover to memo
changing soft.bin to soft.elf
...

File size: 807 bytes
RevLine 
[163]1#ifndef PATH_H_
2#define PATH_H_
3
4#include <iostream>
5#include <string>
6#include <sstream>
7#include <vector>
8#include <algorithm>
9#include <iterator>
10
11
12//class MeMo;
13
14class PathHandler
15{
16    //friend class MeMo;
17
18    std::string dirPath;
19    char delim;
20
21    std::vector<std::string>& split(const std::string &s, char delim, std::vector<std::string> &elems);
22
23    std::vector<std::string> split(const std::string &s, char delim);
24
25    //extract the path without the filename
26    std::string getFilePath(const std::string& filepath);
27
28public:
29
30    ~PathHandler();
31    PathHandler(const std::string& filepath);
32
33    //return the fullPath relative to where execution is done.
34    std::string getFullPath(const std::string& filepath) const;
35
36    std::string getFileName(const std::string& filepath);
37};
38
39
40#endif
Note: See TracBrowser for help on using the repository browser.