C API Documentation
rrFileName.h
1 #ifndef rrFileNameH
2 #define rrFileNameH
3 #include <string>
4 #include <ostream>
5 #include "rrExporter.h"
6 using std::string;
7 using std::ostream;
8 
9 namespace rr
10 {
11 
16 class RR_DECLSPEC FileName
17 {
18  private:
19  mutable string mPathAndName;
20  string mPath;
21  string mName;
22  void MakeFileString();
23 
24  public:
25  FileName(const string& name = "", const string& path = "");
26  FileName(const FileName& fN);
27  ~FileName();
28 
29  FileName& operator = (const FileName& fN);
30  FileName& operator = (const string& fN);
31  FileName& operator = (const char* fN);
32  bool operator !=(const char* fN);
33  operator string();// {return mPathAndName;}
34  bool SetPath(const string& path);
35  void SetFileName(const string& name);
36  void SetNameAndPath(const string& path, const string& name);
37  void SetFileNameAndPath(const string& name);
38 
39  string GetFileName() const;
40  string GetPath() const;
41  string GetPathAndFileName() const;
42  string Get();
43  string GetFileNameNoExtension();
44  size_t size();
45 };
46 
47 RR_DECLSPEC std::ostream& operator <<(std::ostream &os, FileName &obj);
48 
49 }
50 #endif
Definition: rrFileName.h:17