28 #ifndef DOXYGEN_SHOULD_SKIP_THIS 36 template <
template <
typename >
class ALLOC >
37 DBInitializerFromCSV< ALLOC >::DBInitializerFromCSV(
38 const std::string filename,
39 bool fileContainsNames,
40 const std::string delimiter,
41 const char commentmarker,
42 const char quoteMarker,
43 const typename DBInitializerFromCSV< ALLOC >::allocator_type& alloc) :
44 IDBInitializer< ALLOC >(IDBInitializer< ALLOC >::InputType::STRING, alloc),
45 filename__(filename), delimiter__(delimiter),
46 comment_marker__(commentmarker), quote_marker__(quoteMarker),
47 first_row_has_names__(fileContainsNames),
48 input_stream__(filename__, std::ifstream::in),
49 parser__(input_stream__, delimiter, commentmarker, quoteMarker),
52 if ((input_stream__.rdstate() & std::ifstream::failbit) != 0) {
53 GUM_ERROR(IOError,
"File " << filename <<
" not found");
57 if (fileContainsNames) {
59 var_names__ = parser__.current();
62 GUM_CONSTRUCTOR(DBInitializerFromCSV);
67 template <
template <
typename >
class ALLOC >
79 template <
template <
typename >
class ALLOC >
85 template <
template <
typename >
class ALLOC >
98 template <
template <
typename >
class ALLOC >
105 template <
template <
typename >
class ALLOC >
122 template <
template <
typename >
class ALLOC >
129 template <
template <
typename >
class ALLOC >
136 template <
template <
typename >
class ALLOC >
174 template <
template <
typename >
class ALLOC >
182 template <
template <
typename >
class ALLOC >
190 template <
template <
typename >
class ALLOC >
198 template <
template <
typename >
class ALLOC >
INLINE void emplace(Args &&... args)
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)