|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
iSharedVariable implements a refcounted value which can be shared across many objects and updated efficiently.
Field Summary | |
static int |
SV_COLOR
Possible types stored by this class |
static int |
SV_FLOAT
Possible types stored by this class |
static int |
SV_UNKNOWN
Possible types stored by this class |
static int |
SV_VECTOR
Possible types stored by this class |
Method Summary | |
void |
addListener(iSharedVariableListener listener)
Add a listener to variables. |
float |
get()
Get the floating point version of the var value. |
csColor |
getColor()
Get the csColor from the variable. |
java.lang.String |
getName()
Get the name of this variable. |
int |
getType()
Get the type currently stored by this variable. |
csVector3 |
getVector()
Get the vector from the variable. |
iObject |
queryObject()
Get the private object interface. |
void |
removeListener(iSharedVariableListener listener)
Remove a listener. |
void |
set(float val)
Set the variable to a floating pt value. |
void |
setColor(csColor col)
Set the variable to store a csColor. |
void |
setName(java.lang.String name)
iSharedVariables are referenced by name. |
void |
setVector(csVector3 v)
Set the variable to store a csVector3. |
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase |
decRef, getRefCount, getVersion, incRef, queryInterface, queryInterfaceSafe |
Methods inherited from interface crystalspace.jbind.interfaces.iPointer |
changePointer, getPointer, isMemoryOwner, setMemoryOwner |
Field Detail |
public static final int SV_UNKNOWN
public static final int SV_FLOAT
public static final int SV_COLOR
public static final int SV_VECTOR
Method Detail |
public void addListener(iSharedVariableListener listener)
listener
- public float get()
public csColor getColor()
public java.lang.String getName()
getName
in interface iBase
iBase.getName()
public int getType()
public csVector3 getVector()
public iObject queryObject()
public void removeListener(iSharedVariableListener listener)
listener
- public void set(float val)
val
- public void setColor(csColor col)
col
- public void setName(java.lang.String name)
name
- public void setVector(csVector3 v)
v
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |