6 #include "HDFexception.hxx"
7 #include "HDFattribute.hxx"
8 #include "HDFinternalObject.hxx"
10 HDFattribute::HDFattribute(char *name,HDFinternalObject *father,hdf_type type)
14 _fid = _father->GetId();
18 void HDFattribute::CreateOnDisk()
20 if ((_id = HDFattrCreate(_fid,_name,_type)) < 0)
21 throw HDFexception("Can't create attribute");
23 void HDFattribute::OpenOnDisk()
25 if ((_id = HDFattrOpen(_fid,_name)) < 0)
26 throw HDFexception("Can't open attribute");
28 void HDFattribute::CloseOnDisk()
32 if ((ret = HDFattrClose(_id)) < 0)
33 throw HDFexception("Can't close dataset");
36 void HDFattribute::WriteOnDisk(void *values)
40 if ((ret = HDFattrWrite(_id,values)) < 0)
41 throw HDFexception("Can't create group");
44 void HDFattribute::ReadFromDisk(void *values)
48 if ((ret = HDFattrRead(_id,values)) < 0)
49 throw HDFexception("Can't read attribute");
52 HDFinternalObject * HDFattribute::GetFather()
57 hdf_type HDFattribute::GetType()