~ubuntu-branches/ubuntu/intrepid/config-manager/intrepid

1 by Anand Kumria
Import upstream version 0.1p53
1
/*
2
 * Copyright (c) 2002 Robert Collins.
3
 *
4
 *     This program is free software; you can redistribute it and/or modify
5
 *     it under the terms of the GNU General Public License as published by
6
 *     the Free Software Foundation; either version 2 of the License, or
7
 *     (at your option) any later version.
8
 *
9
 *     A copy of the GNU General Public License can be found at
10
 *     http://www.gnu.org/
11
 *
12
 * Written by Robert Collins <robertc@hotmail.com>
13
 *
14
 */
15
16
#ifndef _PATH_H_
17
#define _PATH_H_
18
19
#include <string>
20
21
using namespace std;
22
23
class Path
24
{
25
public:
26
  Path ();
27
  Path (string const &aPath);
28
  Path (Path const &);
29
  Path& operator= (string const &);
30
  Path& operator= (Path const &);
31
  ~Path();
32
  Path operator + (Path const &rhs) const;
33
34
  string const &fullName() const {return _name;}
35
  string const &baseName() const {return _basename;}
36
  string const &dirName() const {return _dirname;}
37
  
38
private:
39
  void setToString (string const &);
40
  static void StripSlash (string &aString);
41
  string _name;
42
  string _basename;
43
  string _dirname;
44
};
45
46
#endif // _PATH_H_