All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pointer.Pointer

java.lang.Object
   |
   +----pointer.Pointer

public abstract class Pointer
extends Object
implements Parsable
A Pointer is an object that contains just a single public variable, val. Since that variable can be changed, it acts like a pointer to the variable in languages such as C.

This code is (c) 1996 Leemon Baird <leemon@cs.cmu.edu>, http://www.cs.cmu.edu/~baird
The source and object code may be redistributed freely. If the code is modified, please state so in the comments.

Version:
1.2, 23 May 97
Author:
Leemon Baird

Constructor Index

 o Pointer()

Method Index

 o BNF(int)
 o clone()
Create a new object of the same type with the same value
 o copyInto(Pointer)
Copy the value of this object into another of the same type
 o equalVal(Pointer)
Does this pointer and the other have the same value? Different types , such as (int)3 and (long)3 are defined to have different values.
 o getParameters(int)
Return a parameter array if BNF(), parse(), and unparse() are to be automated, null otherwise.
 o initialize(int)
Initialize, either partially or completely.
 o parse(Parser, int)
Parse the input file to get the parameters for this object.
 o toDouble()
If a pointer to a numeric type, convert the .val field to a double, else just return 0.
 o unparse(Unparser, int)
Output a description of this object that can be parsed with parse().

Constructors

 o Pointer
 public Pointer()

Methods

 o clone
 public abstract Object clone()
Create a new object of the same type with the same value

Overrides:
clone in class Object
 o copyInto
 public abstract void copyInto(Pointer obj)
Copy the value of this object into another of the same type

 o toDouble
 public abstract double toDouble()
If a pointer to a numeric type, convert the .val field to a double, else just return 0.

 o equalVal
 public abstract boolean equalVal(Pointer obj)
Does this pointer and the other have the same value? Different types , such as (int)3 and (long)3 are defined to have different values.

 o getParameters
 public Object[][] getParameters(int lang)
Return a parameter array if BNF(), parse(), and unparse() are to be automated, null otherwise.

See Also:
getParameters
 o BNF
 public String BNF(int lang)
 o unparse
 public void unparse(Unparser u,
                     int lang)
Output a description of this object that can be parsed with parse().

 o parse
 public Object parse(Parser p,
                     int lang) throws ParserException
Parse the input file to get the parameters for this object.

Throws: ParserException
parser didn't find the required token
 o initialize
 public void initialize(int level)
Initialize, either partially or completely.

See Also:
initialize

All Packages  Class Hierarchy  This Package  Previous  Next  Index