|
virtual void | print (const uint8_t *buffer, std::ostream &os) const override |
|
virtual | ~MetadataPrinter ()=default |
|
Definition at line 26 of file MetadataPrinter.cpp.
◆ print()
virtual void circledump::SourceTablePrinter::print |
( |
const uint8_t * |
buffer, |
|
|
std::ostream & |
os |
|
) |
| const |
|
inlineoverridevirtual |
source table consists of following parts
- [ entry_number : uint32_t ]
- [ id : uint32_t ][ length : uint32_t ][ data : 'length' Bytes ] * entry_number
Implements circledump::MetadataPrinter.
Definition at line 34 of file MetadataPrinter.cpp.
35 {
36 if (buffer)
37 {
38 os << " [node_id : node_name]" << std::endl;
39 auto cur = buffer;
40
41 const uint32_t num = *reinterpret_cast<const uint32_t *>(cur);
42 cur += sizeof(uint32_t);
44 {
45
46 const uint32_t node_id = *reinterpret_cast<const uint32_t *>(cur);
47 cur += sizeof(uint32_t);
48
49 const uint32_t len = *reinterpret_cast<const uint32_t *>(cur);
50 cur += sizeof(uint32_t);
51 assert(len != 0);
52
53
54 std::string node_name = std::string(cur, cur + len - 1);
55 cur += len;
56
57
58 os << " [" << node_id << " : " << node_name << "]" << std::endl;
59 }
60 }
61 }
int entry(const int argc, char **argv)
References entry().
The documentation for this class was generated from the following file: