class Gambit::Printers::BaseReader
BASE READER CLASS.
#include <baseprinter.hpp>
Inherits from Gambit::Printers::BaseBaseReader
Inherited by Gambit::Printers::HDF5Reader, Gambit::Printers::SQLiteReader, Gambit::Printers::asciiReader
Public Functions
Name | |
---|---|
BaseReader() | |
virtual | ~BaseReader() Destructor. |
template <typename T > bool | retrieve(T & out, const std::string & label) Reimplement overload for ‘retrieve’ that uses the current point as the input for rank/pointID. |
template <typename T > bool | retrieve(T & out, const std::string & label, const uint rank, const ulong pointID) |
virtual bool | retrieve_and_print(const std::string & in_label, const std::string & out_label, BaseBasePrinter & printer, const uint rank, const ulong pointID) Retrieve and directly print data to new output. |
Protected Functions
Name | |
---|---|
template <typename T > bool | _retrieve(T & , const std::string & label, const uint, const ulong) |
Additional inherited members
Public Functions inherited from Gambit::Printers::BaseBaseReader
Name | |
---|---|
virtual | ~BaseBaseReader() |
virtual void | reset() =0 |
virtual ulong | get_dataset_length() =0 |
virtual PPIDpair | get_current_point() =0 |
virtual ulong | get_current_index() =0 |
virtual PPIDpair | get_next_point() =0 |
virtual bool | eoi() =0 |
virtual std::size_t | get_type(const std::string & label) =0 |
virtual std::set< std::string > | get_all_labels() =0 |
Public Functions Documentation
function BaseReader
inline BaseReader()
function ~BaseReader
inline virtual ~BaseReader()
Destructor.
function retrieve
template <typename T >
inline bool retrieve(
T & out,
const std::string & label
)
Reimplement overload for ‘retrieve’ that uses the current point as the input for rank/pointID.
function retrieve
template <typename T >
inline bool retrieve(
T & out,
const std::string & label,
const uint rank,
const ulong pointID
)
function retrieve_and_print
virtual bool retrieve_and_print(
const std::string & in_label,
const std::string & out_label,
BaseBasePrinter & printer,
const uint rank,
const ulong pointID
)
Retrieve and directly print data to new output.
Reimplements: Gambit::Printers::BaseBaseReader::retrieve_and_print
First need to get the type data for ‘in_label’, then call appropriate retrieve and print functions. I think there is no choice but to do this with a big switch. Also need to check if the type matches what the printer expects, and decide what to do in case of mismatch.
Protected Functions Documentation
function _retrieve
template <typename T >
inline bool _retrieve(
T & ,
const std::string & label,
const uint,
const ulong
)
Default _retrieve function. Throws an error if no virtual function matching the type of the attempted retrieval is found.
Updated on 2024-07-18 at 13:53:32 +0000