KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
KICAD_FORMAT Namespace Reference

Functions

void FormatBool (OUTPUTFORMATTER *aOut, const wxString &aKey, bool aValue)
 Writes a boolean to the formatter, in the style (aKey [yes|no])
 
void FormatOptBool (OUTPUTFORMATTER *aOut, const wxString &aKey, std::optional< bool > aValue)
 Writes an optional boolean to the formatter.
 
void FormatUuid (OUTPUTFORMATTER *aOut, const KIID &aUuid)
 
void FormatStreamData (OUTPUTFORMATTER &aOut, const wxStreamBuffer &aStream)
 Write binary data to the formatter as base 64 encoded string.
 
void Prettify (std::string &aSource, bool aCompactSave)
 

Function Documentation

◆ FormatBool()

◆ FormatOptBool()

KICOMMON_API void KICAD_FORMAT::FormatOptBool ( OUTPUTFORMATTER aOut,
const wxString &  aKey,
std::optional< bool >  aValue 
)

Writes an optional boolean to the formatter.

If a value is present, calls FormatBool. If no value is present, Writes (aKey none).

Parameters
aOutis the output formatter to write to
aKeyis the name of the boolean flag
aValueis the value to write

Definition at line 40 of file kicad_io_utils.cpp.

References FormatBool(), and OUTPUTFORMATTER::Print().

Referenced by PCB_IO_KICAD_SEXPR::format().

◆ FormatStreamData()

KICOMMON_API void KICAD_FORMAT::FormatStreamData ( OUTPUTFORMATTER aOut,
const wxStreamBuffer &  aStream 
)

Write binary data to the formatter as base 64 encoded string.

Definition at line 55 of file kicad_io_utils.cpp.

References MIME_BASE64_LENGTH, OUTPUTFORMATTER::Print(), and TO_UTF8.

Referenced by PCB_IO_KICAD_SEXPR::format(), DS_DATA_MODEL_IO::format(), and SCH_IO_KICAD_SEXPR::saveBitmap().

◆ FormatUuid()

◆ Prettify()