Line data Source code
1 : #pragma once
2 : #include <string>
3 : #include <map>
4 : #include <optional>
5 : #include "../../odbdesign_export.h"
6 :
7 :
8 : namespace Odb::Lib::FileModel::Design
9 : {
10 : class ODBDESIGN_EXPORT AttributeLookupTable
11 : {
12 : public:
13 :
14 : const std::map<std::string, std::string>& GetAttributeLookupTable() const;
15 :
16 : // Parses the trailing "<attributes>;ID=<uid>" field of an ODB++ record. The third
17 : // section is the record's unique identifier, not an attribute: it is returned via
18 : // parsedId and never inserted into the attribute map, so the UID has exactly one
19 : // home on the wire (the typed `id` field of the owning record).
20 : bool ParseAttributeLookupTable(const std::string& attributeLookupTableString, std::optional<unsigned int>& parsedId);
21 :
22 : protected:
23 25875315 : AttributeLookupTable() = default; // abtract class
24 :
25 : std::map<std::string, std::string> m_attributeLookupTable;
26 :
27 : };
28 : }
|