|
KiCad PCB EDA Suite
|
#include <idf_parser.h>
Public Member Functions | |
| IDF3_COMP_OUTLINE_DATA () | |
| Create an object with default settings and no parent or associated outline. | |
| IDF3_COMP_OUTLINE_DATA (IDF3_COMPONENT *aParent, IDF3_COMP_OUTLINE *aOutline) | |
| Create an object with default settings and the specified parent and associated outline. | |
| IDF3_COMP_OUTLINE_DATA (IDF3_COMPONENT *aParent, IDF3_COMP_OUTLINE *aOutline, double aXoff, double aYoff, double aZoff, double aAngleOff) | |
| Create an object the specified parent and associated outline and the specified data. | |
| ~IDF3_COMP_OUTLINE_DATA () | |
| bool | SetOffsets (double aXoff, double aYoff, double aZoff, double aAngleOff) |
| Set the position and orientation of this outline item in relation to its parent. | |
| void | GetOffsets (double &aXoff, double &aYoff, double &aZoff, double &aAngleOff) |
| Retrieve the position and orientation of this outline item in relation to its parent. | |
| void | SetParent (IDF3_COMPONENT *aParent) |
| Set the parent object. | |
| bool | SetOutline (IDF3_COMP_OUTLINE *aOutline) |
| Set the outline whose position is managed by this object. | |
| IDF3_COMP_OUTLINE * | GetOutline (void) |
| Retrieve the outline whose position is managed by this object. | |
| const std::string & | GetError (void) |
Private Member Functions | |
| bool | checkOwnership (int aSourceLine, const char *aSourceFunc) |
| bool | readPlaceData (std::istream &aBoardFile, IDF3::FILE_STATE &aBoardState, IDF3_BOARD *aBoard, IDF3::IDF_VERSION aIdfVersion, bool aNoSubstituteOutlines) |
| Read placement data from an open IDFv3 file. | |
| void | writePlaceData (std::ostream &aBoardFile, double aXpos, double aYpos, double aAngle, const std::string &aRefDes, IDF3::IDF_PLACEMENT aPlacement, IDF3::IDF_LAYER aSide) |
| Write RECORD 2 and RECORD 3 of a PLACEMENT section as per IDFv3 specification. | |
Private Attributes | |
| double | xoff |
| double | yoff |
| double | zoff |
| double | aoff |
| std::string | errormsg |
| IDF3_COMP_OUTLINE * | outline |
| IDF3_COMPONENT * | parent |
Friends | |
| class | IDF3_BOARD |
| class | IDF3_COMPONENT |
Definition at line 61 of file idf_parser.h.
| IDF3_COMP_OUTLINE_DATA::IDF3_COMP_OUTLINE_DATA | ( | ) |
Create an object with default settings and no parent or associated outline.
Definition at line 84 of file idf_parser.cpp.
References aoff, outline, parent, xoff, yoff, and zoff.
Referenced by readPlaceData().
| IDF3_COMP_OUTLINE_DATA::IDF3_COMP_OUTLINE_DATA | ( | IDF3_COMPONENT * | aParent, |
| IDF3_COMP_OUTLINE * | aOutline ) |
Create an object with default settings and the specified parent and associated outline.
| aParent | is the owning IDF3_COMPONENT object. |
| aOutline | is the outline for this placed component. |
Definition at line 95 of file idf_parser.cpp.
References aoff, IDF3_COMPONENT, IDF3_COMP_OUTLINE::incrementRef(), outline, parent, xoff, yoff, and zoff.
| IDF3_COMP_OUTLINE_DATA::IDF3_COMP_OUTLINE_DATA | ( | IDF3_COMPONENT * | aParent, |
| IDF3_COMP_OUTLINE * | aOutline, | ||
| double | aXoff, | ||
| double | aYoff, | ||
| double | aZoff, | ||
| double | aAngleOff ) |
Create an object the specified parent and associated outline and the specified data.
| aParent | is the owning IDF3_COMPONENT object. |
| aOutline | is the outline for this placed component. |
| aXoff | is the X offset of this outline in relation to its parent. |
| aYoff | is the Y offset of this outline in relation to its parent. |
| aZoff | is the board offset of this outline as per IDFv3 specification. |
| aAoff | is the rotational offset of this outline in relation to its parent. |
Definition at line 110 of file idf_parser.cpp.
References aoff, IDF3_COMPONENT, outline, parent, xoff, yoff, and zoff.
| IDF3_COMP_OUTLINE_DATA::~IDF3_COMP_OUTLINE_DATA | ( | ) |
Definition at line 124 of file idf_parser.cpp.
References outline.
|
private |
Definition at line 132 of file idf_parser.cpp.
References IDF3::CAD_ELEC, IDF3::CAD_MECH, errormsg, IDF3::GetPlacementString(), parent, IDF3::PS_ECAD, IDF3::PS_MCAD, IDF3::PS_PLACED, and IDF3::PS_UNPLACED.
Referenced by SetOffsets(), and SetOutline().
|
inline |
Definition at line 139 of file idf_parser.h.
References errormsg.
| void IDF3_COMP_OUTLINE_DATA::GetOffsets | ( | double & | aXoff, |
| double & | aYoff, | ||
| double & | aZoff, | ||
| double & | aAngleOff ) |
Retrieve the position and orientation of this outline item in relation to its parent.
| aXoff | is the X offset of this outline in relation to its parent. |
| aYoff | is the Y offset of this outline in relation to its parent. |
| aZoff | is the board offset of this outline as per IDFv3 specification. |
| aAoff | is the rotational offset of this outline in relation to its parent. |
Definition at line 193 of file idf_parser.cpp.
|
inline |
Retrieve the outline whose position is managed by this object.
Definition at line 134 of file idf_parser.h.
References outline.
|
private |
Read placement data from an open IDFv3 file.
| aBoardFile | is the open IDFv3 file |
| aBoardState | is the internal status flag of the IDF parser |
| aIdfVersion | is the version of the file currently being parsed |
| aBoard | is the IDF3_BOARD object which will store the data |
Definition at line 228 of file idf_parser.cpp.
References IDF3_BOARD::AddComponent(), aoff, IDF3::CAD_ELEC, IDF3::CompareToken(), ERROR_IDF, IDF3::FetchIDFLine(), IDF3::FILE_PLACEMENT, IDF3_BOARD::FindComponent(), IDF3_BOARD::GetCadType(), IDF3_BOARD::GetComponentOutline(), IDF3::GetIDFString(), IDF3_BOARD::GetInvalidOutline(), IDF3::GetLayerString(), IDF3_BOARD::GetNewRefDes(), IDF3::GetPlacementString(), IDF3_BOARD::GetUnit(), IDF3_BOARD, IDF3_COMP_OUTLINE_DATA(), IDF3_COMPONENT, IDF_THOU_TO_MM, IDF3::IDF_V2, IDF3::IDF_V3, IDF3::LYR_BOTTOM, IDF3::LYR_TOP, outline, parent, IDF3::PS_ECAD, IDF3::PS_MCAD, IDF3::PS_PLACED, IDF3::PS_UNPLACED, IDF3_COMPONENT::SetPlacement(), IDF3_COMPONENT::SetPosition(), IDF3_COMPONENT::SetRefDes(), IDF3::UNIT_THOU, xoff, yoff, and zoff.
Referenced by IDF3_BOARD::readBrdPlacement().
| bool IDF3_COMP_OUTLINE_DATA::SetOffsets | ( | double | aXoff, |
| double | aYoff, | ||
| double | aZoff, | ||
| double | aAngleOff ) |
Set the position and orientation of this outline item in relation to its parent.
| aXoff | is the X offset of this outline in relation to its parent. |
| aYoff | is the Y offset of this outline in relation to its parent. |
| aZoff | is the board offset of this outline as per IDFv3 specification. |
| aAoff | is the rotational offset of this outline in relation to its parent. |
Definition at line 177 of file idf_parser.cpp.
References aoff, checkOwnership(), xoff, yoff, and zoff.
Referenced by IDF_EXPORTER::exportFootprint(), and IDF_EXPORTER::exportFootprintIdfModels().
| bool IDF3_COMP_OUTLINE_DATA::SetOutline | ( | IDF3_COMP_OUTLINE * | aOutline | ) |
Set the outline whose position is managed by this object.
| aOutline | is the outline for this component. |
Definition at line 209 of file idf_parser.cpp.
References checkOwnership(), and outline.
| void IDF3_COMP_OUTLINE_DATA::SetParent | ( | IDF3_COMPONENT * | aParent | ) |
Set the parent object.
| aParent | is the owning IDF3_COMPONENT object. |
Definition at line 203 of file idf_parser.cpp.
References IDF3_COMPONENT, and parent.
|
private |
Write RECORD 2 and RECORD 3 of a PLACEMENT section as per IDFv3 specification.
| aBoardFile | is the open IDFv3 file. |
| aXpos | is the X location of the parent component. |
| aYpos | is the Y location of the parent component. |
| aAngle | is the rotation of the parent component. |
| aRefDes | is the reference designator of the parent component. |
| aPlacement | is the IDF Placement Status of the parent component. |
| aSide | is the IDF Layer Designator (TOP or BOTTOM). |
Definition at line 713 of file idf_parser.cpp.
References aoff, IDF3::CompareToken(), ERROR_IDF, IDF3::GetLayerString(), IDF_THOU_TO_MM, IDF3::LYR_BOTTOM, IDF3::LYR_TOP, outline, parent, IDF3::PS_INVALID, IDF3::PS_MCAD, IDF3::PS_PLACED, IDF3::PS_UNPLACED, IDF3::UNIT_MM, IDF3::WriteLayersText(), xoff, yoff, and zoff.
|
friend |
Definition at line 183 of file idf_parser.h.
References IDF3_BOARD.
Referenced by IDF3_BOARD, and readPlaceData().
|
friend |
Definition at line 184 of file idf_parser.h.
References IDF3_COMPONENT.
Referenced by IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMPONENT, readPlaceData(), and SetParent().
|
private |
Definition at line 189 of file idf_parser.h.
Referenced by GetOffsets(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), readPlaceData(), SetOffsets(), and writePlaceData().
|
private |
Definition at line 190 of file idf_parser.h.
Referenced by checkOwnership(), and GetError().
|
private |
Definition at line 192 of file idf_parser.h.
Referenced by GetOutline(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), readPlaceData(), SetOutline(), writePlaceData(), and ~IDF3_COMP_OUTLINE_DATA().
|
private |
Definition at line 193 of file idf_parser.h.
Referenced by checkOwnership(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), readPlaceData(), SetParent(), and writePlaceData().
|
private |
Definition at line 186 of file idf_parser.h.
Referenced by GetOffsets(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), readPlaceData(), SetOffsets(), and writePlaceData().
|
private |
Definition at line 187 of file idf_parser.h.
Referenced by GetOffsets(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), readPlaceData(), SetOffsets(), and writePlaceData().
|
private |
Definition at line 188 of file idf_parser.h.
Referenced by GetOffsets(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), IDF3_COMP_OUTLINE_DATA(), readPlaceData(), SetOffsets(), and writePlaceData().