28 #ifndef DOXYGEN_SHOULD_SKIP_THIS 36 template <
template <
typename >
class ALLOC >
38 const std::string& str,
39 const std::vector< std::string, ALLOC< std::string > >& missingVals) {
40 for (
auto missing : missingVals) {
41 if (str == missing)
return true;
47 template <
template <
typename >
class ALLOC >
49 const std::string& str,
50 const std::vector< std::string, ALLOC< std::string > >& missingVals) {
59 template <
template <
typename >
class ALLOC >
61 const std::string& str,
62 const std::vector< std::string, ALLOC< std::string > >& missingVals) {
72 template <
template <
typename >
class ALLOC >
74 const std::vector< std::string, ALLOC< std::string > >& missingVals)
const {
80 sprintf(buffer,
"%g", __val_real);
81 return std::string(buffer);
87 if (missingVals.size())
88 return missingVals[0];
90 GUM_ERROR(UndefinedElement,
"no missing value symbol found");
93 GUM_ERROR(NotImplementedYet,
"type not supported by DBCell toString");
bool isMissing() const
indicates whether the cell contains a missing value
static bool isInteger(const std::string &str)
determines whether a string corresponds precisely to an integer
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
static DBCell bestDBCell(const std::string &str, const std::vector< std::string, ALLOC< std::string > > &missingVals)
returns the DBCell with the best type for an element encoded as a string
std::string to_string(const Formula &f)
static bool isReal(const std::string &str)
determine whether a string corresponds precisely to a real number
static EltType bestType(const std::string &str, const std::vector< std::string, ALLOC< std::string > > &missingVals)
returns the best type to store a given element encoded as a string
std::string toString(const std::vector< std::string, ALLOC< std::string > > &missingVals) const
returns the content of the DBCell as a string, whatever its type
EltType
the set of types possibly taken by the last element read
#define GUM_ERROR(type, msg)
DBCell()
default constructor (ontains a missing value)