#include <dm4io.h>
Collaboration diagram for EMAN::GatanDM4::TagGroup:
Public Member Functions | |
TagGroup (FILE *data_file, TagTable *tagtable, const string &groupname) | |
~TagGroup () | |
int | read (bool nodata=false) |
string | get_name () const |
int | get_entry_id () |
Private Attributes | |
FILE * | in |
TagTable * | tagtable |
string | name |
int | entry_id |
Definition at line 140 of file dm4io.h.
TagGroup::TagGroup | ( | FILE * | data_file, | |
TagTable * | tagtable, | |||
const string & | groupname | |||
) |
int TagGroup::get_entry_id | ( | ) |
string TagGroup::get_name | ( | ) | const |
Definition at line 683 of file dm4io.cpp.
References name.
Referenced by EMAN::GatanDM4::TagEntry::read().
00684 { 00685 return name; 00686 }
int TagGroup::read | ( | bool | nodata = false |
) |
Definition at line 642 of file dm4io.cpp.
References EMAN::ByteOrder::become_big_endian(), in, LOGVAR, portable_fseek(), and tagtable.
Referenced by EMAN::GatanDM4::TagEntry::read().
00643 { 00644 LOGVAR("TagGroup::read()"); 00645 00646 long ntags = 0; 00647 00648 portable_fseek(in, sizeof(char) * 2, SEEK_CUR); 00649 00650 fread(&ntags, sizeof(ntags), 1, in); 00651 00652 ByteOrder::become_big_endian(&ntags); 00653 00654 LOGVAR("DM4: ntags = %d\n", ntags); 00655 00656 int err = 0; 00657 char flagend; 00658 for (int i = 0; i < ntags; i++) { 00659 /* 00660 portable_fseek(in, sizeof(char) * 9, SEEK_CUR); 00661 fread(&flagend, sizeof(char), 1, in); 00662 00663 if (flagend ==EOF){ 00664 break; 00665 } 00666 else{ 00667 portable_fseek(in, -sizeof(char) * 10, SEEK_CUR);; 00668 } 00669 00670 */ 00671 00672 TagEntry tag_entry(in, tagtable, this); 00673 err = tag_entry.read(nodata); 00674 00675 if (err) { 00676 break; 00677 } 00678 } 00679 00680 return err; 00681 }
int EMAN::GatanDM4::TagGroup::entry_id [private] |
FILE* EMAN::GatanDM4::TagGroup::in [private] |
string EMAN::GatanDM4::TagGroup::name [private] |
TagTable* EMAN::GatanDM4::TagGroup::tagtable [private] |