KiCad PCB EDA Suite
DSN::PROPERTY Struct Reference

#include <specctra.h>

Public Member Functions

void Format (OUTPUTFORMATTER *out, int nestLevel) const
 Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format. More...
 

Public Attributes

std::string name
 
std::string value
 

Detailed Description

Definition at line 169 of file specctra.h.

Member Function Documentation

◆ Format()

void DSN::PROPERTY::Format ( OUTPUTFORMATTER out,
int  nestLevel 
) const
inline

Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.

Parameters
outThe formatter to write to.
nestLevelA multiple of the number of spaces to precede the output with.
Exceptions
IO_ERRORif a system error writing the output, such as a full disk.

Definition at line 181 of file specctra.h.

182  {
183  const char* quoteName = out->GetQuoteChar( name.c_str() );
184  const char* quoteValue = out->GetQuoteChar( value.c_str() );
185 
186  out->Print( nestLevel, "(%s%s%s %s%s%s)\n",
187  quoteName, name.c_str(), quoteName,
188  quoteValue, value.c_str(), quoteValue );
189  }
std::string name
Definition: specctra.h:171
std::string value
Definition: specctra.h:172
static const char * GetQuoteChar(const char *wrapee, const char *quote_char)
Perform quote character need determination according to the Specctra DSN specification.
Definition: richio.cpp:348
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:426

References OUTPUTFORMATTER::GetQuoteChar(), name, OUTPUTFORMATTER::Print(), and value.

Member Data Documentation

◆ name

std::string DSN::PROPERTY::name

Definition at line 171 of file specctra.h.

Referenced by Format().

◆ value

std::string DSN::PROPERTY::value

Definition at line 172 of file specctra.h.

Referenced by Format().


The documentation for this struct was generated from the following file: