class Gambit::Printers::BaseBasePrinter
[No description available]
Inherited by Gambit::Printers::BasePrinter
Public Functions
Name | |
---|---|
BaseBasePrinter() | |
virtual | ~BaseBasePrinter() |
virtual void | reset(bool force =false) =0 Function to signal to the printer to write buffer contents to disk. |
virtual void | flush() =0 |
int | getRank() Retrieve/Set MPI rank (setting is useful for e.g. the postprocessor to re-print points from other ranks) |
void | setRank(int r) |
bool & | get_printUnitcube() |
void | set_printUnitcube(const bool & rflag) |
std::set< std::string > | getPrintList() |
void | setPrintList(const std::set< std::string > & in) |
void | addToPrintList(const std::string & in) |
virtual Options | resume_reader_options() =0 |
bool | get_resume() |
void | set_resume(bool rflag) |
virtual void | finalise(bool abnormal =false) =0 Signal printer that scan is finished, and final output needs to be performed. |
void | disable(int n =-1) |
void | enable() |
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) |
void | print_metadata(map_str_str datasets) |
Protected Functions
Name | |
---|---|
template <typename T > void | _print(T const & , const std::string & label, const int vertexID, const uint, const ulong) |
template <typename T > void | _print(T const & in, const std::string & label, const uint rank, const ulong pointID) Same for overloaded function. |
virtual void | _print_metadata(map_str_str ) |
Protected Attributes
Name | |
---|---|
bool | printer_enabled Flag to check if print functions are enabled or disabled. |
int | printer_cooldown Counter for printer cooldown. If non-zero printer can be disabled for a fixed number of print calls. |
Public Functions Documentation
function BaseBasePrinter
inline BaseBasePrinter()
function ~BaseBasePrinter
inline virtual ~BaseBasePrinter()
function reset
virtual void reset(
bool force =false
) =0
Function to signal to the printer to write buffer contents to disk.
Reimplemented by: Gambit::Printers::asciiPrinter::reset, Gambit::Printers::coutPrinter::reset, Gambit::Printers::HDF5Printer::reset, Gambit::Printers::HDF5Printer2::reset, Gambit::Printers::SQLitePrinter::reset, Gambit::Printers::nonePrinter::reset
Signal printer to reset contents, i.e. delete old data in preperation for replacement
function flush
virtual void flush() =0
Reimplemented by: Gambit::Printers::asciiPrinter::flush, Gambit::Printers::coutPrinter::flush, Gambit::Printers::HDF5Printer::flush, Gambit::Printers::HDF5Printer2::flush, Gambit::Printers::nonePrinter::flush, Gambit::Printers::SQLitePrinter::flush, 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 getRank
inline int getRank()
Retrieve/Set MPI rank (setting is useful for e.g. the postprocessor to re-print points from other ranks)
function setRank
inline void setRank(
int r
)
function get_printUnitcube
inline bool & get_printUnitcube()
function set_printUnitcube
inline void set_printUnitcube(
const bool & rflag
)
function getPrintList
inline std::set< std::string > getPrintList()
Retrieve/Set print list for this printer Required by e.g. postprocessor.
function setPrintList
inline void setPrintList(
const std::set< std::string > & in
)
function addToPrintList
inline void addToPrintList(
const std::string & in
)
function resume_reader_options
virtual Options resume_reader_options() =0
Reimplemented by: Gambit::Printers::asciiPrinter::resume_reader_options, Gambit::Printers::coutPrinter::resume_reader_options, Gambit::Printers::HDF5Printer::resume_reader_options, Gambit::Printers::HDF5Printer2::resume_reader_options, Gambit::Printers::nonePrinter::resume_reader_options, Gambit::Printers::SQLitePrinter::resume_reader_options, Gambit::Printers::BasePrinter::resume_reader_options
function get_resume
inline bool get_resume()
function set_resume
inline void set_resume(
bool rflag
)
function finalise
virtual void finalise(
bool abnormal =false
) =0
Signal printer that scan is finished, and final output needs to be performed.
Reimplemented by: Gambit::Printers::asciiPrinter::finalise, Gambit::Printers::coutPrinter::finalise, Gambit::Printers::HDF5Printer::finalise, Gambit::Printers::HDF5Printer2::finalise, Gambit::Printers::SQLitePrinter::finalise, Gambit::Printers::nonePrinter::finalise
function disable
inline void disable(
int n =-1
)
“Turn off” printer; i.e. calls to print functions will do nothing while this is active Optionally, disable printer just for the next n print calls unless it was already disabled
function enable
inline void enable()
“Turn on” printer; print calls will work as normal. Reset cooldown
function print
template <typename T >
inline void print(
T const & in,
const std::string & label,
const int vertexID,
const uint rank,
const ulong pointID
)
function print
template <typename T >
inline void print(
T const & in,
const std::string & label,
const uint rank,
const ulong pointID
)
function print_metadata
inline void print_metadata(
map_str_str datasets
)
Protected Functions Documentation
function _print
template <typename T >
inline void _print(
T const & ,
const std::string & label,
const int vertexID,
const uint,
const ulong
)
Default _print function. Throws an error if no matching virtual function for the type of the attempted print is found.
function _print
template <typename T >
inline void _print(
T const & in,
const std::string & label,
const uint rank,
const ulong pointID
)
Same for overloaded function.
function _print_metadata
inline virtual void _print_metadata(
map_str_str
)
Reimplemented by: Gambit::Printers::asciiPrinter::_print_metadata, Gambit::Printers::coutPrinter::_print_metadata, Gambit::Printers::HDF5Printer::_print_metadata, Gambit::Printers::HDF5Printer2::_print_metadata, Gambit::Printers::nonePrinter::_print_metadata, Gambit::Printers::SQLitePrinter::_print_metadata
Protected Attributes Documentation
variable printer_enabled
bool printer_enabled;
Flag to check if print functions are enabled or disabled.
variable printer_cooldown
int printer_cooldown;
Counter for printer cooldown. If non-zero printer can be disabled for a fixed number of print calls.
Updated on 2024-07-18 at 13:53:32 +0000