#include <script3.h>
Inheritance diagram for ost::ScriptInterp:
Collaboration diagram for ost::ScriptInterp:
Data Structures
Public Types
enum
symType {
symNORMAL = 0,
symCONST,
symDYNAMIC,
symFIFO,
symSEQUENCE,
symSTACK,
symCOUNTER,
symPOINTER,
symREF,
symARRAY,
symASSOC,
symINITIAL,
symNUMBER,
symLOCK,
symPROPERTY,
symORIGINAL,
symMODIFIED,
symTIMER,
symBOOL
}
typedef bool(ScriptInterp::*
Method )(void)
typedef long(*
Function )(long *args, unsigned prec)
typedef void(*
Init )(void)
Public Member Functions
virtual unsigned
getId (void)
const char *
getValue (const char *def=NULL)
const char *
getOption (const char *def=NULL)
Runtime execution of script handler.
More...
virtual void
logmissing (const char *id, const char *level="undefined", const char *group="symbol")
virtual void
logerror (const char *msg, const char *name=NULL)
bool
setNumber (const char *id, const char *value=NULL, unsigned dec=0)
bool
setSymbol (const char *id, const char *value=NULL, unsigned short size=0)
bool
setConst (const char *id, const char *value)
bool
putSymbol (const char *id, const char *value, unsigned short size=0)
bool
getSymbol (const char *id, char *buffer, unsigned short max)
bool
catSymbol (const char *id, const char *value, unsigned short size=0)
Release any acquired lock...
More...
bool
signal (const char *name)
Signals are used during "delayed" execution steps when a signal event has occured aynchronously with the execution of a script controlled state event handler.
More...
Signals can be referenced by numeric id as well as by symbolic name.
More...
A virtual holding a branch conditional member.
More...
Enable setting of mutex name for deadlock debug.
More...
Entering a
Mutex locks the mutex for the current thread.
More...
Future abi will use enter/leave/test members.
More...
Future abi will use enter/leave/test members.
More...
Future abi will use enter/leave/test members.
More...
Tries to lock the mutex for the current thread.
More...
Leaving a mutex frees that mutex for use by another thread.
More...
const char *
cstring (const char *str)
unsigned
gather (
Symbol **idx, unsigned max, const char *prefix, const char *suffix)
Symbol *
find (const char *id, unsigned short size=0)
Symbol *
make (const char *id, unsigned short size)
Return the total number of pages that have been allocated for this memory pool.
More...
Static Public Member Functions
static double
getDouble (long value, unsigned prec)
static long
getInteger (long value, unsigned prec)
static long
getTens (unsigned prec)
Enable or disable deadlock debugging.
More...
static bool
use (const char *name)
static unsigned
getIndex (const char *id)
Data Fields
Static Public Attributes
Protected Member Functions
Initialize execution environment for a script.
More...
New virtual to initialize script environment syms before running init sections.
More...
Attempt to push a value onto the stack.
More...
Attempt to recall a previous stack level.
More...
Clear the stack of local loops or recursion for branching.
More...
Advance program to the next script statement.
More...
Skip line without checking or setting updates.
More...
void
error (const char *error)
Set error variable and advance to either the error handler or next script statement.
More...
bool
scriptEvent (const char *name, bool inhereted=true)
Events reference to named @event handlers which have been attached to a script.
More...
Branch to a selected event record immediately.
More...
Set the execution interpreter to a trap identifier.
More...
void
trap (const char *name)
Select trap by symbolic name and execute if found, else advance to next script step (unless exit trap).
More...
virtual void *
first (size_t size)
Allocate first workspace from paged memory.
More...
Allocate a string from the memory pager pool and copy the string into it's new memory area.
More...
virtual void *
alloc (size_t size)
Allocate memory from either the currently active page, or allocate a new page for the object.
More...
char *
alloc (const char *str)
Allocate a string from the memory pager pool and copy the string inti it's new memory area.
More...
Clean for memory cleanup before exiting.
More...
Protected Attributes
Static Protected Attributes
Friends
Detailed Description
Member Typedef Documentation
typedef const char*(ScriptCommand::* ost::Script::Check)(
Line *line,
ScriptImage *img)
inherited |
typedef bool(* ost::Script::Cond)(
ScriptInterp *interp, const char *v)
inherited |
typedef long(* ost::Script::Function)(long *args, unsigned prec)
inherited |
typedef void(* ost::Script::Init)(void)
inherited |
typedef const char*(* ost::Script::Meta)(
ScriptInterp *interp, const char *token)
inherited |
typedef bool(ScriptInterp::* ost::Script::Method)(void)
inherited |
typedef const char*(* ost::Script::Parse)(
ScriptCompiler *img, const char *token)
inherited |
Member Enumeration Documentation
Enumerator |
---|
scrPUBLIC |
scrPROTECTED |
scrPRIVATE |
scrFUNCTION |
scrLOCAL |
Definition at line 113 of file script3.h.
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.
Constructor & Destructor Documentation
ost::ScriptInterp::ScriptInterp
(
)
Member Function Documentation
static void ost::Script::addConditional
(
const char *
name,
)
staticinherited |
static void ost::Script::addFunction
(
const char *
name,
unsigned
count,
)
staticinherited |
void ost::ScriptInterp::advance
(
void
)
protected |
Advance program to the next script statement.
virtual void* MemPager::alloc
(
size_t
size )
protectedvirtualinherited |
Allocate memory from either the currently active page, or allocate a new page for the object.
- Parameters
-
size size of memory to allocate.
- Returns
- pointer to allocated memory.
Reimplemented in SharedMemPager.
char* MemPager::alloc
(
const char *
str )
protectedinherited |
Allocate a string from the memory pager pool and copy the string inti it's new memory area.
This checks only the last active page for available space before allocating a new page.
- Parameters
-
str string to allocate and copy into paged memory pool.
- Returns
- copy of string from allocated memory.
static bool ost::Script::append
(
Symbol *
sym,
const char *
value
)
staticinherited |
virtual void ost::ScriptInterp::branching
(
void
)
virtual |
A virtual holding a branch conditional member.
This may be invoked typically from goto or restart. Can be used to check contextual changes.
Reimplemented in ost::BayonneSession.
bool ost::ScriptInterp::catSymbol
(
const char *
id,
const char *
value,
unsigned short
size = 0
)
void MemPager::clean
(
void
)
protectedinherited |
Clean for memory cleanup before exiting.
static void ost::Script::clear
(
Symbol *
sym )
staticinherited |
void ost::ScriptInterp::clearStack
(
void
)
protected |
Clear the stack of local loops or recursion for branching.
static bool ost::Script::commit
(
Symbol *
sym,
const char *
value
)
staticinherited |
bool ost::ScriptInterp::conditional
(
void
)
bool ost::ScriptInterp::conditionalExpression
(
void
)
static unsigned ost::Script::count
(
Symbol *
sym )
staticinherited |
const char* ost::ScriptSymbols::cstring
(
const char *
str )
inlineinherited |
void ost::ScriptInterp::detach
(
void
)
bool ost::ScriptInterp::done
(
void
)
void Mutex::enter
(
void
)
inlineinherited |
Future abi will use enter/leave/test members.
Definition at line 263 of file thread.h.
void Mutex::enterMutex
(
void
)
inherited |
Entering a Mutex locks the mutex for the current thread.
This also can be done using the ENTER_CRITICAL macro or by using the ++ operator on a mutex.
- See Also
- leaveMutex
virtual void ost::ScriptInterp::enterThread
(
ScriptThread *
thread )
protectedvirtual |
void ost::ScriptInterp::error
(
const char *
error )
protected |
Set error variable and advance to either the error handler or next script statement.
- Parameters
-
error message.
bool ost::ScriptInterp::eventThread
(
const char *
evt,
bool
flag = true
)
protected |
bool ost::ScriptInterp::execute
(
Method
method )
Runtime execution of script handler.
This can be called in the current or derived class to invoke extensible methods.
- Returns
- true if immediately ready for next step.
- Parameters
-
method derived method member to call.
virtual bool ost::ScriptInterp::exit
(
void
)
protectedvirtual |
virtual void ost::ScriptInterp::exitThread
(
const char *
msg )
protectedvirtual |
static const char* ost::Script::extract
(
Symbol *
sym )
staticinherited |
Symbol* ost::ScriptSymbols::find
(
const char *
id,
unsigned short
size = 0
)
inherited |
virtual void* MemPager::first
(
size_t
size )
protectedvirtualinherited |
Allocate first workspace from paged memory.
This method scans all currently allocated blocks for available space before adding new pages and hence is both slower and more efficient.
- Parameters
-
size size of memory to allocate.
- Returns
- pointer to allocated memory.
Reimplemented in SharedMemPager.
char* MemPager::first
(
char *
str )
protectedinherited |
Allocate a string from the memory pager pool and copy the string into it's new memory area.
This method allocates memory by first searching for an available page, and then allocating a new page if no space is found.
- Parameters
-
str string to allocate and copy into paged memory pool.
- Returns
- copy of string from allocated memory.
unsigned ost::ScriptSymbols::gather
(
Symbol **
idx,
unsigned
max,
const char *
prefix,
const char *
suffix
)
inherited |
unsigned ost::ScriptSymbols::gathertype
(
Symbol **
idx,
unsigned
max,
const char *
prefix,
)
inherited |
const char* ost::ScriptInterp::getContent
(
const char *
opt )
static double ost::ScriptInterp::getDouble
(
long
value,
unsigned
prec
)
static |
virtual const char* ost::ScriptInterp::getExternal
(
const char *
opt )
virtual |
Frame* ost::ScriptInterp::getFrame
(
void
)
inline |
virtual unsigned ost::ScriptInterp::getId
(
void
)
virtual |
static unsigned ost::Script::getIndex
(
const char *
id )
staticinherited |
static long ost::ScriptInterp::getInteger
(
long
value,
unsigned
prec
)
static |
virtual
ScriptInterp* ost::ScriptInterp::getInterp
(
const char *
id )
virtual |
long ost::ScriptInterp::getIntValue
(
const char *
text,
unsigned
prec,
)
const char* ost::ScriptInterp::getKeyoption
(
const char *
kw )
Symbol* ost::ScriptInterp::getKeysymbol
(
const char *
kw,
unsigned
size = 0
)
const char* ost::ScriptInterp::getKeyword
(
const char *
kw )
Line* ost::ScriptInterp::getLine
(
void
)
inline |
virtual const char* ost::ScriptInterp::getLogname
(
void
)
inlinevirtual |
unsigned long ost::ScriptInterp::getMask
(
void
)
protected |
const char* ost::ScriptInterp::getMember
(
void
)
Name* ost::ScriptInterp::getName
(
void
)
inline |
const char* ost::ScriptInterp::getOption
(
const char *
def = NULL
)
char ost::ScriptInterp::getPackToken
(
void
)
int MemPager::getPages
(
void
)
inlineinherited |
Return the total number of pages that have been allocated for this memory pool.
- Returns
- number of pages allocated.
Definition at line 181 of file misc.h.
static long ost::ScriptInterp::getRealValue
(
double
val,
unsigned
prec
)
static |
Name* ost::ScriptInterp::getScript
(
const char *
name )
unsigned long ost::ScriptInterp::getSequence
(
void
)
inline |
Symbol* ost::ScriptInterp::getSymbol
(
unsigned short
size =
0
)
bool ost::ScriptInterp::getSymbol
(
const char *
id,
char *
buffer,
unsigned short
max
)
const char* ost::ScriptInterp::getSymbol
(
const char *
id )
virtual
ScriptSymbols* ost::ScriptInterp::getSymbols
(
const char *
id )
protectedvirtual |
const char* ost::ScriptInterp::getSymContent
(
const char *
opt )
char* ost::ScriptInterp::getTemp
(
void
)
unsigned ost::ScriptInterp::getTempSize
(
void
)
static long ost::ScriptInterp::getTens
(
unsigned
prec )
static |
timeout_t ost::ScriptInterp::getTimeout
(
void
)
bool ost::ScriptInterp::getTrace
(
void
)
inline |
const char* ost::ScriptInterp::getValue
(
const char *
def = NULL
)
void ost::ScriptInterp::gotoEvent
(
NamedEvent *
event )
protected |
Branch to a selected event record immediately.
- Parameters
-
event record pointer to access.
const char* ost::ScriptInterp::hasOption
(
void
)
virtual void ost::ScriptInterp::initialize
(
void
)
protectedvirtual |
New virtual to initialize script environment syms before running init sections.
Reimplemented in ost::BayonneSession.
void ost::ScriptInterp::initRuntime
(
Name *
name )
protected |
Initialize execution environment for a script.
bool ost::ScriptInterp::isExiting
(
void
)
inline |
static bool ost::Script::isFunction
(
Name *
scr )
staticinherited |
virtual bool ost::ScriptInterp::isLocked
(
const char *
id )
protectedvirtual |
static bool ost::Script::isPrivate
(
Name *
scr )
staticinherited |
bool ost::ScriptInterp::isRunning
(
void
)
inline |
static bool ost::Script::isScript
(
Name *
scr )
staticinherited |
static bool ost::Script::isSymbol
(
const char *
id )
staticinherited |
void Mutex::leave
(
void
)
inlineinherited |
Future abi will use enter/leave/test members.
Definition at line 269 of file thread.h.
void Mutex::leaveMutex
(
void
)
inherited |
Leaving a mutex frees that mutex for use by another thread.
If the mutex has been entered (invoked) multiple times (recursivily) by the same thread, then it will need to be exited the same number of instances before it is free for re-use. This operation can also be done using the LEAVE_CRITICAL macro or by the – operator on a mutex.
- See Also
- enterMutex
virtual void ost::ScriptInterp::logerror
(
const char *
msg,
const char *
name = NULL
)
virtual |
virtual void ost::ScriptInterp::logmissing
(
const char *
id,
const char *
level = "undefined"
,
const char *
group = "symbol"
)
virtual |
Symbol* ost::ScriptSymbols::make
(
const char *
id,
unsigned short
size
)
inherited |
Symbol* ost::ScriptInterp::mapDirect
(
const char *
id,
unsigned
short = 0
)
Symbol* ost::ScriptInterp::mapSymbol
(
const char *
id,
unsigned
short = 0
)
void Mutex::nameMutex
(
const char *
name )
inlineinherited |
Enable setting of mutex name for deadlock debug.
- Parameters
-
name for mutex.
Definition at line 248 of file thread.h.
int ost::ScriptInterp::numericExpression
(
long *
list,
int
max,
unsigned
prec,
)
bool ost::ScriptInterp::pull
(
void
)
protected |
Attempt to recall a previous stack level.
- Returns
- false if stack underflow.
void ost::ScriptSymbols::purge
(
void
)
protectedinherited |
bool ost::ScriptInterp::push
(
void
)
protected |
Attempt to push a value onto the stack.
- Returns
- false if stack overflow.
bool ost::ScriptInterp::putSymbol
(
const char *
id,
const char *
value,
unsigned short
size = 0
)
bool ost::ScriptInterp::redirect
(
const char *
scr )
protected |
bool ost::ScriptInterp::redirect
(
bool
evflag )
protected |
void ost::ScriptInterp::release
(
void
)
Release any acquired lock...
virtual const char* ost::ScriptInterp::remapLocal
(
void
)
protectedvirtual |
void ost::ScriptInterp::ripple
(
void
)
protected |
bool ost::ScriptInterp::scriptEvent
(
const char *
name,
bool
inhereted = true
)
protected |
Events reference to named @event handlers which have been attached to a script.
This allows low level applications to invoke an event handler much the way a signal handler occurs.
- Returns
- true if event handler exists.
- Parameters
-
name of event handler.
inhereted search flag.
bool ost::ScriptInterp::setConst
(
const char *
id,
const char *
value
)
static void Mutex::setDebug
(
bool
mode )
inlinestaticinherited |
Enable or disable deadlock debugging.
- Parameters
-
mode debug mode.
Definition at line 240 of file thread.h.
void ost::ScriptInterp::setFrame
(
void
)
bool ost::ScriptInterp::setNumber
(
const char *
id,
const char *
value = NULL
,
unsigned
dec = 0
)
Symbol* ost::ScriptSymbols::setReference
(
const char *
id,
)
inherited |
bool ost::ScriptInterp::setSymbol
(
const char *
id,
const char *
value = NULL
,
unsigned short
size = 0
)
bool ost::ScriptInterp::signal
(
const char *
name )
Signals are used during "delayed" execution steps when a signal event has occured aynchronously with the execution of a script controlled state event handler.
This mechanism can be used in place of calling implicit "Step" traps.
- Returns
- true if signal handler is not blocked.
- Parameters
-
name of signal identifier.
bool ost::ScriptInterp::signal
(
unsigned
id )
Signals can be referenced by numeric id as well as by symbolic name.
- Returns
- true if signal handler is not blocked.
- Parameters
-
id number of handler.
void ost::ScriptInterp::skip
(
void
)
protected |
Skip line without checking or setting updates.
virtual void ost::ScriptInterp::startThread
(
void
)
protectedvirtual |
bool ost::ScriptInterp::step
(
void
)
static unsigned ost::Script::storage
(
Symbol *
sym )
staticinherited |
static bool ost::Script::symindex
(
Symbol *
sym,
short
offset
)
staticinherited |
bool Mutex::test
(
void
)
inlineinherited |
Future abi will use enter/leave/test members.
- Returns
- true if entered.
Definition at line 277 of file thread.h.
void ost::ScriptInterp::trap
(
unsigned
id )
protected |
Set the execution interpreter to a trap identifier.
If no trap id exists, then advance to next script statement (unless exit trap).
- Parameters
-
id of trap to select numerically.
void ost::ScriptInterp::trap
(
const char *
name )
protected |
Select trap by symbolic name and execute if found, else advance to next script step (unless exit trap).
- Parameters
-
name of trap to select.
bool ost::ScriptInterp::tryCatch
(
const char *
id )
protected |
Tries a catch handler...
- Returns
- true if caught.
- Parameters
-
id of catch handler to try.
bool Mutex::tryEnterMutex
(
void
)
inherited |
Tries to lock the mutex for the current thread.
Behaves like enterMutex , except that it doesn't block the calling thread if the mutex is already locked by another thread.
- Returns
- true if locking the mutex was succesful otherwise false
- See Also
- enterMutex
-
leaveMutex
static bool ost::Script::use
(
const char *
name )
staticinherited |
virtual void ost::ScriptInterp::waitThread
(
void
)
protectedvirtual |
Friends And Related Function Documentation
Field Documentation
const char* ost::Script::access_host
staticinherited |
const char* ost::Script::access_pass
staticinherited |
const char* ost::Script::access_user
staticinherited |
const char* ost::Script::altplugins
staticinherited |
const char* ost::Script::apps_extensions
staticinherited |
const char* ost::Script::apps_prefix
staticinherited |
unsigned ost::Script::autoStepping
staticinherited |
char ost::Script::decimal
staticinherited |
const char* ost::Script::etc_prefix
staticinherited |
const char* ost::Script::exec_extensions
staticinherited |
bool ost::Script::exec_funcs
staticinherited |
const char* ost::Script::exec_prefix
staticinherited |
const char* ost::Script::exec_token
staticinherited |
const char* ost::Script::exit_token
staticinherited |
bool ost::ScriptInterp::exiting
protected |
bool ost::Script::fastStart
staticinherited |
unsigned ost::Script::fastStepping
staticinherited |
Frame ost::ScriptInterp::frame[32]
protected |
bool ost::ScriptInterp::initialized
protected |
Mutex* ost::ScriptInterp::lock
protected |
const char* ost::Script::log_prefix
staticinherited |
char ost::ScriptInterp::logname[32]
protected |
size_t ost::Script::pagesize
staticinherited |
const char* ost::Script::plugins
staticinherited |
unsigned long ost::ScriptInterp::sequence
protected |
unsigned ost::ScriptInterp::stack
protected |
unsigned ost::Script::symlimit
staticinherited |
unsigned ost::Script::symsize
staticinherited |
unsigned ost::ScriptInterp::tempidx
protected |
char* ost::ScriptInterp::temps[16]
protected |
bool ost::ScriptInterp::trace
protected |
bool ost::ScriptInterp::updated
protected |
bool ost::Script::use_definitions
staticinherited |
bool ost::Script::use_funcs
staticinherited |
bool ost::Script::use_macros
staticinherited |
bool ost::Script::use_merge
staticinherited |
bool ost::Script::use_prefix
staticinherited |
bool ost::Script::useBigmem
staticinherited |
const char* ost::Script::var_prefix
staticinherited |
The documentation for this class was generated from the following file:
Generated on Dec 21, 2017 for
commoncpp2-1.8.1,
ccrtp-1.7.2,
libzrtpcpp-2.3.4,
ccscript3-1.1.7,
ccaudio2-1.0.0 and
bayonne2-2.3.2
(after installation in /usr/local/)
by
doxygen 1.8.6