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 160 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 preceed the output with.
Exceptions
IO_ERRORif a system error writing the output, such as a full disk.

Definition at line 173 of file specctra.h.

174  {
175  const char* quoteName = out->GetQuoteChar( name.c_str() );
176  const char* quoteValue = out->GetQuoteChar( value.c_str() );
177 
178  out->Print( nestLevel, "(%s%s%s %s%s%s)\n",
179  quoteName, name.c_str(), quoteName,
180  quoteValue, value.c_str(), quoteValue );
181  }
std::string name
Definition: specctra.h:162
std::string value
Definition: specctra.h:163
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 162 of file specctra.h.

Referenced by Format().

◆ value

std::string DSN::PROPERTY::value

Definition at line 163 of file specctra.h.

Referenced by Format().


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