crystalspace.jbind.interfaces.iengine.sharevar
Interface iSharedVariable

All Superinterfaces:
iBase, iPointer
All Known Implementing Classes:
csSharedVariable

public interface iSharedVariable
extends iBase

iSharedVariable implements a refcounted value which can be shared across many objects and updated efficiently.

Author:
java wrapper - Quentin Anciaux, c++ version - http://crystal.sourceforge.net/docs/online/devapi/structiSharedVariable.php

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

SV_UNKNOWN

public static final int SV_UNKNOWN
Possible types stored by this class

See Also:
Constant Field Values

SV_FLOAT

public static final int SV_FLOAT
Possible types stored by this class

See Also:
Constant Field Values

SV_COLOR

public static final int SV_COLOR
Possible types stored by this class

See Also:
Constant Field Values

SV_VECTOR

public static final int SV_VECTOR
Possible types stored by this class

See Also:
Constant Field Values
Method Detail

addListener

public void addListener(iSharedVariableListener listener)
Add a listener to variables.

Parameters:
listener -

get

public float get()
Get the floating point version of the var value. Referenced by csSpriteLODListener::VariableChanged();, and csLODListener::VariableChanged();.

Returns:

getColor

public csColor getColor()
Get the csColor from the variable.

Returns:

getName

public java.lang.String getName()
Get the name of this variable.

Specified by:
getName in interface iBase
Returns:
See Also:
iBase.getName()

getType

public int getType()
Get the type currently stored by this variable.

Returns:

getVector

public csVector3 getVector()
Get the vector from the variable.

Returns:

queryObject

public iObject queryObject()
Get the private object interface.

Returns:

removeListener

public void removeListener(iSharedVariableListener listener)
Remove a listener.

Parameters:
listener -

set

public void set(float val)
Set the variable to a floating pt value.

Parameters:
val -

setColor

public void setColor(csColor col)
Set the variable to store a csColor.

Parameters:
col -

setName

public void setName(java.lang.String name)
iSharedVariables are referenced by name. Here is where you set it.

Parameters:
name -

setVector

public void setVector(csVector3 v)
Set the variable to store a csVector3.

Parameters:
v -