| 83 | } |
| 84 | |
| 85 | std::string BaseGenerator::NamespaceDir(const Parser &parser, |
| 86 | const std::string &path, |
| 87 | const Namespace &ns, |
| 88 | const bool dasherize) { |
| 89 | EnsureDirExists(path); |
| 90 | if (parser.opts.one_file) return path; |
| 91 | std::string namespace_dir = path; // Either empty or ends in separator. |
| 92 | auto &namespaces = ns.components; |
| 93 | for (auto it = namespaces.begin(); it != namespaces.end(); ++it) { |
| 94 | namespace_dir += !dasherize ? *it : ToDasherizedCase(*it); |
| 95 | namespace_dir += kPathSeparator; |
| 96 | EnsureDirExists(namespace_dir); |
| 97 | } |
| 98 | return namespace_dir; |
| 99 | } |
| 100 | |
| 101 | std::string BaseGenerator::NamespaceDir(const Namespace &ns, |
| 102 | const bool dasherize) const { |
nothing calls this directly
no test coverage detected