H4CF Conversion Library  1.2
h4cf.h
Go to the documentation of this file.
1 // Copyright by The HDF Group
2 // All rights reserved.
3 //
4 // This file is part of the H4CF Conversion Toolkit. The full H4CF Conversion
5 // Toolkit copyright notice including terms governing use, modification, and
6 // redistribution, is contained in the file COPYING.
7 // COPYING can be found at the root of the source code
8 // distribution tree. If you do not have access to this file, you may request
9 // a copy from eoshelp@hdfgroup.org.
10 
22 
30 #ifndef H4CF_H
31 #define H4CF_H
32 
33 #include "h4cf_header.h"
38 void h4cf_open(char* filename);
39 
40 
55 const map<string, int> h4cf_get_dims();
56 
57 
62 const list<var*> h4cf_get_vars();
63 
70 const string h4cf_get_var_name(var* v);
71 
86 const vector< map<string, int> > h4cf_get_var_dims(var* v);
87 
105 const h4cf_data_type h4cf_get_var_type(var* v);
106 
107 
116 const int h4cf_get_var_rank(var* v);
117 
132 void h4cf_get_var_value(vector<char>* buf, var* v);
133 
168 void h4cf_get_var_value(vector<char>* buf, var* v,
169  int32* start, int32* stride, int32* edge);
170 
171 // This function is good for debugging only.
172 // It is not thoroughly tested so we'll not make it public yet.
173 // const string h4cf_get_var_str_value(var* v);
174 
175 // This function is good for debugging only.
176 // It is not thoroughly tested so we'll not make it public yet.
177 // const map<string, string> h4cf_get_file_attrs_txt();
178 
183 const list<attr*> h4cf_get_file_attrs();
184 
185 
193 const list<attr*> h4cf_get_var_attrs(var* v);
194 
209 void h4cf_get_attr_value(vector<char>* buf, attr* a);
210 
218 const string h4cf_get_attr_name(attr* a);
219 
237 const h4cf_data_type h4cf_get_attr_type(attr* a);
238 
250 const int h4cf_get_attr_count(attr* a);
251 
262 const attr* h4cf_get_var_attr_by_name(string str, var* v);
263 
264 
272 void h4cf_close();
273 
274 #endif
275 
276 
277 
278 
const string h4cf_get_var_name(var *v)
Retrieves the name of a variable pointed by v.
const attr * h4cf_get_var_attr_by_name(string str, var *v)
Retrieves the attribute that has str name from a variable pointed by v.
void h4cf_open(char *filename)
Opens an existing HDF-EOS2 or HDF4 file.
void h4cf_close()
Closes the access to the opened file.
const int h4cf_get_var_rank(var *v)
Retrieves the rank of a variable pointed by v.
void h4cf_get_attr_value(vector< char > *buf, attr *a)
Retrieves the data values of an attribute pointed by a and stores them into buf.
const list< attr * > h4cf_get_var_attrs(var *v)
Retrieves the attributes of a variable pointed by v.
const h4cf_data_type h4cf_get_var_type(var *v)
Retrieves the variable type of a variable pointed by v.
const list< attr * > h4cf_get_file_attrs()
Retrieves file attributes.
const int h4cf_get_attr_count(attr *a)
Retrieves the number of elements stored in an attribute pointed by a.
const string h4cf_get_attr_name(attr *a)
Retrieves the name of an attribute pointed by a.
const list< var * > h4cf_get_vars()
Retrieves variables in the file.
void h4cf_get_var_value(vector< char > *buf, var *v)
Retrieves data values of a variable pointed by v and stores them into buf.
const vector< map< string, int > > h4cf_get_var_dims(var *v)
Retrieves the dimensions of a variable pointed by v.
const map< string, int > h4cf_get_dims()
Retrieves pairs of name and size of dimension in the file.
const h4cf_data_type h4cf_get_attr_type(attr *a)
Retrieves the attribute type of an attribute pointed by a.