(openms_path, lib_name, path, clazz, maintainer)
| 121 | end |
| 122 | |
| 123 | def create_sources(openms_path, lib_name, path, clazz, maintainer) |
| 124 | |
| 125 | license = getLicense(openms_path) |
| 126 | |
| 127 | # write the header file |
| 128 | header_guard = path.gsub("/", "_") + "_" + clazz.upcase + "_H" |
| 129 | template = ERB.new(getTemplate("header")) |
| 130 | |
| 131 | doc = template.result(binding) |
| 132 | header_file = "#{openms_path}/src/#{lib_name}/include/OpenMS/#{path}/#{clazz}.h" |
| 133 | File.open(header_file, 'w') {|f| f.write(doc) } |
| 134 | |
| 135 | # write the source file |
| 136 | header = "#{path}/#{clazz}.h" |
| 137 | template = ERB.new(getTemplate("source")) |
| 138 | |
| 139 | doc = template.result(binding) |
| 140 | source_file = "#{openms_path}/src/#{lib_name}/source/#{path}/#{clazz}.cpp" |
| 141 | File.open(source_file, 'w') {|f| f.write(doc) } |
| 142 | end |
| 143 | |
| 144 | def register_file(sources_cmake, filename) |
| 145 | contentsArray = File.readlines(sources_cmake) |
no test coverage detected