platypus
Class GID

java.lang.Object
  extended by platypus.GID

public class GID
extends java.lang.Object

GID is the Global Input-file Data class. It contains properties relating to the input file. Implemented using the Singleton pattern because it is a one-time global item.

Author:
alb

Field Summary
private  ReadLine currLine
           
private  Infile infile
           
private static GID thisInstance
          fields and functions needed for instantiation of singleton
private  Tokens tokens
           
 
Constructor Summary
private GID()
           
 
Method Summary
 void FTOsetCurr(ReadLine newRL)
          This function is FTO because and not used in production code because GID only has the one currLine.
 ReadLine getCurrLine()
          Returns the current line
 Infile getInfile()
           
static GID getInstance()
          The function used by singleton pattern to return handle to this class
 Tokens getTokens()
           
 void initialize()
          mostly used in testing to put GID back into a known state.
 void setInfile(Infile newInfile)
           
 void setTokens(Tokens newTokens)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

infile

private Infile infile

currLine

private ReadLine currLine

tokens

private Tokens tokens

thisInstance

private static final GID thisInstance
fields and functions needed for instantiation of singleton

Constructor Detail

GID

private GID()
Method Detail

getInstance

public static GID getInstance()
The function used by singleton pattern to return handle to this class

Returns:
handle to this instance of GID class

initialize

public void initialize()
mostly used in testing to put GID back into a known state.


getCurrLine

public ReadLine getCurrLine()
Returns the current line

Returns:
currLine the current line

getInfile

public Infile getInfile()

setInfile

public void setInfile(Infile newInfile)

getTokens

public Tokens getTokens()

setTokens

public void setTokens(Tokens newTokens)

FTOsetCurr

public void FTOsetCurr(ReadLine newRL)
This function is FTO because and not used in production code because GID only has the one currLine. The contents of that currLine is changed by setters in ReadLine, rather than by being reset here. This is probably not good OOD and, after careful thought, should probably be changed.

Parameters:
newRL - the new ReadLine to replace currLine


Copyright © 2006-7 Pacific Data Works LLC