Package ptolemy.domains.taskpt.kernel
Class PtrToken
- java.lang.Object
-
- ptolemy.data.Token
-
- ptolemy.domains.taskpt.kernel.PtrToken
-
public class PtrToken extends Token
A Token that represents a pointer to an address in memory. In addition the token has a size that specifies the size of the array in memory.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Bastian Ristau
- Pt.AcceptedRating:
- red (ristau)
- Pt.ProposedRating:
- red (ristau)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAddress()
Get the address in memory this token is pointing to.int
getSize()
Get the size of the array in memory this token is pointing to.void
setAddress(int addr)
Set the address in memory this token should point to.void
setSize(int size)
Set the size of the array in memory this token is pointing to.-
Methods inherited from class ptolemy.data.Token
add, addReverse, divide, divideReverse, getType, isCloseTo, isCloseTo, isEqualTo, isNil, modulo, moduloReverse, multiply, multiplyReverse, notSupportedConversionMessage, notSupportedIncomparableConversionMessage, notSupportedIncomparableMessage, notSupportedMessage, notSupportedNullNilStringMessage, one, pow, subtract, subtractReverse, toString, zero, zeroReturnType
-
-
-
-
Constructor Detail
-
PtrToken
public PtrToken()
Create a Token.
-
PtrToken
public PtrToken(int addr, int size)
Create a Token with an initial address and an initial size.- Parameters:
addr
- The address in the memory that this token is pointing to.size
- The size of the array in the memory that this token is pointing to.
-
-
Method Detail
-
getAddress
public int getAddress()
Get the address in memory this token is pointing to. Do not check, if there actually is something at that memory address.- Returns:
- The address in memory this token is pointing to.
- See Also:
setAddress(int)
-
getSize
public int getSize()
Get the size of the array in memory this token is pointing to. Do not check, if the array in the memory is of that size.- Returns:
- The size of the array in memory this token is pointing to.
- See Also:
setSize(int)
-
setAddress
public void setAddress(int addr)
Set the address in memory this token should point to. Do not change the position of the array in the memory.- Parameters:
addr
- The address in memory this token should point to.- See Also:
getAddress()
-
setSize
public void setSize(int size)
Set the size of the array in memory this token is pointing to. Do not change the actual content or size of the memory nor the array in the memory.- Parameters:
size
- The size of the array in memory this token is pointing to.- See Also:
getSize()
-
-