Sophie

Sophie

distrib > Mandriva > cooker > i586 > by-pkgid > 0a6e7da7c1280f0f9d531d0d9573351f > files > 197

d4x-debug-2.5.7.1-7mdv2011.0.i586.rpm

#ifndef _D4X_PATH_CLASS_HEADER_
#define _D4X_PATH_CLASS_HEADER_

#include <string>

namespace d4x{

	/* why not boost::path?
	 */
	
	class Path:public std::string{
		void normalize(); //remove all /./ and /../
	public:
		Path():std::string(){};
		Path(const Path &_p):std::string(_p){};
		Path(const char*_p):std::string(_p){normalize();};
		Path(const std::string &_p):std::string(_p){normalize();};
		Path& operator =(const Path &_p){
			std::string::operator=(_p);
			return *this;
		};
		Path& operator /=(const Path &); //concatenate(append) path
		Path operator/(const Path &) const;
	};
};


#endif //_D4X_PATH_CLASS_HEADER_