| 
 | Algernon Software | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.algernon.aam.register.GeneralRegister
This class represents a RegisterSet in the AAM. It contains the registers, memory and code.
| Field Summary | |
| protected  Algernon | f_algy | 
| protected  Jatha | f_lisp | 
| protected  Processor | f_processor | 
| protected  String | m_name | 
| protected  Processor | m_processor | 
| protected  RegisterSet | m_registerSet | 
| protected  LispValue | m_value | 
| Constructor Summary | |
| GeneralRegister(Processor processor,
                String name,
                RegisterSet registerSet)Creates a new general-purpose AAM register. | |
| Method Summary | |
|  LispValue | append(LispValue newValue)Appends the given value onto the end of the register. | 
|  void | clear()Initializes the register contents to NIL. | 
|  LispValue | getEntry(int index)Return the nth entry in the given register, where the topmost item is entry number zero. | 
|  String | getName()Returns the name of this Register. | 
|  RegisterSet | getRegisterSet()Returns the RegisterSet this Register belongs to. | 
|  LispValue | getValue()Return the value of the given register. | 
|  LispValue | pop()Pops the register and returns the popped entry. | 
|  LispValue | push(LispValue newValue)Pushes the given value onto the register. | 
|  void | setName(String newName)Sets the name of this Register. | 
|  void | setRegisterSet(RegisterSet set)Sets the RegisterSet this Register belongs to. | 
|  LispValue | setValue(LispValue newValue)Sets the value of the given register. | 
|  long | size()Returns the number of values in this register. | 
|  String | toString()Displays the register name and its contents. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
protected Processor m_processor
protected String m_name
protected RegisterSet m_registerSet
protected LispValue m_value
protected Algernon f_algy
protected Processor f_processor
protected Jatha f_lisp
| Constructor Detail | 
public GeneralRegister(Processor processor,
                       String name,
                       RegisterSet registerSet)
| Method Detail | 
public String getName()
Register
getName in interface Registerpublic void setName(String newName)
Register
setName in interface Registerpublic RegisterSet getRegisterSet()
Register
getRegisterSet in interface Registerpublic void setRegisterSet(RegisterSet set)
Register
setRegisterSet in interface Registerpublic LispValue getValue()
getValue in interface Register
public LispValue setValue(LispValue newValue)
                   throws AlgernonDataException
setValue in interface RegisterAlgernonDataExceptionpublic LispValue getEntry(int index)
getEntry in interface Registerpublic LispValue pop()
pop in interface Registerpublic LispValue push(LispValue newValue)
push in interface Registerpublic LispValue append(LispValue newValue)
append in interface Registerpublic long size()
size in interface Registerpublic void clear()
clear in interface Registerpublic String toString()
| 
 | Algernon Software | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||