org.jclarion.clarion.runtime
Class CMemory

java.lang.Object
  extended by org.jclarion.clarion.runtime.CMemory

public class CMemory
extends java.lang.Object


Constructor Summary
CMemory()
           
 
Method Summary
static int address(java.lang.Object o)
          Return address reference for specified object
static int address(java.lang.Object[] o)
          Return address reference for specified array object
static java.lang.Object castTo(ClarionMemoryModel mode, java.lang.Class<? extends ClarionMemoryModel> clazz)
           
static void clear(java.lang.Object o)
          Generic empty object
static int getAddressPrototype(java.lang.String prototype)
          Return address reference for specified protoype No way this could ever work.
static java.lang.Object getPrototype(java.lang.Object clazz, java.lang.String method)
          Return object representing prototype for class
static int instance(java.lang.Object o, java.lang.Integer thread)
           
static int peek(ClarionObject o, int offset)
          Direct memory access
static void poke(ClarionObject o, ClarionObject val)
          Direct memory access
static java.lang.Object resolveAddress(int o)
          Convert address id into an object
static int size(ClarionMemoryModel o)
          Return memory footprint size of supplied object
static int tie(java.lang.String key, int index, int value)
          Tie integer to index/key pair
static int tied(java.lang.String key, int index)
          return integer tied to key+index pair
static void untie(java.lang.String key, int index)
          untie key+index pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMemory

public CMemory()
Method Detail

castTo

public static java.lang.Object castTo(ClarionMemoryModel mode,
                                      java.lang.Class<? extends ClarionMemoryModel> clazz)

clear

public static void clear(java.lang.Object o)
Generic empty object

Parameters:
o -

size

public static int size(ClarionMemoryModel o)
Return memory footprint size of supplied object

Parameters:
o -
Returns:

instance

public static int instance(java.lang.Object o,
                           java.lang.Integer thread)

address

public static int address(java.lang.Object o)
Return address reference for specified object

Parameters:
o -
Returns:

address

public static int address(java.lang.Object[] o)
Return address reference for specified array object

Parameters:
o -
Returns:

getAddressPrototype

public static int getAddressPrototype(java.lang.String prototype)
Return address reference for specified protoype No way this could ever work. Lets see if any code ever tries to call it and see what we can do from there

Parameters:
o -
Returns:

getPrototype

public static java.lang.Object getPrototype(java.lang.Object clazz,
                                            java.lang.String method)
Return object representing prototype for class

Parameters:
clazz -
method -
Returns:

resolveAddress

public static java.lang.Object resolveAddress(int o)
Convert address id into an object

Parameters:
o -
Returns:

tied

public static int tied(java.lang.String key,
                       int index)
return integer tied to key+index pair

Parameters:
key -
index -
Returns:

tie

public static int tie(java.lang.String key,
                      int index,
                      int value)
Tie integer to index/key pair

Parameters:
key -
index -
value -

untie

public static void untie(java.lang.String key,
                         int index)
untie key+index pair

Parameters:
key -
index -

peek

public static int peek(ClarionObject o,
                       int offset)
Direct memory access

Parameters:
o -
offset -
Returns:

poke

public static void poke(ClarionObject o,
                        ClarionObject val)
Direct memory access

Parameters:
o -
offset -


Copyright © 2010. All Rights Reserved.