KiCad PCB EDA Suite
Loading...
Searching...
No Matches
IDF_NOTE Class Reference

An entry in the NOTE section of an IDF file. More...

#include <idf_common.h>

Public Member Functions

 IDF_NOTE ()
 
void SetText (const std::string &aText)
 Set the text to be stored as a NOTE entry.
 
void SetPosition (double aXpos, double aYpos)
 Set the position (mm) of the NOTE entry.
 
void SetSize (double aHeight, double aLength)
 Set the height and length (mm) of the NOTE entry.
 
const std::string & GetText ()
 
void GetPosition (double &aXpos, double &aYpos)
 
void GetSize (double &aHeight, double &aLength)
 

Private Member Functions

bool readNote (std::istream &aBoardFile, IDF3::FILE_STATE &aBoardState, IDF3::IDF_UNIT aBoardUnit)
 Read a note entry from an IDFv3 file.
 
bool writeNote (std::ostream &aBoardFile, IDF3::IDF_UNIT aBoardUnit)
 Write a note entry to an IDFv3 file.
 

Private Attributes

std::string text
 
double xpos
 
double ypos
 
double height
 
double length
 

Friends

class IDF3_BOARD
 

Detailed Description

An entry in the NOTE section of an IDF file.

Definition at line 237 of file idf_common.h.

Constructor & Destructor Documentation

◆ IDF_NOTE()

IDF_NOTE::IDF_NOTE ( )

Definition at line 76 of file idf_common.cpp.

References height, length, xpos, and ypos.

Member Function Documentation

◆ GetPosition()

void IDF_NOTE::GetPosition ( double & aXpos,
double & aYpos )
Returns
the position (mm) of the note entry.

Definition at line 306 of file idf_common.cpp.

References xpos, and ypos.

◆ GetSize()

void IDF_NOTE::GetSize ( double & aHeight,
double & aLength )
Returns
the height and length (mm) of the note entry.

Definition at line 313 of file idf_common.cpp.

References height, and length.

◆ GetText()

const std::string & IDF_NOTE::GetText ( )
Returns
the string stored in the note entry.

Definition at line 300 of file idf_common.cpp.

References text.

◆ readNote()

bool IDF_NOTE::readNote ( std::istream & aBoardFile,
IDF3::FILE_STATE & aBoardState,
IDF3::IDF_UNIT aBoardUnit )
private

Read a note entry from an IDFv3 file.

Parameters
aBoardFileis an open BOARD file; the file position must be set to the start of a NOTE entry.
aBoardStateis the parser's current state value.
aBoardUnitis the BOARD file's native units (MM or THOU).
Returns
true if a note item was read, false otherwise.
Exceptions
Incase of unrecoverable errors.

Definition at line 85 of file idf_common.cpp.

References IDF3::CompareToken(), IDF3::FetchIDFLine(), IDF3::FILE_INVALID, IDF3::GetIDFString(), height, IDF_THOU_TO_MM, length, text, IDF3::UNIT_THOU, xpos, and ypos.

Referenced by IDF3_BOARD, and IDF3_BOARD::readBrdNotes().

◆ SetPosition()

void IDF_NOTE::SetPosition ( double aXpos,
double aYpos )

Set the position (mm) of the NOTE entry.

Definition at line 286 of file idf_common.cpp.

References xpos, and ypos.

◆ SetSize()

void IDF_NOTE::SetSize ( double aHeight,
double aLength )

Set the height and length (mm) of the NOTE entry.

Definition at line 293 of file idf_common.cpp.

References height, and length.

◆ SetText()

void IDF_NOTE::SetText ( const std::string & aText)

Set the text to be stored as a NOTE entry.

Definition at line 280 of file idf_common.cpp.

References text.

◆ writeNote()

bool IDF_NOTE::writeNote ( std::ostream & aBoardFile,
IDF3::IDF_UNIT aBoardUnit )
private

Write a note entry to an IDFv3 file.

Parameters
aBoardFileis an open BOARD file; the file position must be within a NOTE section.
aBoardUnitis the BOARD file's native units (MM or THOU).
Returns
true if the item was successfully written, false otherwise.
Exceptions
Incase of unrecoverable error.

Definition at line 260 of file idf_common.cpp.

References height, IDF_THOU_TO_MM, length, text, IDF3::UNIT_THOU, xpos, and ypos.

Referenced by IDF3_BOARD.

Friends And Related Symbol Documentation

◆ IDF3_BOARD

friend class IDF3_BOARD
friend

Definition at line 273 of file idf_common.h.

References IDF3_BOARD, readNote(), and writeNote().

Referenced by IDF3_BOARD.

Member Data Documentation

◆ height

double IDF_NOTE::height
private

Definition at line 301 of file idf_common.h.

Referenced by GetSize(), IDF_NOTE(), readNote(), SetSize(), and writeNote().

◆ length

double IDF_NOTE::length
private

Definition at line 302 of file idf_common.h.

Referenced by GetSize(), IDF_NOTE(), readNote(), SetSize(), and writeNote().

◆ text

std::string IDF_NOTE::text
private

Definition at line 298 of file idf_common.h.

Referenced by GetText(), readNote(), SetText(), and writeNote().

◆ xpos

double IDF_NOTE::xpos
private

Definition at line 299 of file idf_common.h.

Referenced by GetPosition(), IDF_NOTE(), readNote(), SetPosition(), and writeNote().

◆ ypos

double IDF_NOTE::ypos
private

Definition at line 300 of file idf_common.h.

Referenced by GetPosition(), IDF_NOTE(), readNote(), SetPosition(), and writeNote().


The documentation for this class was generated from the following files: