Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

DefinedElement Class Reference

#include <element.h>

Inheritance diagram for DefinedElement:

Element List of all members.

Public Methods

 DefinedElement (const char *name, ComplexElement *type, int n)
int AssignPos (int currPos)
 Assign position to this element Return next pos. More...

void Output (ostream &out, Element *sel)

Private Attributes

ComplexElementtype
int n

Constructor & Destructor Documentation

DefinedElement::DefinedElement const char *    name,
ComplexElement   type,
int    n
 

Definition at line 148 of file element.h.

00148                                                                            :
00149         Element(name),type(_type),n(_n)
00150 {
00151         
00152 }


Member Function Documentation

int DefinedElement::AssignPos int    currPos [virtual]
 

Assign position to this element Return next pos.

Implements Element.

Definition at line 154 of file element.h.

References Element::GetLength(), Element::len, Element::position, and type.

00155 {
00156         position = currPos;
00157         len = type->GetLength();
00158         return currPos + len;
00159 }

void DefinedElement::Output ostream &    out,
Element   sel
[virtual]
 

Implements Element.

Definition at line 161 of file element.h.

References Element::len, Element::name, ComplexElement::Output(), Element::position, and type.

00162 {
00163         out << "Defined " << name << " pos:" << position << " len:" << len << " {" << endl;
00164         type->Output(out,NULL);
00165         out << "};" << name << "{" << endl;
00166 }


Member Data Documentation

int DefinedElement::n [private]
 

Definition at line 145 of file element.h.

ComplexElement* DefinedElement::type [private]
 

Definition at line 144 of file element.h.

Referenced by AssignPos(), and Output().


The documentation for this class was generated from the following file:
Generated on Mon Jan 13 22:20:36 2003 for perdr by doxygen1.2.15