Lines Matching defs:components
50 FilePath::FilePath (const std::vector<std::string>& components)
52 for (size_t ndx = 0; ndx < components.size(); ndx++)
56 m_path += components[ndx];
60 void FilePath::split (std::vector<std::string>& components) const
62 components.clear();
68 components.push_back(separator + separator);
70 components.push_back(separator);
79 components.push_back(m_path.substr(curCompStart, pos - curCompStart));
86 components.push_back(m_path.substr(curCompStart, pos - curCompStart));
89 FilePath FilePath::join (const std::vector<std::string>& components)
91 return FilePath(components);
96 std::vector<std::string> components;
99 split(components);
105 // Do in reverse order and eliminate any . or .. components
106 for (int ndx = (int)components.size()-1; ndx >= 0; ndx--)
108 const std::string& comp = components[ndx];
122 // Prepend necessary ".." components
126 if (reverseNormalizedComponents.empty() && components.back() == ".")
127 reverseNormalizedComponents.push_back("."); // Composed of "." components only
141 std::vector<std::string> components;
142 split(components);
143 return !components.empty() ? components[components.size()-1] : std::string("");
148 std::vector<std::string> components;
149 split(components);
150 if (components.size() > 1)
152 components.pop_back();
153 return FilePath(components).getPath();