Bayonne2 / Common C++ 2 Framework
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Static Protected Attributes
ost::ScriptRegistry Class Reference

This class is used for registering scripts with an external registry. More...

#include <script3.h>

Inheritance diagram for ost::ScriptRegistry:
Inheritance graph
[legend]
Collaboration diagram for ost::ScriptRegistry:
Collaboration graph
[legend]

Public Types

enum  scrAccess {
  scrPUBLIC, scrPROTECTED, scrPRIVATE, scrFUNCTION,
  scrLOCAL
}
 
typedef enum scrAccess scrAccess
 
enum  symType {
  symNORMAL = 0, symCONST, symDYNAMIC, symFIFO,
  symSEQUENCE, symSTACK, symCOUNTER, symPOINTER,
  symREF, symARRAY, symASSOC, symINITIAL,
  symNUMBER, symLOCK, symPROPERTY, symORIGINAL,
  symMODIFIED, symTIMER, symBOOL
}
 
typedef enum symType symType
 
typedef bool(ScriptInterp::* Method )(void)
 
typedef const char
*(ScriptCommand::* 
Check )(Line *line, ScriptImage *img)
 
typedef bool(* Cond )(ScriptInterp *interp, const char *v)
 
typedef long(* Function )(long *args, unsigned prec)
 
typedef const char *(* Meta )(ScriptInterp *interp, const char *token)
 
typedef const char *(* Parse )(ScriptCompiler *img, const char *token)
 
typedef void(* Init )(void)
 
typedef struct ost::Script::_symbol Symbol
 
typedef struct ost::Script::_array Array
 

Public Member Functions

void setTimer (timeout_t timeout=0)
 Set a new start time for the object based on when this call is made and optionally activate the timer for a specified number of milliseconds. More...
 
void incTimer (timeout_t timeout)
 Set a timeout based on the current time reference value either from object creation or the last setTimer(). More...
 
void decTimer (timeout_t timeout)
 Adjust a timeout based on the current time reference value either from object creation or the last setTimer(). More...
 
void sleepTimer (void)
 Sleep until the current timer expires. More...
 
void endTimer (void)
 This is used to "disable" the service thread from expiring the timer object. More...
 
timeout_t getTimer (void) const
 This is used by service threads to determine how much time remains before the timer expires based on a timeout specified in setTimer() or incTimer(). More...
 
timeout_t getElapsed (void) const
 This is used to determine how much time has elapsed since a timer port setTimer benchmark time was initially set. More...
 

Static Public Member Functions

static bool isScript (Name *scr)
 
static bool isSymbol (const char *id)
 
static bool use (const char *name)
 
static unsigned getIndex (const char *id)
 
static Symbolderef (Symbol *sym)
 
static bool commit (Symbol *sym, const char *value)
 
static bool append (Symbol *sym, const char *value)
 
static bool symindex (Symbol *sym, short offset)
 
static const char * extract (Symbol *sym)
 
static unsigned count (Symbol *sym)
 
static unsigned storage (Symbol *sym)
 
static void clear (Symbol *sym)
 
static void addFunction (const char *name, unsigned count, Function i)
 
static void addConditional (const char *name, Cond test)
 
static bool isPrivate (Name *scr)
 
static bool isFunction (Name *scr)
 

Data Fields

const char * protocol
 
timeout_t duration
 
Namescr
 
Lineline
 
class __EXPORT Line
 
class __EXPORT Name
 

Static Public Attributes

static bool fastStart
 
static bool useBigmem
 
static unsigned fastStepping
 
static unsigned autoStepping
 
static size_t pagesize
 
static unsigned symsize
 
static unsigned symlimit
 
static char decimal
 
static bool use_definitions
 
static bool use_macros
 
static bool use_prefix
 
static bool use_merge
 
static bool use_funcs
 
static const char * plugins
 
static const char * altplugins
 
static const char * access_user
 
static const char * access_pass
 
static const char * access_host
 
static bool exec_funcs
 
static const char * exec_extensions
 
static const char * exec_token
 
static const char * exec_prefix
 
static const char * exit_token
 
static const char * apps_extensions
 
static const char * apps_prefix
 
static const char * etc_prefix
 
static const char * var_prefix
 
static const char * log_prefix
 

Static Protected Attributes

static Testtest
 
static Funifun
 

Detailed Description

