|
Ninja
|
A class used to record a list of explanation strings associated with a given 'item' pointer. More...
#include <explanations.h>
Public Member Functions | |
| void | LookupAndAppend (const void *item, std::vector< std::string > *out) |
| Lookup the explanations recorded for |item|, and append them to |*out|, if any. More... | |
| void | Record (const void *item, const char *fmt,...) |
| Record an explanation for |item| if this instance is enabled. More... | |
| void | RecordArgs (const void *item, const char *fmt, va_list args) |
| Same as Record(), but uses a va_list to pass formatting arguments. More... | |
Private Attributes | |
| std::unordered_map< const void *, std::vector< std::string > > | map_ |
A class used to record a list of explanation strings associated with a given 'item' pointer.
This is used to implement the -d explain feature.
Definition at line 27 of file explanations.h.
|
inline |
Lookup the explanations recorded for |item|, and append them to |*out|, if any.
Definition at line 46 of file explanations.h.
References map_.
Referenced by OptionalExplanations::LookupAndAppend(), StatusPrinter::PrintStatus(), and TEST().
|
inline |
Record an explanation for |item| if this instance is enabled.
Definition at line 30 of file explanations.h.
References RecordArgs().
Referenced by TEST().
|
inline |
Same as Record(), but uses a va_list to pass formatting arguments.
Definition at line 38 of file explanations.h.
References map_.
Referenced by Record(), OptionalExplanations::Record(), and OptionalExplanations::RecordArgs().
|
private |
Definition at line 56 of file explanations.h.
Referenced by LookupAndAppend(), and RecordArgs().