37 Path& parse(
const OdAnsiString&
name,
const char* delimeters =
"/\\");
40 Path& add(
const OdAnsiString& part);
41 void append(
const OdAnsiString& part);
45 Path(
const OdAnsiString& path);
48 Path(
const char* path);
49 static const char*
Walk(
const char* szPath,
const char* delimeters =
"/\\");
65 if(
size()>0 && part==
"..") {
76 inline const char*
Path::Walk(
const char* path,
const char* delimeters) {
78 while((ch[0] = *path)) {
79 if(::strpbrk(delimeters, ch))
85 inline Path& Path::parse(
const OdAnsiString& path,
const char* delimeters) {
86 OdAnsiString astr(path);
87 for(
int i=0; !astr.isEmpty(); i=0) {
88 i = astr.findOneOf(delimeters);
90 astr = astr.right(astr.getLength()-1);
99 astr = astr.right(astr.getLength()-i);
104 inline Path& Path::parse(
const OdString& path,
const OdChar* delimeters) {
105 return Path::parse(OdAnsiString(
OdString(path)), OdAnsiString(
OdString(delimeters)));
112 inline Path& Path::add(
const OdAnsiString& part) {
append(part);
return *
this; }
113 inline Path& Path::add(
const Path& path) {
append(path);
return *
this; }
132 res += (sep +
at(i));
static const char * Walk(const char *szPath, const char *delimeters="/\\")
Path operator+(const OdAnsiString &path) const
OdString asStr(bool asdir=false, char sepch='/') const
Path & operator+=(const OdAnsiString &path)
typename A::size_type size_type
OdString & at(size_type arrayIndex)
GLuint const GLchar * name