This class is used for registering scripts with an external registry.

Sometimes this is used as a base class for a more complete one.

Author
David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m Registry for script objects.

Definition at line 1676 of file script3.h.

Member Typedef Documentation

typedef struct ost::Script::_array ost::Script::Array
inherited
typedef const char*(ScriptCommand::* ost::Script::Check)(Line *line, ScriptImage *img)
inherited

Definition at line 106 of file script3.h.

typedef bool(* ost::Script::Cond)(ScriptInterp *interp, const char *v)
inherited

Definition at line 107 of file script3.h.

typedef long(* ost::Script::Function)(long *args, unsigned prec)
inherited

Definition at line 108 of file script3.h.

typedef void(* ost::Script::Init)(void)
inherited

Definition at line 111 of file script3.h.

typedef const char*(* ost::Script::Meta)(ScriptInterp *interp, const char *token)
inherited

Definition at line 109 of file script3.h.

typedef bool(ScriptInterp::* ost::Script::Method)(void)
inherited

Definition at line 105 of file script3.h.

typedef const char*(* ost::Script::Parse)(ScriptCompiler *img, const char *token)
inherited

Definition at line 110 of file script3.h.

typedef enum scrAccess ost::Script::scrAccess
inherited

Definition at line 121 of file script3.h.

typedef struct ost::Script::_symbol ost::Script::Symbol
inherited
typedef enum symType ost::Script::symType
inherited

Definition at line 145 of file script3.h.

Member Enumeration Documentation

enum ost::Script::scrAccess
inherited
Enumerator
scrPUBLIC 
scrPROTECTED 
scrPRIVATE 
scrFUNCTION 
scrLOCAL 

Definition at line 113 of file script3.h.

enum ost::Script::symType
inherited
Enumerator
symNORMAL 
symCONST 
symDYNAMIC 
symFIFO 
symSEQUENCE 
symSTACK 
symCOUNTER 
symPOINTER 
symREF 
symARRAY 
symASSOC 
symINITIAL 
symNUMBER 
symLOCK 
symPROPERTY 
symORIGINAL 
symMODIFIED 
symTIMER 
symBOOL 

Definition at line 123 of file script3.h.

Member Function Documentation

static void ost::Script::addConditional ( const char *  name,
Cond  test 
)
staticinherited
static void ost::Script::addFunction ( const char *  name,
unsigned  count,
Function  i 
)
staticinherited
static bool ost::Script::append ( Symbol sym,
const char *  value 
)
staticinherited
static void ost::Script::clear ( Symbol sym)
staticinherited
static bool ost::Script::commit ( Symbol sym,
const char *  value 
)
staticinherited
static unsigned ost::Script::count ( Symbol sym)
staticinherited
void TimerPort::decTimer ( timeout_t  timeout)
inherited

Adjust a timeout based on the current time reference value either from object creation or the last setTimer().

This reference can be used to time synchronize realtime data over specified intervals and force expiration when a new frame should be released in a synchronized manner.

Parameters
timeoutdelay in milliseconds from reference.
static Symbol* ost::Script::deref ( Symbol sym)
staticinherited
void TimerPort::endTimer ( void  )
inherited

This is used to "disable" the service thread from expiring the timer object.

It does not effect the reference time from either creation or a setTimer().

static const char* ost::Script::extract ( Symbol sym)
staticinherited
timeout_t TimerPort::getElapsed ( void  ) const
inherited

This is used to determine how much time has elapsed since a timer port setTimer benchmark time was initially set.

This allows one to use setTimer() to set the timer to the current time and then measure elapsed time from that point forward.

return time elapsed in milliseconds, or TIMEOUT_INF if inactive.

static unsigned ost::Script::getIndex ( const char *  id)
staticinherited
timeout_t TimerPort::getTimer ( void  ) const
inherited

This is used by service threads to determine how much time remains before the timer expires based on a timeout specified in setTimer() or incTimer().

It can also be called after setting a timeout with incTimer() to see if the current timeout has already expired and hence that the application is already delayed and should skip frame(s).

return time remaining in milliseconds, or TIMEOUT_INF if inactive.

void TimerPort::incTimer ( timeout_t  timeout)
inherited

Set a timeout based on the current time reference value either from object creation or the last setTimer().

This reference can be used to time synchronize realtime data over specified intervals and force expiration when a new frame should be released in a synchronized manner.

