KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::TIMESTAMP Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::TIMESTAMP:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

long Year
 
long Month
 
long Day
 
long Hour
 
long Minute
 
long Second
 

Detailed Description

Definition at line 217 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 64 of file cadstar_archive_parser.cpp.

65 {
66  wxASSERT( aNode->GetName() == wxT( "TIMESTAMP" ) );
67 
68  if( !GetXmlAttributeIDString( aNode, 0 ).ToLong( &Year )
69  || !GetXmlAttributeIDString( aNode, 1 ).ToLong( &Month )
70  || !GetXmlAttributeIDString( aNode, 2 ).ToLong( &Day )
71  || !GetXmlAttributeIDString( aNode, 3 ).ToLong( &Hour )
72  || !GetXmlAttributeIDString( aNode, 4 ).ToLong( &Minute )
73  || !GetXmlAttributeIDString( aNode, 5 ).ToLong( &Second ) )
74  THROW_PARSING_IO_ERROR( wxT( "TIMESTAMP" ), wxString::Format( "HEADER" ) );
75 }
#define THROW_PARSING_IO_ERROR(param, location)
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
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

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

Member Data Documentation

◆ Day

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Day

Definition at line 221 of file cadstar_archive_parser.h.

◆ Hour

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Hour

Definition at line 222 of file cadstar_archive_parser.h.

◆ Minute

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Minute

Definition at line 223 of file cadstar_archive_parser.h.

◆ Month

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Month

Definition at line 220 of file cadstar_archive_parser.h.

◆ Second

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Second

Definition at line 224 of file cadstar_archive_parser.h.

◆ Year

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Year

Definition at line 219 of file cadstar_archive_parser.h.


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