RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
|
Represents an enumerated value, with named options. More...
#include <dumper.h>
Public Member Functions | |
ChoiceDisplay (std::map< offset_t, std::string > names, std::string default_name, bool missing_on_value, offset_t missing_value, std::shared_ptr< Display< offset_t > > secondary_display) | |
bool | IsMissing (std::tuple< offset_t > &values) override |
void | DisplayValue (Dumper &dump, std::tuple< offset_t > values) override |
![]() | |
virtual bool | IsMissing (std::tuple< Ts... > &values) |
Returns true if the specified value is such that it should not be displayed. | |
virtual void | DisplayValue (Dumper &dump, std::tuple< Ts... > values)=0 |
Prints the value through the Dumper, different types of fields can be displayed in different ways. | |
Static Public Member Functions | |
static std::shared_ptr< ChoiceDisplay > | Make (std::map< offset_t, std::string > names, std::string default_name="unknown", std::shared_ptr< Display< offset_t > > secondary_display=nullptr) |
static std::shared_ptr< ChoiceDisplay > | Make (std::map< offset_t, std::string > names, offset_t missing_value, std::string default_name="unknown", std::shared_ptr< Display< offset_t > > secondary_display=nullptr) |
static std::shared_ptr< ChoiceDisplay > | Make (std::map< offset_t, std::string > names, std::shared_ptr< Display< offset_t > > secondary_display) |
static std::shared_ptr< ChoiceDisplay > | Make (std::map< offset_t, std::string > names, offset_t missing_value, std::shared_ptr< Display< offset_t > > secondary_display) |
static std::shared_ptr< ChoiceDisplay > | Make (std::string on_true, std::string on_false) |
Creates a boolean choice. | |
static std::shared_ptr< ChoiceDisplay > | Make (std::string on_true) |
Creates a boolean choice that is either present with name or not present at all. | |
Public Attributes | |
std::map< offset_t, std::string > | names |
Maps values to names. | |
std::string | default_name |
Name for values not contained in names. | |
bool | missing_on_value |
If false, any value not listed in names is missing, otherwise only missing_value is missing. | |
offset_t | missing_value |
The single missing value, only used for missing_on_value true. | |
std::shared_ptr< Display< offset_t > > | secondary_display |
Alternative representation, appearing in parentheses after the value. | |
Represents an enumerated value, with named options.