Am5os
 All Classes Functions Pages
hdf_reader.h
1 //
2 // Projectname: amos-ss16-proj5
3 //
4 // Copyright (c) 2016 de.fau.cs.osr.amos2016.gruppe5
5 //
6 // This file is part of the AMOS Project 2016 @ FAU
7 // (Friedrich-Alexander University Erlangen-Nürnberg)
8 //
9 // This program is free software: you can redistribute it and/or modify
10 // it under the terms of the GNU Affero General Public License as
11 // published by the Free Software Foundation, either version 3 of the
12 // License, or (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU Affero General Public License for more details.
18 //
19 // You should have received a copy of the GNU Affero General Public
20 // License along with this program. If not, see
21 // <http://www.gnu.org/licenses/>.
22 //
23 
24 #ifndef HDF_READER_H
25 #define HDF_READER_H
26 
27 //std
28 #ifdef OLD_HEADER_FILENAME
29 #include <iostream.h>
30 #else
31 #include <iostream>
32 #endif
33 #include <string>
34 #include <vector>
35 
36 //hdf5
37 #ifndef H5_NO_NAMESPACE
38 #ifndef H5_NO_STD
39 #endif // H5_NO_STD
40 #endif
41 
42 #include "H5Cpp.h"
43 
44 #ifndef H5_NO_NAMESPACE
45 using namespace H5;
46 #endif
47 
48 class HDFReader {
49 
50 public:
51 
57  HDFReader(std::string file);
58 
64  int ReadFile();
65 
72  std::vector<int64_t> ReadOneProtobufFile(unsigned int index);
73 
79  std::vector<std::vector<int64_t> > ReadAllProtobufFiles();
80 
86  int GetNumberOfProtobufFiles();
87 
88 
94  std::string GetProtobufFilesDescription();
95 
101  //std::vector<std::vector<int64_t> > GetZValues();
102 
103 
111  //std::vector<int64_t> GetZValueBuffer(unsigned int index);
112 
113 
114 private:
115 
116  //std::vector<std::vector<int64_t> > z_values_; ///< z values for the protobuf files
117 
118  std::string protobuf_files_description_;
119 
120  std::vector<int> protobuf_file_ids_;
121 
122  std::string file_name_;
123 
124  std::string data_set_name_protobuf_files_;
125 
126  std::string protobuf_files_description_attribute_name_;
127 
128  //std::string data_set_name_z_values_; ///< The data set name of z values
129 
130 };
131 
132 
133 #endif // HDF_READER_H
Definition: hdf_reader.h:48