RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Dumper::ChoiceDisplay Class Reference

Represents an enumerated value, with named options. More...

#include <dumper.h>

Inheritance diagram for Dumper::ChoiceDisplay:
Dumper::Display< offset_t >

Public Member Functions

 ChoiceDisplay (std::map< offset_t, std::string > names, std::string default_name, bool missing_on_value, offset_t missing_value)
 
bool IsMissing (std::tuple< offset_t > &values) override
 
void DisplayValue (Dumper &dump, std::tuple< offset_t > values) override
 
- Public Member Functions inherited from Dumper::Display< offset_t >
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< ChoiceDisplayMake (std::map< offset_t, std::string > names, std::string default_name="unknown")
 
static std::shared_ptr< ChoiceDisplayMake (std::map< offset_t, std::string > names, offset_t missing_value, std::string default_name="unknown")
 
static std::shared_ptr< ChoiceDisplayMake (std::string on_true, std::string on_false)
 Creates a boolean choice.
 
static std::shared_ptr< ChoiceDisplayMake (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.
 

Detailed Description

Represents an enumerated value, with named options.


The documentation for this class was generated from the following files: