Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN::Gatan::TagGroup Class Reference

#include <dm3io.h>

Collaboration diagram for EMAN::Gatan::TagGroup:

Collaboration graph
[legend]
List of all members.

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
TagTabletagtable
string name
int entry_id

Constructor & Destructor Documentation

TagGroup::TagGroup FILE *  data_file,
TagTable tagtable,
const string &  groupname
 

Definition at line 524 of file dm3io.cpp.

References in.

00525         :       in(data_file), tagtable(table), name(groupname), entry_id(0)
00526 {
00527 }

TagGroup::~TagGroup  ) 
 

Definition at line 529 of file dm3io.cpp.

00530 {
00531 }


Member Function Documentation

int TagGroup::get_entry_id  ) 
 

Definition at line 566 of file dm3io.cpp.

References entry_id.

Referenced by EMAN::Gatan::TagEntry::read().

00567 {
00568         int id = entry_id;
00569         entry_id++;
00570         return id;
00571 }

string TagGroup::get_name  )  const
 

Definition at line 561 of file dm3io.cpp.

Referenced by EMAN::Gatan::TagEntry::read().

00562 {
00563         return name;
00564 }

int TagGroup::read bool  nodata = false  ) 
 

Definition at line 533 of file dm3io.cpp.

References in, LOGVAR, portable_fseek(), EMAN::Gatan::TagEntry::read(), and tagtable.

Referenced by EMAN::Gatan::TagEntry::read().

00534 {
00535         LOGVAR("TagGroup::read()");
00536 
00537 
00538         int ntags = 0;
00539         portable_fseek(in, sizeof(char) * 2, SEEK_CUR);
00540         
00541         fread(&ntags, sizeof(ntags), 1, in);
00542         
00543         ByteOrder::become_big_endian(&ntags);
00544         
00545         LOGVAR("DM3: ntags = %d\n", ntags);
00546 
00547         int err = 0;
00548 
00549         for (int i = 0; i < ntags; i++) {
00550                 TagEntry tag_entry(in, tagtable, this);
00551                 err = tag_entry.read(nodata);
00552 
00553                 if (err) {
00554                         break;
00555                 }
00556         }
00557 
00558         return err;
00559 }


Member Data Documentation

int EMAN::Gatan::TagGroup::entry_id [private]
 

Definition at line 155 of file dm3io.h.

Referenced by get_entry_id().

FILE* EMAN::Gatan::TagGroup::in [private]
 

Definition at line 152 of file dm3io.h.

Referenced by read().

string EMAN::Gatan::TagGroup::name [private]
 

Definition at line 154 of file dm3io.h.

TagTable* EMAN::Gatan::TagGroup::tagtable [private]
 

Definition at line 153 of file dm3io.h.

Referenced by read().


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 13:43:16 2013 for EMAN2 by  doxygen 1.3.9.1