Tulip  4.6.0
Better Visualization Through Research
library/tulip-gui/include/tulip/CSVContentHandler.h
00001 /*
00002  *
00003  * This file is part of Tulip (www.tulip-software.org)
00004  *
00005  * Authors: David Auber and the Tulip development Team
00006  * from LaBRI, University of Bordeaux
00007  *
00008  * Tulip is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation, either version 3
00011  * of the License, or (at your option) any later version.
00012  *
00013  * Tulip is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  * See the GNU General Public License for more details.
00017  *
00018  */
00019 ///@cond DOXYGEN_HIDDEN
00020 #ifndef CSVCONTENTHANDLER_H_
00021 #define CSVCONTENTHANDLER_H_
00022 
00023 #include <string>
00024 #include <vector>
00025 
00026 #include <tulip/tulipconf.h>
00027 
00028 namespace tlp {
00029 /**
00030  * @brief Interface to inherit to get and treat data from csv files with CSVParser object.
00031  */
00032 class TLP_QT_SCOPE CSVContentHandler {
00033 public:
00034   virtual ~CSVContentHandler() {
00035 
00036   }
00037   /**
00038    * Function called at the beginning of the file parsing.
00039    */
00040   virtual void begin() = 0;
00041 
00042   /**
00043    * Function called for each line in the file.
00044    * @param row The number of the row.
00045    * @param lineTokens The tokens.
00046    */
00047   virtual void line(unsigned int row,const std::vector<std::string>& lineTokens) = 0;
00048 
00049   /**
00050    * Function called at the end of the parsing.
00051    * @param rowNumber the number of row read in the file.
00052    * @param columnNumber The column number for the line with the greatest column number.
00053    */
00054   virtual void end(unsigned int rowNumber, unsigned int columnNumber) = 0;
00055 };
00056 }
00057 #endif /* CSVCONTENTHANDLER_H_ */
00058 ///@endcond
 All Classes Files Functions Variables Enumerations Enumerator Properties