GDB (API)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Classes | Public Member Functions
gdb.printing.RegexpCollectionPrettyPrinter Class Reference
Inheritance diagram for gdb.printing.RegexpCollectionPrettyPrinter:
gdb.printing.PrettyPrinter gdb.printing.PrettyPrinter

List of all members.

Classes

class  RegexpSubprinter

Public Member Functions

def __init__
def add_printer
def __call__
def __init__
def add_printer
def __call__

Detailed Description

Class for implementing a collection of regular-expression based pretty-printers.

Intended usage:

pretty_printer = RegexpCollectionPrettyPrinter("my_library")
pretty_printer.add_printer("myclass1", "^myclass1$", MyClass1Printer)
...
pretty_printer.add_printer("myclassN", "^myclassN$", MyClassNPrinter)
register_pretty_printer(obj, pretty_printer)

Definition at line 152 of file printing.py.


Constructor & Destructor Documentation

Definition at line 171 of file printing.py.

Definition at line 171 of file printing.py.


Member Function Documentation

Lookup the pretty-printer for the provided value.

Reimplemented from gdb.printing.PrettyPrinter.

Definition at line 197 of file printing.py.

Lookup the pretty-printer for the provided value.

Reimplemented from gdb.printing.PrettyPrinter.

Definition at line 197 of file printing.py.

def gdb.printing.RegexpCollectionPrettyPrinter.add_printer (   self,
  name,
  regexp,
  gen_printer 
)
Add a printer to the list.

The printer is added to the end of the list.

Arguments:
    name: The name of the subprinter.
    regexp: The regular expression, as a string.
    gen_printer: A function/method that given a value returns an
object to pretty-print it.

Returns:
    Nothing.

Definition at line 174 of file printing.py.

def gdb.printing.RegexpCollectionPrettyPrinter.add_printer (   self,
  name,
  regexp,
  gen_printer 
)
Add a printer to the list.

The printer is added to the end of the list.

Arguments:
    name: The name of the subprinter.
    regexp: The regular expression, as a string.
    gen_printer: A function/method that given a value returns an
object to pretty-print it.

Returns:
    Nothing.

Definition at line 174 of file printing.py.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines