CIRCT
20.0.0git
|
Note: Callable class must implement a callable with signature: void (Data) More...
#include <PrettyPrinterHelpers.h>
Public Member Functions | |
PrintEventAndStorageListener (CallableTy &c) | |
void | print () override |
PrettyPrinter::Listener::print – indicates all the preceding tokens on the stream have been printed. More... | |
CallbackToken | getToken (DataTy obj) |
Get a token with the obj data. More... | |
Public Member Functions inherited from circt::pretty::TokenStringSaver | |
TokenStringSaver () | |
StringRef | save (StringRef str) |
Add string, save in storage. More... | |
void | clear () override |
PrettyPrinter::Listener::clear – indicates no external refs. More... | |
Public Member Functions inherited from circt::pretty::PrettyPrinter::Listener | |
virtual | ~Listener () |
Destructor, anchor. More... | |
Private Attributes | |
std::queue< DataTy > | dataQ |
List of all the unique data associated with each callback token. More... | |
CallableTy & | callable |
The storage for the callback, as a function object. More... | |
Note: Callable class must implement a callable with signature: void (Data)
Definition at line 173 of file PrettyPrinterHelpers.h.
|
inline |
Definition at line 184 of file PrettyPrinterHelpers.h.
|
inline |
Get a token with the obj data.
Definition at line 194 of file PrettyPrinterHelpers.h.
References circt::pretty::PrintEventAndStorageListener< CallableTy, DataTy >::dataQ.
Referenced by circt::pretty::TokenStreamWithCallback< CallableType, DataType, PPTy >::addCallback().
|
inlineoverridevirtual |
PrettyPrinter::Listener::print – indicates all the preceding tokens on the stream have been printed.
This is invoked when the CallbackToken is printed.
Reimplemented from circt::pretty::PrettyPrinter::Listener.
Definition at line 189 of file PrettyPrinterHelpers.h.
References circt::pretty::PrintEventAndStorageListener< CallableTy, DataTy >::callable, and circt::pretty::PrintEventAndStorageListener< CallableTy, DataTy >::dataQ.
|
private |
The storage for the callback, as a function object.
Definition at line 181 of file PrettyPrinterHelpers.h.
Referenced by circt::pretty::PrintEventAndStorageListener< CallableTy, DataTy >::print().
|
private |
List of all the unique data associated with each callback token.
The fact that tokens on a stream can never be printed out of order, ensures that CallbackTokens are always added and invoked in FIFO order, hence no need to record an index into the Data list.
Definition at line 179 of file PrettyPrinterHelpers.h.
Referenced by circt::pretty::PrintEventAndStorageListener< CallableTy, DataTy >::getToken(), and circt::pretty::PrintEventAndStorageListener< CallableTy, DataTy >::print().