/[svn]/linuxsampler/trunk/src/common/Path.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/Path.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1338 by schoenebeck, Sun Sep 9 23:30:34 2007 UTC revision 1345 by iliev, Thu Sep 13 21:46:25 2007 UTC
# Line 53  std::string Path::toPosix() { Line 53  std::string Path::toPosix() {
53      return result;      return result;
54  }  }
55    
56    std::string Path::toDbPath() {
57        std::string result;
58        for (int iElement = 0; iElement < elements.size(); iElement++) {
59            // replace all slashes with '\0'
60            std::string e = elements[iElement];
61            for (int i = 0; i < e.length(); i++) {
62                if (e.at(i) == '/') e.at(i) = '\0';
63            }
64            // append encoded node to full encoded path
65            result += "/" + e;
66        }
67        if (!result.size()) result = "/";
68        return result;
69    }
70    
71  Path Path::operator+(const Path& p) {  Path Path::operator+(const Path& p) {
72      Path result = *this;      Path result = *this;
73      for (int i = 0; i < p.elements.size(); i++)      for (int i = 0; i < p.elements.size(); i++)

Legend:
Removed from v.1338  
changed lines
  Added in v.1345

  ViewVC Help
Powered by ViewVC