namespace std {
ostream &operator<<(ostream &o, const ::smf::wal::tx_get_request &r);
ostream &operator<<(ostream &o, const ::smf::wal::tx_get_reply &r);
ostream &operator<<(ostream &o, const ::smf::wal::tx_put_request &r);
ostream &operator<<(ostream &o, const ::smf::wal::tx_put_reply &r);
ostream &operator<<(ostream &o, const ::smf::wal::wal_header &h);
ostream &operator<<(ostream &o, const ::smf::wal_read_request &r);
ostream &operator<<(ostream &o, const ::smf::wal_read_reply &r);
ostream &operator<<(ostream &o, const ::smf::wal_write_request &r);
ostream &operator<<(ostream &o, const ::smf::wal_write_reply &r);
}
--
You received this message because you are subscribed to the Google Groups "FlatBuffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The current way of doing so is by calling GenerateText(). That however requires a Parser, i.e. you must parse the schema before, which may be inconvenient. If you look at registry.h, there's a nice helper class for this.Alternatively, we could use a bit of generated code to allow us to print a FlatBuffer without loading any schemas. I happen to be working on exactly that at the moment, and it should be out on github shortly.
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers...@googlegroups.com.
A crazy idea I had but did not find time to implement it yet is to generate a dot file (https://de.wikipedia.org/wiki/DOT_(GraphViz))This could be a great diagnostic tool, showing vTables, color coding validation errors. A node id is the absolute offset in the buffer this way it can graphically represent DAGs.For sure it could represent only buffer of certain size, I think it would be feasible to generate multiple diagrams files based on number of nodes.
So something like diagramms I used in my talks to explain the internals of FlatBuffers (https://cdn-images-1.medium.com/max/800/1*G4tyetn9Nhd5rV-BKcRIKg.png)Well with a little bit more information like the Table name, struct name field names etc...
--
You received this message because you are subscribed to a topic in the Google Groups "FlatBuffers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/flatbuffers/nCutIdI3a4U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to flatbuffers+unsubscribe@googlegroups.com.
any progress on the pretty print, only mentioned it because you said you were working on it.
did i miss a test for this ? INFO 2017-09-27 10:26:09,047 [shard 0] smf - chain_replication_service.cc:62] Chain put req: { chain: [ 2130706433 ], chain_index: 1, put: { topic: "dummy_topic", data: [ { partition: 520, txs: [ { op: full, type: kv, epoch_ms: 246606866, kv: { key: [ 88, 125, 41, 113, 80, 57, 79, 122, 117, 68, 88, 73, 91, 70, 49, 78, 56, 81, 72, 41, 45, 50, 42, 36, 75, 114, 115, 64, 41, 112, 61, 106, 109, 126, 112, 52, 94, 97, 57, 125, 71, 40, 77, 43, 80, 103, 126, 105, 65, 109, 77, 38, 113, 119, 65, 85, 75, 80, 122, 57, 90, 55, 40, 84, 76, 36, 124, 33, 41, 53, 122, 51, 110, 103, 78, 70, 100, 113, 52, 33, 113, 49, 111, 71, 87, 66, 74, 76, 119, 58, 61, 53, 60, 65, 46, 39, 45, 123, 93, 66, 112, 67, 95, 115, 108, 70, 102, 56, 122, 77, 96, 121, 121, 120, 46, 75, 126, 61, 65, 38, 125, 95, 60, 76, 104, 70, 93, 48, 68, 84, 66, 89, 98, 37, 95, 125, 106, 52, 101, 37, 51, 39, 43, 117, 76, 46, 110, 88, 72, 74, 72, 59, 123, 101, 50, 68, 121, 61, 102, 96, 67, 122, 113, 100, 97, 60, 116, 116, 55, 62, 41, 96, 43, 50, 106, 38, 118, 80, 46, 49, 62, 90, 34, 107, 47, 42, 50, 116 ], value: [ 97, 114, 38, 35, 86, 40, 85, 117, 100, 100, 118, 33, 124, 87, 93, 124, 83, 58, 42, 108, 38, 72, 125, 57, 102, 65, 54, 72, 51, 95, 76, 46, 45, 100, 43, 69, 103, 56, 76, 79, 97, 87, 88, 106, 114, 47, 102, 55, 103, 70, 57, 45, 114, 123, 114, 60, 49, 52, 62 ] } } ] } ] } }
INFO 2017-09-27 10:26:09,047 [shard 0] smf - chain_replication_service.cc:62] Chain put req: { chain: [ 2130706433 ], chain_index: 1, put: { topic: "dummy_topic", data: [ { partition: 520, txs: [ { op: full, type: kv, epoch_ms: 246606866, kv: { key: [ 88, 125, 41, 113, 80, 57, 79, 122, 117, 68, 88, 73, 91, 70, 49, 78, 56, 81, 72, 41, 45, 50, 42, 36, 75, 114, 115, 64, 41, 112, 61, 106, 109, 126, 112, 52, 94, 97, 57, 125, 71, 40, 77, 43, 80, 103, 126, 105, 65, 109, 77, 38, 113, 119, 65, 85, 75, 80, 122, 57, 90, 55, 40, 84, 76, 36, 124, 33, 41, 53, 122, 51, 110, 103, 78, 70, 100, 113, 52, 33, 113, 49, 111, 71, 87, 66, 74, 76, 119, 58, 61, 53, 60, 65, 46, 39, 45, 123, 93, 66, 112, 67, 95, 115, 108, 70, 102, 56, 122, 77, 96, 121, 121, 120, 46, 75, 126, 61, 65, 38, 125, 95, 60, 76, 104, 70, 93, 48, 68, 84, 66, 89, 98, 37, 95, 125, 106, 52, 101, 37, 51, 39, 43, 117, 76, 46, 110, 88, 72, 74, 72, 59, 123, 101, 50, 68, 121, 61, 102, 96, 67, 122, 113, 100, 97, 60, 116, 116, 55, 62, 41, 96, 43, 50, 106, 38, 118, 80, 46, 49, 62, 90, 34, 107, 47, 42, 50, 116 ], value: [ 97, 114, 38, 35, 86, 40, 85, 117, 100, 100, 118, 33, 124, 87, 93, 124, 83, 58, 42, 108, 38, 72, 125, 57, 102, 65, 54, 72, 51, 95, 76, 46, 45, 100, 43, 69, 103, 56, 76, 79, 97, 87, 88, 106, 114, 47, 102, 55, 103, 70, 57, 45, 114, 123, 114, 60, 49, 52, 62 ] } } ] } ] } }
inline std::string FlatBufferToString(const uint8_t *buffer, | |
const TypeTable *type_table) { | |
ToStringVisitor tostring_visitor; | |
IterateFlatBuffer(buffer, type_table, &tostring_visitor); | |
return tostring_visitor.s; | |
} | |