35 LL_WALKER fieldWalker{ aFieldsPtr, aEndKey, aDb };
39 if( block->GetBlockType() != 0x03 )
44 if( field.m_Hdr1 != aFieldCode )
47 switch( field.m_SubType )
51 const std::string* str = std::get_if<std::string>( &field.m_Substruct );
54 return wxString( *str );
60 const uint32_t* val = std::get_if<uint32_t>( &field.m_Substruct );
82 if( uint32_t* val = std::get_if<uint32_t>( &
result.value() ) )
83 return static_cast<int>( *val );
std::optional< FIELD_VALUE > GetFirstFieldOfType(const BRD_DB &aDb, uint32_t aFieldsPtr, uint32_t aEndKey, uint16_t aFieldCode)
Look up the first 0x03 FIELD value of a given type in a linked field chain.
std::optional< int > GetFirstFieldOfTypeInt(const BRD_DB &aDb, uint32_t aFieldsPtr, uint32_t aEndKey, uint16_t aFieldCode)
Convenience wrapper around GetFirstFieldOfType() for integer-valued fields.
wxString result
Test unit parsing edge cases and error handling.