ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RegisterNames Class Reference

Prints a register name even when no dictionary is available or when the dictionary doesn't contain an entry for the specified descriptor. More...

#include <Registers.h>

Collaboration diagram for RegisterNames:

Public Member Functions

 RegisterNames (const RegisterDictionary *dict=NULL)
 Constructor. More...
 
std::string operator() (const RegisterDescriptor &, const RegisterDictionary *dict=NULL) const
 Obtain a name for a register descriptor. More...
 

Public Attributes

const RegisterDictionarydflt_dict
 Dictionary supplied to the constructor. More...
 
std::string prefix
 The leading part of a register name. More...
 
std::string suffix
 String to print at the very end of the generated name. More...
 
int show_offset
 0=>never show offset; positive=>always show; negative=>show only when non-zero More...
 
std::string offset_prefix
 String printed before the offset when the offset is shown. More...
 
std::string offset_suffix
 String printed after the offset when the offset is shown. More...
 
bool show_size
 Whether to show the size in bits of the register. More...
 
std::string size_prefix
 String printed prior to the size when the size is printed. More...
 
std::string size_suffix
 String printed after the size when the size is printed. More...
 

Detailed Description

Prints a register name even when no dictionary is available or when the dictionary doesn't contain an entry for the specified descriptor.

Definition at line 210 of file Registers.h.

Constructor & Destructor Documentation

RegisterNames::RegisterNames ( const RegisterDictionary dict = NULL)
inlineexplicit

Constructor.

A RegisterDictionary can be supplied to the constructor, or to each operator() call.

Definition at line 213 of file Registers.h.

Member Function Documentation

std::string RegisterNames::operator() ( const RegisterDescriptor rdesc,
const RegisterDictionary dict = NULL 
) const

Obtain a name for a register descriptor.

If a dictionary is supplied, then it will be used instead of the dictionary that was supplied to the constructor.

Definition at line 53 of file Registers.C.

References dflt_dict, RegisterDescriptor::get_major(), RegisterDescriptor::get_minor(), RegisterDescriptor::get_nbits(), RegisterDescriptor::get_offset(), RegisterDictionary::lookup(), name, offset_prefix, offset_suffix, prefix, show_offset, show_size, size_prefix, size_suffix, and suffix.

Member Data Documentation

const RegisterDictionary* RegisterNames::dflt_dict

Dictionary supplied to the constructor.

Definition at line 220 of file Registers.h.

Referenced by operator()().

std::string RegisterNames::prefix

The leading part of a register name.

Definition at line 221 of file Registers.h.

Referenced by operator()().

std::string RegisterNames::suffix

String to print at the very end of the generated name.

Definition at line 222 of file Registers.h.

Referenced by operator()().

int RegisterNames::show_offset

0=>never show offset; positive=>always show; negative=>show only when non-zero

Definition at line 223 of file Registers.h.

Referenced by operator()().

std::string RegisterNames::offset_prefix

String printed before the offset when the offset is shown.

Definition at line 224 of file Registers.h.

Referenced by operator()().

std::string RegisterNames::offset_suffix

String printed after the offset when the offset is shown.

Definition at line 225 of file Registers.h.

Referenced by operator()().

bool RegisterNames::show_size

Whether to show the size in bits of the register.

Definition at line 226 of file Registers.h.

Referenced by operator()().

std::string RegisterNames::size_prefix

String printed prior to the size when the size is printed.

Definition at line 227 of file Registers.h.

Referenced by operator()().

std::string RegisterNames::size_suffix

String printed after the size when the size is printed.

Definition at line 228 of file Registers.h.

Referenced by operator()().


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