codesimian
Class Ptr

java.lang.Object
  extended by codesimian.CS
      extended by codesimian.DefaultCS
          extended by codesimian.Ptr
All Implemented Interfaces:
CodeSimian, java.io.Serializable
Direct Known Subclasses:
Ptr.FieldPtr, Ptr.IndividualPtrs, Ptr.Null, Ptr.ParamPtr, Ptr.PtrSet

public abstract class Ptr
extends DefaultCS

Pointer. Inner subclasses are POINTERS to different types of things, including java Field's and parameters of CS's. All pointers can return their value as a CS or set their value to (some interpretation of) a CS.

Unless otherwise specified, P() and setP() ignore their index parameter.

To get or set the value at the address pointed to, use P(0) and setP(0). For efficiency, the param index is ignored in the default implementation of those functions. P(x) and setP(x) work, for any x.

Default: DForProxy() returns the value pointed to.

See Also:
Serialized Form

Nested Class Summary
static class Ptr.FieldPtr
           
static class Ptr.IndividualPtrs
          A set of individual POINTERs.
static class Ptr.Null
          Null pointer.
static class Ptr.ParamPtr
          allows you to get/set a param of some parent CS with a specific child index.
static class Ptr.PtrSet
          A set of POINTERs.
 
Field Summary
 
Fields inherited from class codesimian.CS
DESCRIPTION, END, EXECPROXY, FUEL, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER
 
Constructor Summary
Ptr()
           
 
Method Summary
 double DForProxy()
          returns the value pointed to, P(0).D()
 int minP()
          For DForProxy().
Minimum number of parameters in param[] needed to call DForProxy().
Defines which indexs of param[] DForProxy() can use.
Functions with a different number of parameters must override this.
OVERRIDE THIS FUNCTION IF EXEC USES A DIFFERENT NUMBER OF PARAMETERS.
Default is 1.
 
Methods inherited from class codesimian.DefaultCS
B, C, countP, decrementMyFuel, deleteP, description, F, fuel, getExec, getObject, heap, I, indexP, indexPName, insertB, insertC, insertD, insertF, insertI, insertJ, insertL, insertL, insertL1, insertP, insertS, insertZ, J, javaCode, keyword, LForProxy, LForProxy, myFuel, name, newInstance, objectToCS, objectToCSArray, objectToCSArray, P, prevD, prevL, PType, S, setB, setC, setCountP, setD, setD, setExec, setF, setFuel, setI, setJ, setL, setL, setL, setL1, setMyFuel, setName, setObject, setP, setPrevExec, setS, setZ, start, toString, V, Z
 
Methods inherited from class codesimian.CS
addP, addP, addP, addP, addP, BForProxy, CForProxy, clone, cost, D, deleteP, FForProxy, IForProxy, isIllusion, javaCode, JForProxy, L, L, L, L, L, maxD, maxP, minD, overwrites, parent, parsePriority, PB, PC, PD, PF, PI, PJ, PL, prevB, prevC, prevF, prevI, prevJ, prevS, prevZ, proxyOf, PS, PZ, reflect, reflect, setB, setC, setCost, setDescription, setF, setHeap, setI, setJ, setL, setL, setParent, setParsePriority, setProxyOf, setPType, setS, setTester, setZ, SForProxy, tester, VForProxy, voidReflect, ZForProxy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Ptr

public Ptr()
Method Detail

DForProxy

public double DForProxy()
returns the value pointed to, P(0).D()

Specified by:
DForProxy in class DefaultCS

minP

public int minP()
Description copied from class: DefaultCS
For DForProxy().
Minimum number of parameters in param[] needed to call DForProxy().
Defines which indexs of param[] DForProxy() can use.
Functions with a different number of parameters must override this.
OVERRIDE THIS FUNCTION IF EXEC USES A DIFFERENT NUMBER OF PARAMETERS.
Default is 1.

Overrides:
minP in class DefaultCS