Skip to content

Commit 2c09954

Browse files
committed
Add documentation to recording-symbol-table
No functional changes
1 parent c342cbb commit 2c09954

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/util/recording_symbol_table.h

+17
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,23 @@
1414

1515
/// \brief A symbol table that records which entries have been updated/removed
1616
/// \ingroup gr_symbol_table
17+
/// A caller can pass a `recording_symbol_tablet` into a callee that is
18+
/// expected to mutate it somehow, then after it has run inspect the recording
19+
/// table's journal to determine what has changed more cheaply than examining
20+
/// every symbol.
21+
///
22+
/// Example of usage:
23+
/// ```
24+
/// concrete_symbol_tablet actual_table;
25+
/// init_table(actual_table);
26+
///
27+
/// recording_symbol_tablet journal(actual_table); // Wraps actual_table
28+
/// alter_table(journal);
29+
30+
/// for(const auto &added : journal.added())
31+
/// {
32+
/// printf("%s was added\n", added.name);
33+
/// }
1734
class recording_symbol_tablet:public symbol_tablet
1835
{
1936
public:

0 commit comments

Comments
 (0)