class Gambit::Printers::asciiPrinter

[No description available]

Inherits from Gambit::Printers::BasePrinter, Gambit::Printers::BaseBasePrinter

Public Functions

Name
virtual voidinitialise(const std::vector< int > & )
Initialisation function.
virtual voidreset(bool force =false)
Delete contents of output file (to be replaced/updated) and erase everything in the buffer.
virtual voidfinalise(bool abnormal =false)
Do final buffer dumps.
virtual voidflush()
virtual Optionsresume_reader_options()
virtual void_print_metadata(map_str_str metadata)
template <typename T >
void
_print(T const & , const std::string & label, const int vertexID, const uint, const ulong)
Print functions.
template <typename T >
void
_print(T const & in, const std::string & label, const uint rank, const ulong pointID)
Print functions.
template <class T >
void
template_print(T const & value, const std::string & label, const int IDcode, const uint, const ulong)
Helper print functions.
template <class T >
void
template_print_vec(std::vector< T > const & value, const std::string & label, const int IDcode, const uint, const ulong)
Template for print functions of vectors of “simple” types.
asciiPrinter(const Options & options, BasePrinter *const primary =NULL)
TODO: proper gambit error.
voidcommon_constructor(const Options & options)
Tasks common to the various constructors.
~asciiPrinter()
Destructor.
voiderase_buffer()
Asciiprinter-specific functions.
voidendline()
voidaddtobuffer(const std::vector< double > & functor_data, const std::vector< std::string > & functor_labels, const int vID, const int rank, const int pointID)
voiddump_buffer(bool force =false)
std::stringget_output_filename()
intget_bufferlength()

Additional inherited members

Public Functions inherited from Gambit::Printers::BasePrinter

Name
BasePrinter()
BasePrinter(BasePrinter *const primary, bool is_aux_IN)
virtual~BasePrinter()
Destructor.
voidset_as_aux()
Set this as an auxilliary printer.
virtual voidauxilliary_init()
BasePrinter *get_primary_printer()
boolis_auxilliary_printer()
template <typename T >
void
print(T const & in, const std::string & label, const int vertexID, const uint rank, const ulong pointID)
template <typename T >
void
print(T const & in, const std::string & label, const uint rank, const ulong pointID)

Public Functions inherited from Gambit::Printers::BaseBasePrinter

Name
BaseBasePrinter()
virtual~BaseBasePrinter()
intgetRank()
Retrieve/Set MPI rank (setting is useful for e.g. the postprocessor to re-print points from other ranks)
voidsetRank(int r)
bool &get_printUnitcube()
voidset_printUnitcube(const bool & rflag)
std::set< std::string >getPrintList()
voidsetPrintList(const std::set< std::string > & in)
voidaddToPrintList(const std::string & in)
boolget_resume()
voidset_resume(bool rflag)
voiddisable(int n =-1)
voidenable()
template <typename T >
void
print(T const & in, const std::string & label, const int vertexID, const uint rank, const ulong pointID)
template <typename T >
void
print(T const & in, const std::string & label, const uint rank, const ulong pointID)
voidprint_metadata(map_str_str datasets)

Protected Attributes inherited from Gambit::Printers::BaseBasePrinter

Name
boolprinter_enabled
Flag to check if print functions are enabled or disabled.
intprinter_cooldown
Counter for printer cooldown. If non-zero printer can be disabled for a fixed number of print calls.

Public Functions Documentation

function initialise

virtual void initialise(
    const std::vector< int > & 
)

Initialisation function.

Reimplements: Gambit::Printers::BasePrinter::initialise

Virtual function overloads:

function reset

virtual void reset(
    bool force =false
)

Delete contents of output file (to be replaced/updated) and erase everything in the buffer.

Reimplements: Gambit::Printers::BaseBasePrinter::reset

function finalise

virtual void finalise(
    bool abnormal =false
)

Do final buffer dumps.

Reimplements: Gambit::Printers::BaseBasePrinter::finalise

function flush

virtual void flush()

Reimplements: Gambit::Printers::BasePrinter::flush

Signal printer to flush data in buffers to disk Printers should do this automatically as needed, but this is useful if a scanner is printing a bunch of data as a batch, to make sure it is all on disk after the batch is done.

function resume_reader_options

virtual Options resume_reader_options()

Reimplements: Gambit::Printers::BasePrinter::resume_reader_options

function _print_metadata

virtual void _print_metadata(
    map_str_str metadata
)

Reimplements: Gambit::Printers::BaseBasePrinter::_print_metadata

function _print

template <typename T >
inline void _print(
    T const & ,
    const std::string & label,
    const int vertexID,
    const uint,
    const ulong
)

Print functions.

function _print

template <typename T >
inline void _print(
    T const & in,
    const std::string & label,
    const uint rank,
    const ulong pointID
)

Print functions.

function template_print

template <class T >
void template_print(
    T const & value,
    const std::string & label,
    const int IDcode,
    const uint,
    const ulong
)

Helper print functions.

Template for print functions of “simple” types.

PRINT FUNCTIONS Need to define one of these for every type we want to print! Could use macros again to generate identical print functions for all types that have a « operator already defined.

function template_print_vec

template <class T >
void template_print_vec(
    std::vector< T > const & value,
    const std::string & label,
    const int IDcode,
    const uint,
    const ulong
)

Template for print functions of vectors of “simple” types.

function asciiPrinter

asciiPrinter(
    const Options & options,
    BasePrinter *const primary =NULL
)

TODO: proper gambit error.

Constructor (for construction via inifile options)

function common_constructor

void common_constructor(
    const Options & options
)

Tasks common to the various constructors.

function ~asciiPrinter

~asciiPrinter()

Destructor.

function erase_buffer

void erase_buffer()

Asciiprinter-specific functions.

Clear buffer.

Ask the printer for the highest ID number known for a given rank process (needed for resuming, so the scanner can resume assigning point ID from this value. TODO: This does not work yet! Needed for resuming, which is not yet implemented in the asciiprinter DEPRECATED!

function endline

void endline()

function addtobuffer

void addtobuffer(
    const std::vector< double > & functor_data,
    const std::vector< std::string > & functor_labels,
    const int vID,
    const int rank,
    const int pointID
)

function dump_buffer

void dump_buffer(
    bool force =false
)

function get_output_filename

std::string get_output_filename()

function get_bufferlength

int get_bufferlength()

Updated on 2023-06-26 at 21:36:52 +0000