Public Member Functions | Friends

Hdf_vd Class Reference

List of all members.

Public Member Functions

 Hdf_vd (const int32 &vd_id, const int32 &vd_ref, const char *filename)
 Call by Hdf_file to construct itself.
 Hdf_vd (const Hdf_vd &hdf_vd)
std::string get_name () const
int32 get_ref () const
std::string get_cls () const
int32 get_interlace () const
int32 get_nb_record () const
int32 get_nb_field () const
int32 get_nb_attr () const
Hdf_vd_field get_field (const char *field_name) const
 access an field using its name
Hdf_vd_field get_field (const int32 &field_idx) const
 access an field using its index
const bool has_field (const char *field_name) const
 test the existence of the field
Hdf_attr get_attribute (const char *attr_name) const
 access an attribute using its name
Hdf_attr get_attribute (const int32 &attr_idx) const
 access an attribute using its index
const bool has_attr (const char *attr_name) const
 test the existence of the attribute
void get_attr_value (const char *attr_name, void *value, int32 ival=0) const
 read the value of an attribute
int32 get_attr_idx (const char *attr_name) const
 retrieve the index of an attribute using its name
int32 get_field_idx (const char *field_name) const
 retrieve the index of an field using its name
Hdf_vdoperator= (const Hdf_vd &hdf_vd)
std::string to_string () const
Hdf_vd_field read_field_data (const int32 &file_id, const string &filename, const string &field_name, void *data, int32 start, int32 edges)
 used by Hdf_file::read_data. No test are done on parameters validity in this method. TODO Should be private and use a friend encapsulation

Friends

std::ostream & operator<< (std::ostream &stream, const Hdf_vd &hdf_vd)

Constructor & Destructor Documentation

Hdf_vd::Hdf_vd ( const int32 &  vd_id,
const int32 &  vd_ref,
const char *  filename 
)

Call by Hdf_file to construct itself.

Parameters:
vd_id the id of the vdata
vd_ref the reference of the VData (ie the index in the sds/vdata list)
filename the hdf file's name

References Hdf_vd().

Referenced by Hdf_vd().


Member Function Documentation

int32 Hdf_vd::get_attr_idx ( const char *  attr_name  )  const

retrieve the index of an attribute using its name

Parameters:
attr_name the attribute name
Returns:
the attribute index, or -1 if not found

Referenced by get_attribute(), and has_attr().

void Hdf_vd::get_attr_value ( const char *  attr_name,
void *  value,
int32  ival = 0 
) const

read the value of an attribute

Parameters:
attr_name the name of the attribute
value the output value (must be allocated by the caller)
ival the index of the attribute value (for array attributes)

References get_attribute().

Hdf_attr Hdf_vd::get_attribute ( const char *  attr_name  )  const

access an attribute using its name

Parameters:
attr_name the attribute name
Returns:
the attribute.
Exceptions:
bad_attribute_name if the attribute doesn't exists

References get_attr_idx().

Referenced by get_attr_value().

Hdf_attr Hdf_vd::get_attribute ( const int32 &  attr_idx  )  const

access an attribute using its index

Parameters:
attr_idx the attribute index
Returns:
the attribute.
Exceptions:
bad_attribute_index if the attribute doesn't exists
Hdf_vd_field Hdf_vd::get_field ( const int32 &  field_idx  )  const

access an field using its index

Parameters:
field_idx the field index
Returns:
the field.
Exceptions:
bad_field_index if the field doesn't exists
Hdf_vd_field Hdf_vd::get_field ( const char *  field_name  )  const

access an field using its name

Parameters:
field_name the field name
Returns:
the field.
Exceptions:
bad_field_name if the field doesn't exists

References get_field_idx().

Referenced by Hdf_file::get_vd_field_data_type(), and read_field_data().

int32 Hdf_vd::get_field_idx ( const char *  field_name  )  const

retrieve the index of an field using its name

Parameters:
field_name the field name
Returns:
the field index, or -1 if not found

Referenced by get_field(), has_field(), and read_field_data().

const bool Hdf_vd::has_attr ( const char *  attr_name  )  const

test the existence of the attribute

Parameters:
attr_name the name of the attribute
Returns:
true if the attribute has been found

References get_attr_idx().

const bool Hdf_vd::has_field ( const char *  field_name  )  const

test the existence of the field

Parameters:
field_name the name of the field
Returns:
true if the field has been found

References get_field_idx().


The documentation for this class was generated from the following files: