/[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 1471 by schoenebeck, Mon Nov 5 13:56:26 2007 UTC revision 1537 by senoner, Mon Dec 3 18:30:47 2007 UTC
# Line 82  std::string Path::toDbPath() const { Line 82  std::string Path::toDbPath() const {
82    
83  std::string Path::toLscp() const {  std::string Path::toLscp() const {
84      std::string result;      std::string result;
85        #if WIN32
86        if(drive) {
87            result.assign(&drive,1);
88            result += ":";
89        }
90        #endif
91      for (int iElement = 0; iElement < elements.size(); iElement++) {      for (int iElement = 0; iElement < elements.size(); iElement++) {
92          // replace "special characters" by LSCP escape sequences          // replace "special characters" by LSCP escape sequences
93          std::string e = elements[iElement];          std::string e = elements[iElement];
# Line 115  std::string Path::toLscp() const { Line 121  std::string Path::toLscp() const {
121    
122  std::string Path::toWindows() const {  std::string Path::toWindows() const {
123      std::stringstream result;      std::stringstream result;
124      result <<          const char cDrive =
125          ((drive >= 'A' && drive <= 'Z') || (drive >= 'a' && drive <= 'z'))              ((drive >= 'A' && drive <= 'Z') || (drive >= 'a' && drive <= 'z'))
126              ? drive : '?';              ? drive : '?';
127        result << cDrive;
128      result << ':';      result << ':';
129      for (int iElement = 0; iElement < elements.size(); iElement++) {      for (int iElement = 0; iElement < elements.size(); iElement++) {
130          // append encoded node to full encoded path          // append encoded node to full encoded path
# Line 206  Path Path::fromDbPath(std::string path) Line 213  Path Path::fromDbPath(std::string path)
213      return result;      return result;
214  }  }
215    
216  Path Path::fromWindowsPath(std::string path) {  Path Path::fromWindows(std::string path) {
217      Path result;      Path result;
218    
219      int nodeEnd = 0;      int nodeEnd = 0;

Legend:
Removed from v.1471  
changed lines
  Added in v.1537

  ViewVC Help
Powered by ViewVC