00001 // Copyright (C) 2011-2013 by The HDF Group 00002 // All rights reserved. 00003 // 00004 // This file is part of the H4CF Conversion Toolkit. The full H4CF Conversion 00005 // Toolkit copyright notice including terms governing use, modification, and 00006 // redistribution, is contained in the files COPYING and Copyright.html. 00007 // COPYING and Copyright.html can be found at the root of the source code 00008 // distribution tree. If you do not have access to these files, you may request 00009 // a copy from eoshelp@hdfgroup.org. 00010 00022 00030 #ifndef H4CF_H 00031 #define H4CF_H 00032 00033 #include "h4cf_header.h" 00038 void h4cf_open(char* filename); 00039 00040 00055 const map<string, int> h4cf_get_dims(); 00056 00057 00062 const list<var*> h4cf_get_vars(); 00063 00070 const string h4cf_get_var_name(var* v); 00071 00086 const vector< map<string, int> > h4cf_get_var_dims(var* v); 00087 00105 const h4cf_data_type h4cf_get_var_type(var* v); 00106 00107 00116 const int h4cf_get_var_rank(var* v); 00117 00132 void h4cf_get_var_value(vector<char>* buf, var* v); 00133 00168 void h4cf_get_var_value(vector<char>* buf, var* v, 00169 int32* start, int32* stride, int32* edge); 00170 00171 // This function is good for debugging only. 00172 // It is not thoroughly tested so we'll not make it public yet. 00173 // const string h4cf_get_var_str_value(var* v); 00174 00175 // This function is good for debugging only. 00176 // It is not thoroughly tested so we'll not make it public yet. 00177 // const map<string, string> h4cf_get_file_attrs_txt(); 00178 00183 const list<attr*> h4cf_get_file_attrs(); 00184 00185 00193 const list<attr*> h4cf_get_var_attrs(var* v); 00194 00209 void h4cf_get_attr_value(vector<char>* buf, attr* a); 00210 00218 const string h4cf_get_attr_name(attr* a); 00219 00237 const h4cf_data_type h4cf_get_attr_type(attr* a); 00238 00250 const int h4cf_get_attr_count(attr* a); 00251 00262 const attr* h4cf_get_var_attr_by_name(string str, var* v); 00263 00264 00272 void h4cf_close(); 00273 00274 #endif 00275 00276 00277 00278