MCPcopy Create free account
hub / github.com/Icinga/icinga2 / EmitConfigItem

Method EmitConfigItem

lib/base/configwriter.cpp:167–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void ConfigWriter::EmitConfigItem(std::ostream& fp, const String& type, const String& name, bool isTemplate,
168 bool ignoreOnError, const Array::Ptr& imports, const Dictionary::Ptr& attrs)
169{
170 if (isTemplate)
171 fp << "template ";
172 else
173 fp << "object ";
174
175 EmitIdentifier(fp, type, false);
176 fp << " ";
177 EmitString(fp, name);
178
179 if (ignoreOnError)
180 fp << " ignore_on_error";
181
182 fp << " ";
183 EmitScope(fp, 1, attrs, imports, true);
184}
185
186void ConfigWriter::EmitFunctionCall(std::ostream& fp, const String& name, const Array::Ptr& arguments)
187{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected