Closes #11
This commit is contained in:
1 parent
0067cb4ddd
commit
f17ddb6aad
104 files changed
+1928
-889
No files matched your search
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @file dbc_parser.h
|
||||
* @brief
|
||||
*
|
||||
* Created: 2026-03-13
|
||||
* Author: Deeaitch (Dim. Himro)
|
||||
*
|
||||
* Licensed under the MIT License.
|
||||
* See LICENSE file in the project root for full license text.
|
||||
*/
|
||||
|
||||
#ifndef DBC_PARSER_H
|
||||
#define DBC_PARSER_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "dbc_database.h"
|
||||
|
||||
/**
|
||||
* @brief Minimal DBC parser.
|
||||
*
|
||||
* Supports:
|
||||
* - BO_
|
||||
* - SG_
|
||||
* - CM_ BO_
|
||||
* - CM_ SG_
|
||||
*
|
||||
* Ignores:
|
||||
* - attributes
|
||||
* - multiplexing
|
||||
* - value tables
|
||||
*/
|
||||
class DbcParser {
|
||||
public:
|
||||
/**
|
||||
* @brief Parse DBC file.
|
||||
* @param filePath Path to input file.
|
||||
* @return Parsed database.
|
||||
* @throws std::runtime_error on file or parse errors.
|
||||
* Line parse errors include the file path and one-based line number.
|
||||
*/
|
||||
DbcDatabase ParseFile(const std::string &filePath) const;
|
||||
|
||||
private:
|
||||
static std::string Trim(const std::string &text);
|
||||
};
|
||||
|
||||
#endif /* DBC_PARSER_H */
|
||||
Reference in new issue
Block a user