KiCad PCB EDA Suite
DSN::PROPERTY Struct Reference

#include <specctra.h>

Public Member Functions

void Format (OUTPUTFORMATTER *out, int nestLevel) const
 Function Format writes 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 159 of file specctra.h.

Member Function Documentation

◆ Format()

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

Function Format writes 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 172 of file specctra.h.

173  {
174  const char* quoteName = out->GetQuoteChar( name.c_str() );
175  const char* quoteValue = out->GetQuoteChar( value.c_str() );
176 
177  out->Print( nestLevel, "(%s%s%s %s%s%s)\n",
178  quoteName, name.c_str(), quoteName,
179  quoteValue, value.c_str(), quoteValue );
180  }
std::string name
Definition: specctra.h:161
std::string value
Definition: specctra.h:162
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:331
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:408

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

Member Data Documentation

◆ name

std::string DSN::PROPERTY::name

Definition at line 161 of file specctra.h.

Referenced by Format().

◆ value

std::string DSN::PROPERTY::value

Definition at line 162 of file specctra.h.

Referenced by Format().


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