diff --git a/owlps-positioner/src/csvstringreader.cc b/owlps-positioner/src/csvstringreader.cc index b6b18f8..5f68f5b 100644 --- a/owlps-positioner/src/csvstringreader.cc +++ b/owlps-positioner/src/csvstringreader.cc @@ -52,6 +52,13 @@ using namespace boost ; /* *** Constructors *** */ +CSVStringReader:: +CSVStringReader(const std::string &_str, const char _separator): + separator(_separator), current_token(NULL), current_field_nb(0) +{ + set_str(_str) ; +} + CSVStringReader::~CSVStringReader() { delete current_token ; @@ -63,10 +70,7 @@ CSVStringReader::~CSVStringReader() /** - * Note that this function is not called by the constructor, so you - * must manually call it to set a string to process prior to use - * read_field(). - * @return \em false in case of error (EOF, etc.), \em true else. + * @returns \em false in case of error (EOF, etc.), \em true else. */ void CSVStringReader::set_str(const string &_str) { diff --git a/owlps-positioner/src/csvstringreader.hh b/owlps-positioner/src/csvstringreader.hh index ab35f3f..751802e 100644 --- a/owlps-positioner/src/csvstringreader.hh +++ b/owlps-positioner/src/csvstringreader.hh @@ -68,6 +68,8 @@ public: CSVStringReader(const char _separator = ';'): separator(_separator), current_token(NULL), current_field_nb(0) {} + CSVStringReader(const std::string &_str, const char _separator = ';') ; + virtual ~CSVStringReader(void) ; /** @name Accessors */