Make your own free website on Tripod.com
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

SimpleElement Class Reference

#include <element.h>

Inheritance diagram for SimpleElement:

Element List of all members.

Public Methods

 SimpleElement (const char *name, bool isSigned, int size, int n)
int AssignPos (int currPos)
 Assign position to this element Return next pos. More...

void Output (ostream &out, Element *sel)

Private Attributes

bool isSigned
int size
int n

Constructor & Destructor Documentation

SimpleElement::SimpleElement const char *    name,
bool    isSigned,
int    size,
int    n
 

Definition at line 179 of file element.h.

00179                                                                             :
00180   Element(name),isSigned(_isSigned),size(_size),n(_n)
00181 {
00182 }


Member Function Documentation

int SimpleElement::AssignPos int    currPos [virtual]
 

Assign position to this element Return next pos.

Implements Element.

Definition at line 184 of file element.h.

References Element::len, n, Element::position, and size.

00185 {
00186         position = currPos;
00187         len = size*(n==0?1:n);
00188         return currPos + len;
00189 }

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

Implements Element.

Definition at line 191 of file element.h.

References Element::len, Element::name, and Element::position.

00192 {
00193         out << "Simple " << name << " pos:" << position << " len:" << len << ";" << endl;
00194 }


Member Data Documentation

bool SimpleElement::isSigned [private]
 

Definition at line 175 of file element.h.

int SimpleElement::n [private]
 

Definition at line 176 of file element.h.

Referenced by AssignPos().

int SimpleElement::size [private]
 

Definition at line 176 of file element.h.

Referenced by AssignPos().


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