KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::EVALUE Struct Reference

Represents a floating value in E notation. More...

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::EVALUE:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

void Parse (XNODE *aNode, PARSER_CONTEXT *aContext) override
 
double GetDouble ()
 

Public Attributes

long Base = 0
 
long Exponent = 0
 

Detailed Description

Represents a floating value in E notation.

Definition at line 389 of file cadstar_archive_parser.h.

Member Function Documentation

◆ GetDouble()

double CADSTAR_ARCHIVE_PARSER::EVALUE::GetDouble ( )

◆ Parse()

void CADSTAR_ARCHIVE_PARSER::EVALUE::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 391 of file cadstar_archive_parser.cpp.

392{
393 wxASSERT( aNode->GetName() == wxT( "E" ) );
394
395 if( ( !GetXmlAttributeIDString( aNode, 0 ).ToLong( &Base ) )
396 || ( !GetXmlAttributeIDString( aNode, 1 ).ToLong( &Exponent ) ) )
397 {
398 THROW_PARSING_IO_ERROR( wxT( "Base and Exponent" ),
400 "%s->%s", aNode->GetParent()->GetName(), aNode->GetParent()->GetName() ) );
401 }
402}
#define THROW_PARSING_IO_ERROR(param, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
XNODE * GetParent() const
Definition: xnode.h:72
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References Format(), XNODE::GetParent(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), and THROW_PARSING_IO_ERROR.

Referenced by CADSTAR_ARCHIVE_PARSER::ParseChildEValue().

Member Data Documentation

◆ Base

long CADSTAR_ARCHIVE_PARSER::EVALUE::Base = 0

Definition at line 391 of file cadstar_archive_parser.h.

◆ Exponent

long CADSTAR_ARCHIVE_PARSER::EVALUE::Exponent = 0

Definition at line 392 of file cadstar_archive_parser.h.


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