DBC Framework
DBC parsing and CAN signal decoding framework
Loading...
Searching...
No Matches
DbcStatementDispatcher Class Reference

#include <dbc_statement_handler.h>

Public Member Functions

 DbcStatementDispatcher ()
 Register supported statement handlers through TypeFactory.
 
template<class Handler >
void RegisterType (const std::string &keyword)
 Register or replace a handler and create its reusable instance.
 
bool Dispatch (const std::string &line, DbcParseContext &context) const
 

Detailed Description

Exact-key dispatch to handlers created once per registration via TypeFactory.

Definition at line 130 of file dbc_statement_handler.h.

Constructor & Destructor Documentation

◆ DbcStatementDispatcher()

DbcStatementDispatcher::DbcStatementDispatcher ( )

Register supported statement handlers through TypeFactory.

Definition at line 370 of file dbc_statement_handler.cpp.

Member Function Documentation

◆ RegisterType()

template<class Handler >
void DbcStatementDispatcher::RegisterType ( const std::string &  keyword)
inline

Register or replace a handler and create its reusable instance.

Definition at line 137 of file dbc_statement_handler.h.

References TypeFactory< ClassId, BaseClass, Args >::create(), and TypeFactory< ClassId, BaseClass, Args >::registerType().

◆ Dispatch()

bool DbcStatementDispatcher::Dispatch ( const std::string &  line,
DbcParseContext &  context 
) const

Returns false for an unregistered keyword; input must be trimmed.

Definition at line 390 of file dbc_statement_handler.cpp.

Referenced by DbcParser::ParseFileWithDiagnostics().


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