18#ifndef NFC_NDEF_RECORDPARSER_H_
19#define NFC_NDEF_RECORDPARSER_H_
23#include "nfc/ndef/Record.h"
73template<
typename ParserImplementation,
typename ParsingResult>
102 ParsingResult parsed_value;
103 if (
static_cast<ParserImplementation *
>(
this)->do_parse(record, parsed_value)) {
119 _delegate = delegate;
Handle that receives parsed values.
virtual void on_record_parsed(const ParsingResult &object_parsed, const RecordID &id)=0
Called when a record has been parsed and converted into a value_type.
virtual bool parse(const Record &record)
~GenericRecordParser()
Protected non virtual destructor.
GenericRecordParser()
Construct a record parser.
void set_delegate(Delegate *delegate)
Set the delegate that processes record parser.
RecordID id
ID of the record.
~RecordParserChain()
Destroy a parser chain.
RecordParserChain()
Construct a parser chain.
void set_next_parser(RecordParser *parser)
Add a parser at the end of the parser list.
bool parse(const Record &record)
Parse a record.
RecordParser()
Construct a record parser.
virtual bool parse(const Record &record)=0
Parse the record in input.
~RecordParser()
Protected non virtual destructor.