Parameters
timeoutdelay in milliseconds from reference.
static bool ost::Script::isFunction ( Name scr)
staticinherited
static bool ost::Script::isPrivate ( Name scr)
staticinherited
static bool ost::Script::isScript ( Name scr)
staticinherited
static bool ost::Script::isSymbol ( const char *  id)
staticinherited
void TimerPort::setTimer ( timeout_t  timeout = 0)
inherited

Set a new start time for the object based on when this call is made and optionally activate the timer for a specified number of milliseconds.

This can be used to set the starting time of a realtime session.

Parameters
timeoutdelay in milliseconds from "now"
void TimerPort::sleepTimer ( void  )
inherited

Sleep until the current timer expires.

This is useful in time syncing realtime periodic tasks.

static unsigned ost::Script::storage ( Symbol sym)
staticinherited
static bool ost::Script::symindex ( Symbol sym,
short  offset 
)
staticinherited
static bool ost::Script::use ( const char *  name)
staticinherited

Field Documentation

const char* ost::Script::access_host
staticinherited

Definition at line 285 of file script3.h.

const char* ost::Script::access_pass
staticinherited

Definition at line 284 of file script3.h.

const char* ost::Script::access_user
staticinherited

Definition at line 283 of file script3.h.

const char* ost::Script::altplugins
staticinherited

Definition at line 282 of file script3.h.

const char* ost::Script::apps_extensions
staticinherited

Definition at line 291 of file script3.h.

const char* ost::Script::apps_prefix
staticinherited

Definition at line 292 of file script3.h.

unsigned ost::Script::autoStepping
staticinherited

Definition at line 258 of file script3.h.

char ost::Script::decimal
staticinherited

Definition at line 275 of file script3.h.

timeout_t ost::ScriptRegistry::duration

Definition at line 1680 of file script3.h.

const char* ost::Script::etc_prefix
staticinherited

Definition at line 294 of file script3.h.

const char* ost::Script::exec_extensions
staticinherited

Definition at line 287 of file script3.h.

bool ost::Script::exec_funcs
staticinherited

Definition at line 286 of file script3.h.

const char* ost::Script::exec_prefix
staticinherited

Definition at line 289 of file script3.h.

const char* ost::Script::exec_token
staticinherited

Definition at line 288 of file script3.h.

const char* ost::Script::exit_token
staticinherited

Definition at line 290 of file script3.h.

bool ost::Script::fastStart
staticinherited

Definition at line 255 of file script3.h.

unsigned ost::Script::fastStepping
staticinherited

Definition at line 257 of file script3.h.

Fun* ost::Script::ifun
staticprotectedinherited

Definition at line 306 of file script3.h.

class __EXPORT ost::Script::Line
inherited

Definition at line 102 of file script3.h.

Line* ost::ScriptRegistry::line

Definition at line 1682 of file script3.h.

const char* ost::Script::log_prefix
staticinherited

Definition at line 296 of file script3.h.

class __EXPORT ost::Script::Name
inherited

Definition at line 103 of file script3.h.

size_t ost::Script::pagesize
staticinherited

Definition at line 259 of file script3.h.

const char* ost::Script::plugins
staticinherited

Definition at line 281 of file script3.h.

const char* ost::ScriptRegistry::protocol

Definition at line 1679 of file script3.h.

Name* ost::ScriptRegistry::scr

Definition at line 1681 of file script3.h.

unsigned ost::Script::symlimit
staticinherited

Definition at line 261 of file script3.h.

unsigned ost::Script::symsize
staticinherited

Definition at line 260 of file script3.h.

Test* ost::Script::test
staticprotectedinherited

Definition at line 305 of file script3.h.

bool ost::Script::use_definitions
staticinherited

Definition at line 276 of file script3.h.

bool ost::Script::use_funcs
staticinherited

Definition at line 280 of file script3.h.

bool ost::Script::use_macros
staticinherited

Definition at line 277 of file script3.h.

bool ost::Script::use_merge
staticinherited

Definition at line 279 of file script3.h.

bool ost::Script::use_prefix
staticinherited

Definition at line 278 of file script3.h.

bool ost::Script::useBigmem
staticinherited

Definition at line 256 of file script3.h.

const char* ost::Script::var_prefix
staticinherited

Definition at line 295 of file script3.h.


The documentation for this class was generated from the following file: