Tracer  v0.0.1
A platform independant stack trace generator
tracer::PrinterContainer Class Referencefinal

A container for printers (like std::unique_ptr) More...

#include <PrinterContainer.hpp>

Public Member Functions

 PrinterContainer (AbstractPrinter *p)
 Constructor sets the printer. More...
 
 PrinterContainer (const PrinterContainer &)=delete
 
 PrinterContainer (PrinterContainer &&moveFrom)
 Move constructor. More...
 
PrinterContaineroperator= (const PrinterContainer &)=delete
 
PrinterContaineroperator= (PrinterContainer &&)
 Move assignment operator. More...
 
AbstractPrinterget ()
 Returns the printer. More...
 
AbstractPrinteroperator() ()
 Returns the printer. More...
 
AbstractPrinteroperator-> ()
 Access the printer. More...
 

Static Public Member Functions

static PrinterContainer fancy ()
 Returns a container with a tracer::FancyPrinter object. More...
 
static PrinterContainer file ()
 Returns a container with a tracer::FilePrinter object. More...
 
static PrinterContainer system ()
 Returns a container with a tracer::SystemInfoPrinter object. More...
 
static PrinterContainer plain ()
 Returns a container with a tracer::DefaultPrinter object. More...
 

Detailed Description

A container for printers (like std::unique_ptr)

Automatically deletes the printer in the destructor

Definition at line 40 of file PrinterContainer.hpp.

Constructor & Destructor Documentation

◆ PrinterContainer() [1/2]

PrinterContainer::PrinterContainer ( AbstractPrinter p)

Constructor sets the printer.

Parameters
pThe printer to store

Definition at line 39 of file PrinterContainer.cpp.

◆ PrinterContainer() [2/2]

PrinterContainer::PrinterContainer ( PrinterContainer &&  moveFrom)

Move constructor.

Parameters
moveFromobject to move from

Definition at line 49 of file PrinterContainer.cpp.

Member Function Documentation

◆ fancy()

PrinterContainer PrinterContainer::fancy ( )
static

Returns a container with a tracer::FancyPrinter object.

Returns
Returns the constructed container

Definition at line 70 of file PrinterContainer.cpp.

+ Here is the caller graph for this function:

◆ file()

PrinterContainer PrinterContainer::file ( )
static

Returns a container with a tracer::FilePrinter object.

Returns
Returns the constructed container

Definition at line 76 of file PrinterContainer.cpp.

+ Here is the caller graph for this function:

◆ get()

AbstractPrinter * PrinterContainer::get ( )

Returns the printer.

Returns
the stored printer

Definition at line 90 of file PrinterContainer.cpp.

+ Here is the caller graph for this function:

◆ operator()()

AbstractPrinter * PrinterContainer::operator() ( )

Returns the printer.

Returns
the stored printer

Definition at line 91 of file PrinterContainer.cpp.

◆ operator->()

AbstractPrinter * PrinterContainer::operator-> ( )

Access the printer.

Returns
the stored printer

Definition at line 92 of file PrinterContainer.cpp.

◆ operator=()

PrinterContainer & PrinterContainer::operator= ( PrinterContainer &&  moveFrom)

Move assignment operator.

Parameters
moveFromObject to move from

Definition at line 58 of file PrinterContainer.cpp.

◆ plain()

PrinterContainer PrinterContainer::plain ( )
static

Returns a container with a tracer::DefaultPrinter object.

Returns
Returns the constructed container

Definition at line 88 of file PrinterContainer.cpp.

+ Here is the caller graph for this function:

◆ system()

PrinterContainer PrinterContainer::system ( )
static

Returns a container with a tracer::SystemInfoPrinter object.

Returns
Returns the constructed container

Definition at line 82 of file PrinterContainer.cpp.

+ Here is the caller graph for this function:

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