gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
basebaseprinter.hpp File Reference

This is a minimal (pure virtual) precursor to the printer base class, for use only in ScannerBit. More...

#include <string>
#include <sstream>
#include <vector>
#include <boost/preprocessor/seq/for_each.hpp>
#include "gambit/ScannerBit/printable_types.hpp"
#include "gambit/Utils/standalone_error_handlers.hpp"
#include "gambit/Printers/printer_id_tools.hpp"
#include "gambit/Utils/new_mpi_datatypes.hpp"
Include dependency graph for basebaseprinter.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Gambit::Printers::BaseBasePrinter
 
class  Gambit::Printers::BaseBaseReader
 So, need: More...
 

Namespaces

 Gambit
 TODO: see if we can use this one:
 
 Gambit::Printers
 Forward declaration of Printers::BasePrinter class for use in print functions.
 

Macros

#define VPRINT(r, data, elem)
 
#define ADD_VIRTUAL_PRINTS(TYPES)   BOOST_PP_SEQ_FOR_EACH(VPRINT, , TYPES)
 
#define VRETRIEVE(r, data, elem)
 
#define ADD_VIRTUAL_RETRIEVALS(TYPES)   BOOST_PP_SEQ_FOR_EACH(VRETRIEVE, , TYPES)
 

Typedefs

typedef std::map< std::string, doubleGambit::map_str_dbl
 Shorthand for a string-to-double map. More...
 
typedef unsigned int Gambit::Printers::uint
 
typedef unsigned long int Gambit::Printers::ulong
 
typedef long long int Gambit::Printers::longlong
 
typedef unsigned long long int Gambit::Printers::ulonglong
 

Functions

template<class T >
std::size_t Gambit::Printers::getTypeID (void)
 Helper template functions to retrieve type IDs for a type. More...
 

Detailed Description

This is a minimal (pure virtual) precursor to the printer base class, for use only in ScannerBit.

This helps to minimize the parts of the printers which are essential for ScannerBit to run.

Now includes base 'reader' class as well, for retrieving data from printer output


Authors (add name and date if you modify):

Author
Ben Farmer (benja.nosp@m.min..nosp@m.farme.nosp@m.r@fy.nosp@m.sik.s.nosp@m.u.se)
Date
2015 Feb
Author
Tomas Gonzalo (tomas.nosp@m..gon.nosp@m.zalo@.nosp@m.mona.nosp@m.sh.ed.nosp@m.u)
Date
2019 May
Author
Patrick Stoecker (stoec.nosp@m.ker@.nosp@m.physi.nosp@m.k.rw.nosp@m.th-aa.nosp@m.chen.nosp@m..de)
Date
2020 May

Definition in file basebaseprinter.hpp.

Macro Definition Documentation

◆ ADD_VIRTUAL_PRINTS

#define ADD_VIRTUAL_PRINTS (   TYPES)    BOOST_PP_SEQ_FOR_EACH(VPRINT, , TYPES)

Definition at line 227 of file basebaseprinter.hpp.

◆ ADD_VIRTUAL_RETRIEVALS

#define ADD_VIRTUAL_RETRIEVALS (   TYPES)    BOOST_PP_SEQ_FOR_EACH(VRETRIEVE, , TYPES)

Definition at line 418 of file basebaseprinter.hpp.

Referenced by Gambit::Printers::BaseReader::retrieve().

◆ VPRINT

#define VPRINT (   r,
  data,
  elem 
)
Value:
virtual void _print(elem const&, const std::string& label, \
const int vertexID, const uint /*rank*/, \
const ulong /*pointID*/) \
{ \
std::ostringstream err; \
\
err << "No print function override has been " \
<< "\ndefined for this type (for whatever printer" \
<< "\nclass the current printer comes from)" \
<< "\n Dumping available info..." \
<< "\n Label : " << label \
<< "\n vertexID : " << vertexID \
<< "\n Type : " << STRINGIFY(elem); \
printer_error().raise(LOCAL_INFO,err.str()); \
} \
\
/* version that assigns vertexID automatically */ \
virtual void _print(elem const& in, const std::string& label, \
const uint rank, \
const ulong pointID) \
{ \
_print(in,label,get_param_id(label),rank,pointID); \
}
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define LOCAL_INFO
Definition: local_info.hpp:34
EXPORT_SYMBOLS int get_param_id(const std::string &name, bool &is_new)
Consolidated &#39;get id&#39; function, for both main and aux.
unsigned long int ulong

Definition at line 202 of file basebaseprinter.hpp.

◆ VRETRIEVE

#define VRETRIEVE (   r,
  data,
  elem 
)
Value:
virtual bool _retrieve(elem& /*output*/, \
const std::string& label, \
const uint /*rank*/, \
const ulong /*pointID*/ \
) \
{ \
std::ostringstream err; \
\
err << "No retrieve function override has been " \
<< "\ndefined for this retrieval type (for whatever printer" \
<< "\nclass the current printer comes from)" \
<< "\n Dumping available info..." \
<< "\n Label : " << label \
<< "\n Type : " << STRINGIFY(elem); \
printer_warning().raise(LOCAL_INFO,err.str()); \
return false; \
}
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define LOCAL_INFO
Definition: local_info.hpp:34
unsigned long int ulong

Definition at line 399 of file basebaseprinter.hpp.