0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
LoadDataSourceFileLocal.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; version 3 of the
9  * License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
22 #ifndef HYPERTABLE_LOADDATASOURCEFILELOCAL_H
23 #define HYPERTABLE_LOADDATASOURCEFILELOCAL_H
24 
25 #include <fstream>
26 #include <iostream>
27 #include <string>
28 #include <vector>
29 
30 #include <boost/iostreams/device/file.hpp>
31 #include <boost/iostreams/filtering_stream.hpp>
32 
33 #include "Common/ByteString.h"
34 #include "Common/DynamicBuffer.h"
35 #include "Common/String.h"
36 
37 #include "DataSource.h"
39 #include "LoadDataSource.h"
40 
41 
42 namespace Hypertable {
43 
45 
46  public:
47  LoadDataSourceFileLocal(const std::string &fname, const std::string &header_fname,
48  int row_uniquify_chars = 0, int load_flags = 0);
49 
51 
52  uint64_t incr_consumed();
53 
54  protected:
55  void init_src();
56  boost::iostreams::file_source m_source;
57  std::string m_fname;
58  std::string m_header_fname;
59  };
60 
61 } // namespace Hypertable
62 
63 #endif // HYPERTABLE_LOADDATASOURCEFILELOCAL_H
A dynamic, resizable memory buffer.
Hypertable definitions
LoadDataSourceFileLocal(const std::string &fname, const std::string &header_fname, int row_uniquify_chars=0, int load_flags=0)
A String class based on std::string.
A serializable ByteString.
boost::iostreams::file_source m_source