hex_formatter

class hex_formatter #(type T =  int) extends formatter#( T )

singleton Provides a strategy to convert an object of type T to a string using a hexadecimal format.

Parameter

Toptional The type of an object to be converted.  The default is int.
Summary
hex_formattersingleton Provides a strategy to convert an object of type T to a string using a hexadecimal format.
Types
this_typeThe shorthand of hex_formatter#(T).
Functions
newprotected Creates a new formatter.
get_instancestatic Returns the singleton instance of this formatter.
to_stringvirtual Returns a string representation of the given object of type T using the %h format string.

Types

this_type

typedef hex_formatter#(T) this_type

The shorthand of hex_formatter#(T).

Functions

new

protected function new()

protected Creates a new formatter.

get_instance

static function this_type get_instance()

static Returns the singleton instance of this formatter.

Returns

The singleton instance.

to_string

virtual function string to_string(o)

virtual Returns a string representation of the given object of type T using the %h format string.

Argument

oAn object to convert to a string.

Returns

A string representing o.

class hex_formatter #(type T =  int) extends formatter#( T )
singleton Provides a strategy to convert an object of type T to a string using a hexadecimal format.
typedef hex_formatter#(T) this_type
The shorthand of hex_formatter#(T).
protected function new()
protected Creates a new formatter.
static function this_type get_instance()
static Returns the singleton instance of this formatter.
virtual function string to_string(o)
virtual Returns a string representation of the given object of type T using the %h format string.