org.jclarion.clarion.runtime
Class CRun

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

public class CRun
extends java.lang.Object


Constructor Summary
CRun()
           
 
Method Summary
static void _assert(boolean assertion)
          Clarion assertion test
static void _assert(boolean assertion, java.lang.String msg)
           
static void addInitThreadHook(java.lang.Runnable r)
           
static void addShutdownHook(java.lang.Runnable r)
           
static int call(java.lang.String dll, java.lang.String function, java.lang.Integer params)
           
static ClarionNumber choose(boolean bool)
          Return 1 or 0 based on condition
static ClarionObject choose(boolean aBool, ClarionObject o1, ClarionObject o2)
          Retrun either first or second based on condition
static ClarionObject choose(int i, ClarionObject[] objs)
          return matching object
static ClarionString command(java.lang.String string)
          Get command line argument
static java.lang.String getDBDescription(ClarionString source)
           
static java.lang.String getSystemDescription()
           
static java.lang.Thread getThread(int id)
           
static int getThreadID()
          Get current thread ID
static void halt(java.lang.Integer i, java.lang.String message)
          Halt program
static void init(java.lang.String[] args)
          Initialise runtime environment with passed command line args
static void initThread()
           
static ClarionNumber inlist(java.lang.String s, ClarionString[] objs)
          Return first match of specified value
static boolean inRange(ClarionObject o, ClarionObject lower, ClarionObject upper)
          Return true if object is between lower and upper
static int random(int lo, int hi)
           
static void removeShutdownHook(java.lang.Runnable r)
           
static void setHardAssert(boolean hard)
           
static void shutdown()
           
static java.lang.Thread start(java.lang.Runnable r)
          Start new thread
static void stop(java.lang.String message)
          Stop program
static void yield()
          Yield to other running threads
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRun

public CRun()
Method Detail

getSystemDescription

public static java.lang.String getSystemDescription()

getDBDescription

public static java.lang.String getDBDescription(ClarionString source)

random

public static int random(int lo,
                         int hi)

shutdown

public static void shutdown()

addInitThreadHook

public static void addInitThreadHook(java.lang.Runnable r)

initThread

public static void initThread()

addShutdownHook

public static void addShutdownHook(java.lang.Runnable r)

removeShutdownHook

public static void removeShutdownHook(java.lang.Runnable r)

init

public static void init(java.lang.String[] args)
Initialise runtime environment with passed command line args

Parameters:
args -

command

public static ClarionString command(java.lang.String string)
Get command line argument

Parameters:
string -
Returns:

setHardAssert

public static void setHardAssert(boolean hard)

_assert

public static void _assert(boolean assertion)
Clarion assertion test

Parameters:
assertion -

_assert

public static void _assert(boolean assertion,
                           java.lang.String msg)

halt

public static void halt(java.lang.Integer i,
                        java.lang.String message)
Halt program

Parameters:
i -
message -

stop

public static void stop(java.lang.String message)
Stop program

Parameters:
message -

inlist

public static ClarionNumber inlist(java.lang.String s,
                                   ClarionString[] objs)
Return first match of specified value

Parameters:
s -
objs -
Returns:

choose

public static ClarionObject choose(int i,
                                   ClarionObject[] objs)
return matching object

Parameters:
i -
objs -
Returns:

choose

public static ClarionObject choose(boolean aBool,
                                   ClarionObject o1,
                                   ClarionObject o2)
Retrun either first or second based on condition

Parameters:
aBool -
o1 -
o2 -
Returns:

choose

public static ClarionNumber choose(boolean bool)
Return 1 or 0 based on condition

Parameters:
bool -
Returns:

getThreadID

public static int getThreadID()
Get current thread ID

Returns:

getThread

public static java.lang.Thread getThread(int id)

inRange

public static boolean inRange(ClarionObject o,
                              ClarionObject lower,
                              ClarionObject upper)
Return true if object is between lower and upper

Parameters:
o -
lower -
upper -
Returns:

start

public static java.lang.Thread start(java.lang.Runnable r)
Start new thread

Parameters:
r -

yield

public static void yield()
Yield to other running threads


call

public static int call(java.lang.String dll,
                       java.lang.String function,
                       java.lang.Integer params)


Copyright © 2010. All Rights Reserved.