summaryrefslogtreecommitdiff
path: root/project2/urlRows.h
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2011-02-14 23:30:52 +0000
committerrandomdan <randomdan@localhost>2011-02-14 23:30:52 +0000
commitbc0c102ee7746d6a7b52a5fa4a4a65709823762f (patch)
tree14517e8efce4ecdf7cb6eb6c9387f087872a245a /project2/urlRows.h
parentConvert dumpTask into a generic purpose file* writer (diff)
downloadproject2-bc0c102ee7746d6a7b52a5fa4a4a65709823762f.tar.bz2
project2-bc0c102ee7746d6a7b52a5fa4a4a65709823762f.tar.xz
project2-bc0c102ee7746d6a7b52a5fa4a4a65709823762f.zip
Merge fileRows and urlRows content parser into a shared based; streamRows
Diffstat (limited to 'project2/urlRows.h')
-rw-r--r--project2/urlRows.h32
1 files changed, 5 insertions, 27 deletions
diff --git a/project2/urlRows.h b/project2/urlRows.h
index 7b60400..fe63a3f 100644
--- a/project2/urlRows.h
+++ b/project2/urlRows.h
@@ -5,9 +5,9 @@
#include <boost/intrusive_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <map>
-#include "rowSet.h"
+#include "streamRows.h"
-class UrlRows : public RowSet {
+class UrlRows : public StreamRows {
public:
UrlRows(const xmlpp::Element * p);
~UrlRows();
@@ -15,21 +15,10 @@ class UrlRows : public RowSet {
virtual void loadComplete(const CommonObjects *);
void execute(const RowProcessor *) const;
virtual void setFilter(const Glib::ustring &);
- unsigned int columnCount() const;
- const Glib::ustring & getColumnName(unsigned int col) const;
- VariableType getCurrentValue(const Glib::ustring & id) const;
- VariableType getCurrentValue(unsigned int col) const;
- bool isNull(unsigned int col) const;
- bool isNull(const Glib::ustring & id) const;
- typedef std::set<gunichar> CharSet;
- const Glib::ustring url;
+ const Variable url;
protected:
- void addColumn(const Glib::ustring & rawtok) const;
- typedef boost::shared_ptr<Glib::ustring> ValPtr;
- typedef std::vector<ValPtr> Values;
- mutable Values values;
private:
struct callback {
@@ -39,19 +28,8 @@ class UrlRows : public RowSet {
};
static size_t handleDataHelper(const char * ptr, size_t size, size_t nmemb, void * stream);
size_t handleData(const RowProcessor * rp, const char * bytes, size_t bytesLen) const;
- gunichar fieldSep;
- gunichar quoteChar;
- gunichar newline;
- std::string encoding;
- mutable size_t skipheader;
- typedef std::vector<Glib::ustring> Columns;
- mutable Columns columns;
-
- // Used in CURL callback
- mutable bool mkCols;
- mutable bool inQuotes;
- mutable bool prevWasQuote;
- mutable Glib::ustring tok;
+ bool convertRequired;
+
};
#endif