MCPcopy Create free account
hub / github.com/Robotips/uConfig / writeLib

Method writeLib

src/kicad/parser/kicadlibparser.cpp:112–131  ·  view source on GitHub ↗

* @brief Serialise the lib in Kicad format * @param lib lib to serialise */

Source from the content-addressed store, hash-verified

110 * @param lib lib to serialise
111 */
112void KicadLibParser::writeLib(Lib *lib)
113{
114 _stream << "EESchema-LIBRARY Version 2.3 Date: "
115 << QDateTime::currentDateTime().toString("dd/MM/yyyy hh:mm:ss")
116 << '\n';
117 _stream << "#encoding utf-8" << '\n';
118 //_stream << "#created with uConfig by Sebastien CAUX (sebcaux)" << '\n';
119 //_stream << "#https://github.com/Robotips/uConfig" << '\n';
120
121 // components
122 foreach (Component *component, lib->components())
123 {
124 writeComponent(component);
125 _stream << '\n';
126 }
127
128 // footer
129 _stream << "#" << '\n';
130 _stream << "#End Library" << '\n';
131}
132
133void KicadLibParser::writeComponent(Component *component)
134{

Callers

nothing calls this directly

Calls 2

foreachFunction · 0.70
componentsMethod · 0.45

Tested by

no test coverage detected