| 5136 | |
| 5137 | |
| 5138 | string t_cpp_generator::get_include_prefix(const t_program& program) const { |
| 5139 | string include_prefix = program.get_include_prefix(); |
| 5140 | if (!use_include_prefix_ || (include_prefix.size() > 0 && include_prefix[0] == '/')) { |
| 5141 | // if flag is turned off or this is absolute path, return empty prefix |
| 5142 | return ""; |
| 5143 | } |
| 5144 | |
| 5145 | string::size_type last_slash = string::npos; |
| 5146 | if ((last_slash = include_prefix.rfind("/")) != string::npos) { |
| 5147 | return include_prefix.substr(0, last_slash) |
| 5148 | + (get_program()->is_out_path_absolute() ? "/" : "/" + out_dir_base_ + "/"); |
| 5149 | } |
| 5150 | |
| 5151 | return ""; |
| 5152 | } |
| 5153 | |
| 5154 | string t_cpp_generator::get_legal_program_name(std::string program_name) |
| 5155 | { |
nothing calls this directly
no test coverage detected