67 static bool IsInternalVgroup(int32 fid, int32 ref);
88 while ((ref = Vgetid(
_file_id, ref)) != -1) {
89 if (!IsInternalVgroup(
_file_id, ref))
119 vector < int32 >::iterator r =
138 if ((member_id = Vattach(
_file_id, ref,
"r")) >= 0) {
139 if (Vgetname(member_id, mName) < 0) {
166 open(filename.c_str());
174 if ((
_file_id = Hopen(filename, DFACC_RDONLY, 0)) < 0)
189 BESDEBUG(
"h4",
"vgroup file closed: id=" <<
_file_id <<
", this: " <<
this << endl);
195 BESDEBUG(
"h4",
"vgroup Vdetach status: " << status <<
", this: " <<
this << endl);
200 BESDEBUG(
"h4",
"vgroup vend status: " << status <<
", this: " <<
this << endl);
203 BESDEBUG(
"h4",
"vgroup HClose status: " << status <<
", this: " <<
this << endl);
204 BESDEBUG(
"h4",
"Error: " << HEstring((hdf_err_code_t)HEvalue(1)) << endl);
279 if (Vinquire(
_vgroup_id, &nentries, name) < 0)
281 hv.
name = string(name);
284 hv.
vclass = string(vclass);
290 for (
int i = 0; i < npairs; ++i) {
293 if (Vgettagref(
_vgroup_id, i, &tag, &ref) < 0)
298 hv.
tags.push_back(tag);
299 hv.
refs.push_back(ref);
304 hv.
tags.push_back(tag);
305 hv.
refs.push_back(ref);
322 if (
tags.size() == 0)
326 if (
refs.size() == 0)
332 bool IsInternalVgroup(int32 fid, int32 ref)
335 set < string, less < string > >reserved_names;
336 reserved_names.insert(
"RIATTR0.0N");
337 reserved_names.insert(
"RIG0.0");
339 set < string, less < string > >reserved_classes;
340 reserved_classes.insert(
"Attr0.0");
341 reserved_classes.insert(
"RIATTR0.0C");
342 reserved_classes.insert(
"DimVal0.0");
343 reserved_classes.insert(
"DimVal0.1");
344 reserved_classes.insert(
"CDF0.0");
345 reserved_classes.insert(
"Var0.0");
346 reserved_classes.insert(
"Dim0.0");
347 reserved_classes.insert(
"UDim0.0");
348 reserved_classes.insert(
"Data0.0");
349 reserved_classes.insert(
"RI0.0");
353 if ((vid = Vattach(fid, ref,
"r")) < 0) {
359 if (Vgetname(vid, name) < 0) {
363 if (reserved_names.find(
string(name)) != reserved_names.end()) {
368 if (Vgetclass(vid, vclass) < 0) {
375 if (reserved_classes.find(
string(vclass)) != reserved_classes.end())
418 int32 number_type, count, size;
425 data =
new char[count * DFKNTsize(number_type)];
virtual void seek(int index=0)
virtual int index(void) const
virtual bool eo_attr(void) const
virtual bool eos(void) const
virtual void rewind(void)
virtual bool bos(void) const
vector< int32 > _vgroup_refs
virtual bool isInternalVdata(int ref) const
virtual void open(const char *filename)
string _memberName(int32 ref)
void _seek(const char *name)
struct hdfistream_vgroup::@4 _recs
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream
hdfistream_vgroup(const string filename="")
virtual void seek_ref(int ref)
string memberName(int32 ref)
hdfistream_vgroup & operator>>(hdf_vgroup &hs)