Site hosted by Angelfire.com: Build your free website today!

Line Class Reference

#include <Line.h>

List of all members.

Public Member Functions

 Line ()
 Basic Constructor.
 Line (MyString copy)
 Constructor with initial line sent in.
 Line (MyString copy, int number)
 Constructor with initial line sent in.
void Set_Counter (int set)
 Allows the user to set the address of the line.
void Pass_One ()
 Makes the Line run pass one on itself.
void Pass_Two ()
 Makes the Line run pass two on itself.
char * Ret_Line ()
 Returns the original contents of the Line.
char * Ret_Label ()
 Returns the label of the Line.
bool Ret_If_Op ()
 Returns if the line is an operation.
bool Op1_Finished ()
bool Op2_Finished ()
bool Op3_Finished ()
bool Op4_Finished ()
bool All_Ops_Finished ()
int Ret_Add_Count ()
void Ret_Opcode (MyString &store)
void Ret_Operand1 (MyString &store)
void Ret_Operand2 (MyString &store)
void Ret_Operand3 (MyString &store)
void Ret_Operand4 (MyString &store)
void Set_Error (int num)
int Ret_Err1 ()
int Ret_Err2 ()
int Ret_Err3 ()
int Ret_Command_Size ()
void operator= (Line &toCopy)

Private Member Functions

bool checkLabel (MyString &inLabel)
long long pow (int x, int y)
void analyzeOperand (MyString &operand, MyString &type, bool &doneFlag)
 A function variable Temporarily stores the operand input so that it can be edited to test for an immediate value.A function variableA function variableA function variable The value we have calculated so far from the operand. If a number is read successfully, this will be converted into little endian hex. A function variable The last character of the operand input. A function variable Keeps track of whether there has been an illegal character in the input, when reading for immediate. A function variable Keeps track of the current Byte's decimal value. A function variable The current Byte's hex value. Needed as an intermediate step between the decimal value and the operand output.A function variable Temporary Mystring ValueA function variable Temporarily stores a value returned from the symbol table. A function variable Temporarily stores the usage of the label, so that we know whether is is MEM32 or IMM32.
void to_hex (char ch, MyString &returned_string)
void Parse_Quotes ()
bool removeWord (MyString &instring, MyString &word, char ch)
void removeWhiteSpace (MyString &instring)

Private Attributes

MyString original
MyString label
bool op_or_dir
int address_counter
int command_size
int line_number
MyString opcode
MyString operand_1
MyString operand_2
MyString operand_3
MyString operand_4
MyString workable_string
bool op1_finished
bool op2_finished
bool op3_finished
bool op4_finished
int error_1
int error_2
int error_3


Constructor & Destructor Documentation

Line::Line  ) 
 

Basic Constructor.

This constructor initiallizes an empty, unedited line. All of the fields are initiallized accordingly.

Line::Line MyString  copy  ) 
 

Constructor with initial line sent in.

This constructor takes in a MyString which holds the unedited contents of the line (

Parameters:
copy). Everything else is initiallized.

Line::Line MyString  copy,
int  number
 

Constructor with initial line sent in.

This constructor takes in a MyString which holds the unedited contents of the line (param copy) and a line number to be fixed with this line (

Parameters:
number). Everything else is initiallized.


Member Function Documentation

bool Line::All_Ops_Finished  ) 
 

void Line::analyzeOperand MyString operand,
MyString type,
bool &  doneFlag
[private]
 

A function variable Temporarily stores the operand input so that it can be edited to test for an immediate value.A function variableA function variableA function variable The value we have calculated so far from the operand. If a number is read successfully, this will be converted into little endian hex. A function variable The last character of the operand input. A function variable Keeps track of whether there has been an illegal character in the input, when reading for immediate. A function variable Keeps track of the current Byte's decimal value. A function variable The current Byte's hex value. Needed as an intermediate step between the decimal value and the operand output.A function variable Temporary Mystring ValueA function variable Temporarily stores a value returned from the symbol table. A function variable Temporarily stores the usage of the label, so that we know whether is is MEM32 or IMM32.

Holds all possible hex values so that the pointer characters can be validated.

Holds 0 so that I can use the MyString append operation.

bool Line::checkLabel MyString inLabel  )  [private]
 

bool Line::Op1_Finished  ) 
 

bool Line::Op2_Finished  ) 
 

bool Line::Op3_Finished  ) 
 

bool Line::Op4_Finished  ) 
 

void Line::operator= Line toCopy  ) 
 

void Line::Parse_Quotes  )  [private]
 

void Line::Pass_One  ) 
 

Makes the Line run pass one on itself.

This runs the various methods which parse and tokenize the line. It gets as much of the opcode finished as possible, and sets booleans to mark how much still needs to be done. It also changes other variables to match the post-pass one state of the Line.

void Line::Pass_Two  ) 
 

Makes the Line run pass two on itself.

This runs the various methods which finalize the line and outputs it to an object file. It also changes other variables to match the post-pass two state of the Line.

long long Line::pow int  x,
int  y
[private]
 

void Line::removeWhiteSpace MyString instring  )  [private]
 

bool Line::removeWord MyString instring,
MyString word,
char  ch
[private]
 

int Line::Ret_Add_Count  ) 
 

int Line::Ret_Command_Size  ) 
 

int Line::Ret_Err1  ) 
 

int Line::Ret_Err2  ) 
 

int Line::Ret_Err3  ) 
 

bool Line::Ret_If_Op  ) 
 

Returns if the line is an operation.

This function returns true if the Line is an operation. A return of false implies a derictive or an empty Line.

char* Line::Ret_Label  ) 
 

Returns the label of the Line.

This function returns the label of the Line in the form of a character string. This can be caught by a MyString by using the = operator.

char* Line::Ret_Line  ) 
 

Returns the original contents of the Line.

This function returns the original Line (or in the case is has been copied from another Line, the copied original Line) in the form of a character string. This can be caught by a MyString by using the = operator.

void Line::Ret_Opcode MyString store  ) 
 

void Line::Ret_Operand1 MyString store  ) 
 

void Line::Ret_Operand2 MyString store  ) 
 

void Line::Ret_Operand3 MyString store  ) 
 

void Line::Ret_Operand4 MyString store  ) 
 

void Line::Set_Counter int  set  ) 
 

Allows the user to set the address of the line.

This procedure takes an integer (

Parameters:
set). It then sets the address of this line to that number. This is useful for giving labels addresses.

void Line::Set_Error int  num  ) 
 

void Line::to_hex char  ch,
MyString returned_string
[private]
 


Member Data Documentation

int Line::address_counter [private]
 

int Line::command_size [private]
 

int Line::error_1 [private]
 

int Line::error_2 [private]
 

int Line::error_3 [private]
 

MyString Line::label [private]
 

int Line::line_number [private]
 

bool Line::op1_finished [private]
 

bool Line::op2_finished [private]
 

bool Line::op3_finished [private]
 

bool Line::op4_finished [private]
 

bool Line::op_or_dir [private]
 

MyString Line::opcode [private]
 

MyString Line::operand_1 [private]
 

MyString Line::operand_2 [private]
 

MyString Line::operand_3 [private]
 

MyString Line::operand_4 [private]
 

MyString Line::original [private]
 

MyString Line::workable_string [private]
 


The documentation for this class was generated from the following file:
Generated on Sat Apr 15 17:33:29 2006 for 560 by  doxygen 1.4.6-NO