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 236 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 71 of file cadstar_archive_parser.cpp.

72{
73 wxASSERT( aNode->GetName() == wxT( "TIMESTAMP" ) );
74
75 if( !GetXmlAttributeIDString( aNode, 0 ).ToLong( &Year )
76 || !GetXmlAttributeIDString( aNode, 1 ).ToLong( &Month )
77 || !GetXmlAttributeIDString( aNode, 2 ).ToLong( &Day )
78 || !GetXmlAttributeIDString( aNode, 3 ).ToLong( &Hour )
79 || !GetXmlAttributeIDString( aNode, 4 ).ToLong( &Minute )
80 || !GetXmlAttributeIDString( aNode, 5 ).ToLong( &Second ) )
81 THROW_PARSING_IO_ERROR( wxT( "TIMESTAMP" ), wxString::Format( "HEADER" ) );
82}
#define THROW_PARSING_IO_ERROR(param, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
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(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), and THROW_PARSING_IO_ERROR.

Member Data Documentation

◆ Day

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Day

Definition at line 240 of file cadstar_archive_parser.h.

◆ Hour

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Hour

Definition at line 241 of file cadstar_archive_parser.h.

◆ Minute

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Minute

Definition at line 242 of file cadstar_archive_parser.h.

◆ Month

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Month

Definition at line 239 of file cadstar_archive_parser.h.

◆ Second

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Second

Definition at line 243 of file cadstar_archive_parser.h.

◆ Year

long CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Year

Definition at line 238 of file cadstar_archive_parser.h.


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