| Ejs | Ejsript Interperter Management. |
| EjsArray | Array class. |
| EjsBlock | Block class. |
| EjsBoolean | Boolean class. |
| EjsByteArray | ByteArray class. |
| EjsDate | Date class. |
| EjsError | Error classes. |
| EjsFile | File class. |
| EjsFileSystem | FileSystem class. |
| EjsFunction | Function class. |
| EjsGlobal | EjsGlobal cass. |
| EjsHttp | Http Class. |
| EjsIterator | Iterator Class. |
| EjsName | Qualified name structure. |
| EjsNamespace | Namespace Class. |
| EjsNull | Null Class. |
| EjsNumber | Number class. |
| EjsObject | Object Type. |
| EjsPath | Path class. |
| EjsRegExp | RegExp Class. |
| EjsString | String Class. |
| EjsTimer | Timer Class. |
| EjsType | Type class. |
| EjsVar | Foundation Variable Interface. |
| EjsVm | Virtual Machine Execution Frame. |
| EjsVoid | Void class. |
| int | ejsCopyToByteArray(Ejs *ejs, EjsByteArray *ap, int offset, char *data, int length) |
| Copy data into a byte array. | |
| Ejs* | ejsCreate(MprCtx ctx, struct Ejs *master, cchar *searchPath, int flags) |
| Create an ejs interpreter. | |
| EjsArray* | ejsCreateArray(Ejs *ejs, int size) |
| Create an array. | |
| EjsString* | ejsCreateBareString(Ejs *ejs, int len) |
| Create an empty string object. | |
| EjsBoolean* | ejsCreateBoolean(Ejs *ejs, int value) |
| Create a boolean. | |
| EjsByteArray* | ejsCreateByteArray(Ejs *ejs, int size) |
| Create a byte array. | |
| EjsDate* | ejsCreateDate(Ejs *ejs, MprTime value) |
| Create a new date instance. | |
| EjsFile* | ejsCreateFile(Ejs *ejs, cchar *filename) |
| Create a File object. | |
| EjsFileSystem* | ejsCreateFileSystem(Ejs *ejs, cchar *path) |
| Create a FileSystem object. | |
| EjsFunction* | ejsCreateFunction(Ejs *ejs, const uchar *code, int codeLen, int numArgs, int numExceptions, EjsType *returnType, int attributes, struct EjsConst *constants, EjsBlock *scope, int lang) |
| Create a function object. | |
| EjsHttp* | ejsCreateHttp(Ejs *ejs) |
| Create a new Http object. | |
| EjsVar* | ejsCreateInstance(Ejs *ejs, struct EjsType *type, int argc, EjsVar **argv) |
| Create a new variable instance. | |
| EjsIterator* | ejsCreateIterator(Ejs *ejs, EjsVar *target, EjsNativeFunction next, bool deep, EjsArray *namespaces) |
| Create an iterator object. | |
| EjsNamespace* | ejsCreateNamespace(Ejs *ejs, cchar *name, cchar *uri) |
| Create a namespace object. | |
| EjsNumber* | ejsCreateNumber(Ejs *ejs, MprNumber value) |
| Create a number object. | |
| EjsObject* | ejsCreateObject(Ejs *ejs, struct EjsType *type, int size) |
| Create an object instance of the specified type. | |
| EjsObject* | ejsCreateObjectEx(Ejs *ejs, struct EjsType *type, int size, bool dynamic) |
| Create an object instance of the specified type. | |
| EjsPath* | ejsCreatePath(Ejs *ejs, cchar *path) |
| Create a Path object. | |
| EjsRegExp* | ejsCreateRegExp(Ejs *ejs, cchar *pattern) |
| Create a new regular expression object. | |
| EjsService* | ejsCreateService(MprCtx ctx) |
| Open the Ejscript service. | |
| EjsObject* | ejsCreateSimpleObject(Ejs *ejs) |
| Create a simple object. | |
| EjsString* | ejsCreateString(Ejs *ejs, cchar *value) |
| Create a string object. | |
| EjsString* | ejsCreateStringAndFree(Ejs *ejs, char *value) |
| Create a string object and free the argument. | |
| EjsString* | ejsCreateStringWithLength(Ejs *ejs, cchar *value, int len) |
| Create a string and reserve extra room. | |
| EjsType* | ejsCreateType(Ejs *ejs, EjsName *name, struct EjsModule *up, EjsType *baseType, int size, int slotNum, int numTypeProp, int numInstanceProp, int attributes, void *data) |
| Create a new type object. | |
| EjsVar* | ejsCreateVar(Ejs *ejs, struct EjsType *type, int numSlots) |
| Create a variable. | |
| int | ejsDefineGlobalFunction(Ejs *ejs, cchar *name, EjsNativeFunction fn) |
| Define a global function. | |
| int | ejsDefineInstanceProperty(Ejs *ejs, EjsType *type, int slotNum, EjsName *name, EjsType *propType, int attributes, EjsVar *value) |
| Define an instance property. | |
| int | ejsDefineProperty(Ejs *ejs, EjsVar *vp, int slotNum, EjsName *qname, struct EjsType *type, int attributes, EjsVar *value) |
| Define a property. | |
| int | ejsDeleteProperty(Ejs *ejs, EjsVar *vp, int slotNum) |
| Delete a property. | |
| int | ejsDeletePropertyByName(Ejs *ejs, EjsVar *vp, EjsName *qname) |
| Delete a property by name. | |
| void | ejsDestroyVar(Ejs *ejs, EjsVar *vp) |
| Destroy a variable. | |
| EjsString* | ejsDupString(Ejs *ejs, EjsString *sp) |
| Duplicate a string object. | |
| int | ejsEvalFile(cchar *path) |
| Evaluate a file. | |
| int | ejsEvalModule(cchar *path) |
| Evaluate a module. | |
| int | ejsEvalScript(cchar *script) |
| Evaluate a script. | |
| void | ejsExit(Ejs *ejs, int status) |
| Instruct the interpreter to exit. | |
| void | ejsFinalizeVar(Ejs *ejs, EjsVar *vp) |
| Finalize a variable before destroying. | |
| char* | ejsFormatStack(Ejs *ejs) |
| Format the stack backtrace. | |
| void | ejsFreeVar(Ejs *ejs, EjsVar *vp) |
| Free a new variable. | |
| bool | ejsGetBoolean(EjsVar *vp) |
| Get the C boolean value from a boolean object. | |
| int | ejsGetDouble(EjsVar *vp) |
| Get the numeric value stored in a EjsNumber object. | |
| char* | ejsGetErrorMsg(Ejs *ejs, int withStack) |
| Get the interpreter error message. | |
| void* | ejsGetHandle(Ejs *ejs) |
| Get the hosting handle. | |
| int | ejsGetInt(EjsVar *vp) |
| Get the numeric value stored in a EjsNumber object. | |
| MprNumber | ejsGetNumber(EjsVar *vp) |
| Get the numeric value stored in a EjsNumber object. | |
| EjsVar* | ejsGetProperty(Ejs *ejs, EjsVar *vp, int slotNum) |
| Get a property. | |
| EjsVar* | ejsGetPropertyByName(Ejs *ejs, EjsVar *vp, EjsName *qname) |
| Get a property by name. | |
| int | ejsGetPropertyCount(Ejs *ejs, EjsVar *vp) |
| Get a count of properties in a variable. | |
| EjsName | ejsGetPropertyName(Ejs *ejs, EjsVar *vp, int slotNum) |
| Get a variable property's name. | |
| struct EjsTrait* | ejsGetPropertyTrait(Ejs *ejs, EjsVar *vp, int slotNum) |
| Get a property's traits. | |
| EjsType* | ejsGetType(Ejs *ejs, int slotNum) |
| Get a type. | |
| EjsType* | ejsGetVarType(EjsVar *vp) |
| Get a variables type. | |
| int | ejsGrowObject(Ejs *ejs, EjsObject *obj, int size) |
| Grow an object. | |
| bool | ejsHasException(Ejs *ejs) |
| Determine if an exception has been thrown. | |
| EjsVar* | ejsInvokeOperator(Ejs *ejs, EjsVar *vp, int opCode, EjsVar *rhs) |
| Invoke an opcode on a native type. | |
| bool | ejsIsA(Ejs *ejs, EjsVar *target, EjsType *type) |
| Test if an variable is an instance of a given type. | |
| bool | ejsIsArray(EjsVar *vp) |
| Determine if a variable is an array. | |
| bool | ejsIsBlock(EjsVar *vp) |
| Determine if a variable is a block. | |
| bool | ejsIsBoolean(EjsVar *vp) |
| Determine if a variable is a boolean. | |
| bool | ejsIsByteArray(EjsVar *vp) |
| Determine if a variable is a byte array. | |
| bool | ejsIsDate(EjsVar *vp) |
| Determine if a variable is a Date. | |
| bool | ejsIsFile(EjsVar *vp) |
| Determine if a variable is a File. | |
| bool | ejsIsFileSystem(EjsVar *vp) |
| Determine if a variable is a Path. | |
| bool | ejsIsFunction(EjsVar *vp) |
| Determine if a variable is a function. | |
| bool | ejsIsInitializer(EjsVar *vp) |
| Determine if the function is an initializer. | |
| bool | ejsIsInstanceBlock(EjsVar *vp) |
| Determine if a variable is an instance block. | |
| bool | ejsIsNamespace(EjsVar *vp),extern,EjsNamespace,*ejsDefineReservedNamespace(Ejs,*ejs |
| Determine if a variable is a namespace. | |
| bool | ejsIsNativeFunction(EjsVar *vp) |
| Determine if the function is a native function. | |
| bool | ejsIsNumber(EjsVar *vp) |
| Determine if a variable is a number. | |
| bool | ejsIsObject(EjsVar *vp) |
| Determine if a variable is an EjsObject. | |
| bool | ejsIsPath(EjsVar *vp) |
| Determine if a variable is a Path. | |
| bool | ejsIsRegExp(EjsVar *vp) |
| Determine if the variable is a regular expression. | |
| bool | ejsIsType(EjsVar *vp) |
| Determine if a variable is an type. | |
| bool | ejsIsTypeSubType(Ejs *ejs, EjsType *target, EjsType *baseType) |
| Test if a type is a derived type of a given base type. | |
| int | ejsLookupProperty(Ejs *ejs, EjsVar *vp, EjsName *qname) |
| Lookup a property by name. | |
| void | ejsMarkObject(Ejs *ejs, EjsVar *parent, EjsObject *obj) |
| Mark an object as currently in use. | |
| void | ejsMarkVar(Ejs *ejs, EjsVar *parent, EjsVar *vp) |
| Mark a variable as currently in use. | |
| EjsName* | ejsName(struct EjsName *qname, cchar *space, cchar *name) |
| Initialize a Qualified Name structure. | |
| void | ejsReportError(Ejs *ejs, char *fmt, ...) |
| Report an error message using the MprLog error channel. | |
| int | ejsRun(Ejs *ejs) |
| Run a script. | |
| EjsVar* | ejsRunFunction(Ejs *ejs, EjsFunction *fn, EjsVar *obj, int argc, EjsVar **argv) |
| Run a function. | |
| EjsVar* | ejsRunFunctionBySlot(Ejs *ejs, EjsVar *obj, int slotNum, int argc, EjsVar **argv) |
| Run a function by slot number. | |
| EjsVar* | ejsRunInitializer(Ejs *ejs, struct EjsModule *module) |
| Run the initializer for a module. | |
| EjsVar* | ejsSerialize(Ejs *ejs, EjsVar *value, int maxDepth, bool showAll, bool showBase) |
| Serialize a variable. | |
| void | ejsSetByteArrayPositions(Ejs *ejs, EjsByteArray *ap, int readPosition, int writePosition) |
| Set the I/O byte array positions. | |
| int | ejsSetProperty(Ejs *ejs, EjsVar *vp, int slotNum, EjsVar *value) |
| Set a property's value. | |
| int | ejsSetPropertyByName(Ejs *ejs, EjsVar *vp, EjsName *qname, EjsVar *value) |
| Set a property's value. | |
| int | ejsSetPropertyName(Ejs *ejs, EjsVar *vp, int slotNum, EjsName *qname) |
| Set a property's name. | |
| int | ejsSetPropertyTrait(Ejs *ejs, EjsVar *vp, int slotNum, struct EjsType *type, int attributes) |
| Set a property's traits. | |
| void | ejsSetSearchPath(Ejs *ejs, cchar *ejsPath) |
| Set the module search path. | |
| EjsVar* | ejsThrowArgError(Ejs *ejs, cchar *fmt, ...) |
| Throw an argument exception. | |
| EjsVar* | ejsThrowArithmeticError(Ejs *ejs, cchar *fmt, ...) |
| Throw an math exception. | |
| EjsVar* | ejsThrowAssertError(Ejs *ejs, cchar *fmt, ...) |
| Throw an assertion exception. | |
| EjsVar* | ejsThrowError(Ejs *ejs, cchar *fmt, ...) |
| Throw an general error exception. | |
| struct EjsVar* | ejsThrowException(Ejs *ejs, struct EjsVar *error) |
| Throw an exception. | |
| EjsVar* | ejsThrowInstructionError(Ejs *ejs, cchar *fmt, ...) |
| Throw an instruction code exception. | |
| EjsVar* | ejsThrowInternalError(Ejs *ejs, cchar *fmt, ...) |
| Throw an internal error exception. | |
| EjsVar* | ejsThrowIOError(Ejs *ejs, cchar *fmt, ...) |
| Throw an IO exception. | |
| EjsVar* | ejsThrowMemoryError(Ejs *ejs) |
| Throw an Memory depletion exception. | |
| EjsVar* | ejsThrowOutOfBoundsError(Ejs *ejs, cchar *fmt, ...) |
| Throw an out of bounds exception. | |
| EjsVar* | ejsThrowReferenceError(Ejs *ejs, cchar *fmt, ...) |
| Throw an reference exception. | |
| EjsVar* | ejsThrowResourceError(Ejs *ejs, cchar *fmt, ...) |
| Throw an resource exception. | |
| EjsVar* | ejsThrowStateError(Ejs *ejs, cchar *fmt, ...) |
| Throw an state exception. | |
| EjsVar* | ejsThrowStopIteration(Ejs *ejs) |
| Throw an stop iteration exception. | |
| EjsVar* | ejsThrowSyntaxError(Ejs *ejs, cchar *fmt, ...) |
| Throw an syntax error exception. | |
| EjsVar* | ejsThrowTypeError(Ejs *ejs, cchar *fmt, ...) |
| Throw an type error exception. | |
| EjsBoolean* | ejsToBoolean(Ejs *ejs, EjsVar *vp) |
| Cast a variable to a boolean. | |
| struct EjsNumber* | ejsToNumber(Ejs *ejs, EjsVar *vp) |
| Cast a variable to a number. | |
| EjsString* | ejsToString(Ejs *ejs, EjsVar *vp) |
| Cast a variable to a string. | |
| Ejs* | ejsCreate(MprCtx ctx, struct Ejs *master, cchar *searchPath, int flags) |
| Create an ejs interpreter. | |
| EjsService* | ejsCreateService(MprCtx ctx) |
| Open the Ejscript service. | |
| int | ejsEvalFile(cchar *path) |
| Evaluate a file. | |
| int | ejsEvalModule(cchar *path) |
| Evaluate a module. | |
| int | ejsEvalScript(cchar *script) |
| Evaluate a script. | |
| void | ejsExit(Ejs *ejs, int status) |
| Instruct the interpreter to exit. | |
| void* | ejsGetHandle(Ejs *ejs) |
| Get the hosting handle. | |
| void | ejsReportError(Ejs *ejs, char *fmt, ...) |
| Report an error message using the MprLog error channel. | |
| void | ejsSetSearchPath(Ejs *ejs, cchar *ejsPath) |
| Set the module search path. | |
| struct EjsVar* | ejsThrowException(Ejs *ejs, struct EjsVar *error) |
| Throw an exception. | |
| EjsArray* | ejsCreateArray(Ejs *ejs, int size) |
| Create an array. | |
| bool | ejsIsArray(EjsVar *vp) |
| Determine if a variable is an array. | |
| bool | ejsIsBlock(EjsVar *vp) |
| Determine if a variable is a block. | |
| EjsBoolean* | ejsCreateBoolean(Ejs *ejs, int value) |
| Create a boolean. | |
| bool | ejsGetBoolean(EjsVar *vp) |
| Get the C boolean value from a boolean object. | |
| bool | ejsIsBoolean(EjsVar *vp) |
| Determine if a variable is a boolean. | |
| EjsBoolean* | ejsToBoolean(Ejs *ejs, EjsVar *vp) |
| Cast a variable to a boolean. | |
| EjsByteArray* | ejsCreateByteArray(Ejs *ejs, int size) |
| Create a byte array. | |
| bool | ejsIsByteArray(EjsVar *vp) |
| Determine if a variable is a byte array. | |
| void | ejsSetByteArrayPositions(Ejs *ejs, EjsByteArray *ap, int readPosition, int writePosition) |
| Set the I/O byte array positions. | |
| EjsDate* | ejsCreateDate(Ejs *ejs, MprTime value) |
| Create a new date instance. | |
| bool | ejsIsDate(EjsVar *vp) |
| Determine if a variable is a Date. | |
| char* | ejsFormatStack(Ejs *ejs) |
| Format the stack backtrace. | |
| char* | ejsGetErrorMsg(Ejs *ejs, int withStack) |
| Get the interpreter error message. | |
| bool | ejsHasException(Ejs *ejs) |
| Determine if an exception has been thrown. | |
| EjsVar* | ejsThrowArgError(Ejs *ejs, cchar *fmt, ...) |
| Throw an argument exception. | |
| EjsVar* | ejsThrowArithmeticError(Ejs *ejs, cchar *fmt, ...) |
| Throw an math exception. | |
| EjsVar* | ejsThrowAssertError(Ejs *ejs, cchar *fmt, ...) |
| Throw an assertion exception. | |
| EjsVar* | ejsThrowError(Ejs *ejs, cchar *fmt, ...) |
| Throw an general error exception. | |
| EjsVar* | ejsThrowInstructionError(Ejs *ejs, cchar *fmt, ...) |
| Throw an instruction code exception. | |
| EjsVar* | ejsThrowInternalError(Ejs *ejs, cchar *fmt, ...) |
| Throw an internal error exception. | |
| EjsVar* | ejsThrowIOError(Ejs *ejs, cchar *fmt, ...) |
| Throw an IO exception. | |
| EjsVar* | ejsThrowMemoryError(Ejs *ejs) |
| Throw an Memory depletion exception. | |
| EjsVar* | ejsThrowOutOfBoundsError(Ejs *ejs, cchar *fmt, ...) |
| Throw an out of bounds exception. | |
| EjsVar* | ejsThrowReferenceError(Ejs *ejs, cchar *fmt, ...) |
| Throw an reference exception. | |
| EjsVar* | ejsThrowResourceError(Ejs *ejs, cchar *fmt, ...) |
| Throw an resource exception. | |
| EjsVar* | ejsThrowStateError(Ejs *ejs, cchar *fmt, ...) |
| Throw an state exception. | |
| EjsVar* | ejsThrowStopIteration(Ejs *ejs) |
| Throw an stop iteration exception. | |
| EjsVar* | ejsThrowSyntaxError(Ejs *ejs, cchar *fmt, ...) |
| Throw an syntax error exception. | |
| EjsVar* | ejsThrowTypeError(Ejs *ejs, cchar *fmt, ...) |
| Throw an type error exception. | |
| EjsFile* | ejsCreateFile(Ejs *ejs, cchar *filename) |
| Create a File object. | |
| bool | ejsIsFileSystem(EjsVar *vp) |
| Determine if a variable is a Path. | |
| EjsFunction* | ejsCreateFunction(Ejs *ejs, const uchar *code, int codeLen, int numArgs, int numExceptions, EjsType *returnType, int attributes, struct EjsConst *constants, EjsBlock *scope, int lang) |
| Create a function object. | |
| bool | ejsIsFunction(EjsVar *vp) |
| Determine if a variable is a function. | |
| bool | ejsIsInitializer(EjsVar *vp) |
| Determine if the function is an initializer. | |
| bool | ejsIsNativeFunction(EjsVar *vp) |
| Determine if the function is a native function. | |
| EjsVar* | ejsRunFunction(Ejs *ejs, EjsFunction *fn, EjsVar *obj, int argc, EjsVar **argv) |
| Run a function. | |
| EjsVar* | ejsRunFunctionBySlot(Ejs *ejs, EjsVar *obj, int slotNum, int argc, EjsVar **argv) |
| Run a function by slot number. | |
| EjsVar* | ejsRunInitializer(Ejs *ejs, struct EjsModule *module) |
| Run the initializer for a module. | |
| EjsHttp* | ejsCreateHttp(Ejs *ejs) |
| Create a new Http object. | |
| EjsIterator* | ejsCreateIterator(Ejs *ejs, EjsVar *target, EjsNativeFunction next, bool deep, EjsArray *namespaces) |
| Create an iterator object. | |
| EjsName* | ejsAllocName(MprCtx ctx, cchar *space, cchar *name) |
| Allocate and Initialize a Qualified Name structure. | |
| EjsName* | ejsName(struct EjsName *qname, cchar *space, cchar *name) |
| Initialize a Qualified Name structure. | |
| EjsNamespace* | ejsCreateNamespace(Ejs *ejs, cchar *name, cchar *uri) |
| Create a namespace object. | |
| bool | ejsIsNamespace(EjsVar *vp),extern,EjsNamespace,*ejsDefineReservedNamespace(Ejs,*ejs |
| Determine if a variable is a namespace. | |
| EjsNumber* | ejsCreateNumber(Ejs *ejs, MprNumber value) |
| Create a number object. | |
| int | ejsGetDouble(EjsVar *vp) |
| Get the numeric value stored in a EjsNumber object. | |
| int | ejsGetInt(EjsVar *vp) |
| Get the numeric value stored in a EjsNumber object. | |
| MprNumber | ejsGetNumber(EjsVar *vp) |
| Get the numeric value stored in a EjsNumber object. | |
| bool | ejsIsNumber(EjsVar *vp) |
| Determine if a variable is a number. | |
| struct EjsNumber* | ejsToNumber(Ejs *ejs, EjsVar *vp) |
| Cast a variable to a number. | |
| EjsObject* | ejsCreateObject(Ejs *ejs, struct EjsType *type, int size) |
| Create an object instance of the specified type. | |
| EjsObject* | ejsCreateObjectEx(Ejs *ejs, struct EjsType *type, int size, bool dynamic) |
| Create an object instance of the specified type. | |
| EjsObject* | ejsCreateSimpleObject(Ejs *ejs) |
| Create a simple object. | |
| int | ejsGrowObject(Ejs *ejs, EjsObject *obj, int size) |
| Grow an object. | |
| bool | ejsIsObject(EjsVar *vp) |
| Determine if a variable is an EjsObject. | |
| void | ejsMarkObject(Ejs *ejs, EjsVar *parent, EjsObject *obj) |
| Mark an object as currently in use. | |
| EjsFileSystem* | ejsCreateFileSystem(Ejs *ejs, cchar *path) |
| Create a FileSystem object. | |
| EjsPath* | ejsCreatePath(Ejs *ejs, cchar *path) |
| Create a Path object. | |
| bool | ejsIsPath(EjsVar *vp) |
| Determine if a variable is a Path. | |
| EjsRegExp* | ejsCreateRegExp(Ejs *ejs, cchar *pattern) |
| Create a new regular expression object. | |
| bool | ejsIsRegExp(EjsVar *vp) |
| Determine if the variable is a regular expression. | |
| EjsString* | ejsCreateBareString(Ejs *ejs, int len) |
| Create an empty string object. | |
| EjsString* | ejsCreateString(Ejs *ejs, cchar *value) |
| Create a string object. | |
| EjsString* | ejsCreateStringAndFree(Ejs *ejs, char *value) |
| Create a string object and free the argument. | |
| EjsString* | ejsCreateStringWithLength(Ejs *ejs, cchar *value, int len) |
| Create a string and reserve extra room. | |
| EjsString* | ejsDupString(Ejs *ejs, EjsString *sp) |
| Duplicate a string object. | |
| EjsString* | ejsToString(Ejs *ejs, EjsVar *vp) |
| Cast a variable to a string. | |
| int | ejsBindFunction(Ejs *ejs, EjsBlock *block, int slotNum, EjsNativeFunction fn) |
| Bind a native C function to a function property. | |
| int | ejsBindMethod(Ejs *ejs, EjsType *type, int slotNum, EjsNativeFunction fn) |
| Bind a native C function to a method property. | |
| EjsType* | ejsCreateType(Ejs *ejs, EjsName *name, struct EjsModule *up, EjsType *baseType, int size, int slotNum, int numTypeProp, int numInstanceProp, int attributes, void *data) |
| Create a new type object. | |
| int | ejsDefineGlobalFunction(Ejs *ejs, cchar *name, EjsNativeFunction fn) |
| Define a global function. | |
| int | ejsDefineInstanceProperty(Ejs *ejs, EjsType *type, int slotNum, EjsName *name, EjsType *propType, int attributes, EjsVar *value) |
| Define an instance property. | |
| EjsType* | ejsGetType(Ejs *ejs, int slotNum) |
| Get a type. | |
| bool | ejsIsA(Ejs *ejs, EjsVar *target, EjsType *type) |
| Test if an variable is an instance of a given type. | |
| bool | ejsIsInstanceBlock(EjsVar *vp) |
| Determine if a variable is an instance block. | |
| bool | ejsIsType(EjsVar *vp) |
| Determine if a variable is an type. | |
| bool | ejsIsTypeSubType(Ejs *ejs, EjsType *target, EjsType *baseType) |
| Test if a type is a derived type of a given base type. | |
| EjsVar* | ejsAllocVar(Ejs *ejs, struct EjsType *type, int size) |
| Allocate a new variable. | |
| EjsVar* | ejsCastVar(Ejs *ejs, EjsVar *vp, struct EjsType *type) |
| Cast a variable to a new type. | |
| EjsVar* | ejsCloneVar(Ejs *ejs, EjsVar *vp, bool deep) |
| Clone a variable. | |
| EjsObject* | ejsCopyObject(Ejs *ejs, EjsObject *src, bool deep) |
| Copy an object. | |
| EjsVar* | ejsCreateInstance(Ejs *ejs, struct EjsType *type, int argc, EjsVar **argv) |
| Create a new variable instance. | |
| EjsVar* | ejsCreateVar(Ejs *ejs, struct EjsType *type, int numSlots) |
| Create a variable. | |
| int | ejsDefineProperty(Ejs *ejs, EjsVar *vp, int slotNum, EjsName *qname, struct EjsType *type, int attributes, EjsVar *value) |
| Define a property. | |
| int | ejsDeleteProperty(Ejs *ejs, EjsVar *vp, int slotNum) |
| Delete a property. | |
| int | ejsDeletePropertyByName(Ejs *ejs, EjsVar *vp, EjsName *qname) |
| Delete a property by name. | |
| void | ejsDestroyVar(Ejs *ejs, EjsVar *vp) |
| Destroy a variable. | |
| void | ejsFinalizeVar(Ejs *ejs, EjsVar *vp) |
| Finalize a variable before destroying. | |
| void | ejsFreeVar(Ejs *ejs, EjsVar *vp) |
| Free a new variable. | |
| EjsVar* | ejsGetProperty(Ejs *ejs, EjsVar *vp, int slotNum) |
| Get a property. | |
| EjsVar* | ejsGetPropertyByName(Ejs *ejs, EjsVar *vp, EjsName *qname) |
| Get a property by name. | |
| int | ejsGetPropertyCount(Ejs *ejs, EjsVar *vp) |
| Get a count of properties in a variable. | |
| EjsName | ejsGetPropertyName(Ejs *ejs, EjsVar *vp, int slotNum) |
| Get a variable property's name. | |
| struct EjsTrait* | ejsGetPropertyTrait(Ejs *ejs, EjsVar *vp, int slotNum) |
| Get a property's traits. | |
| EjsType* | ejsGetVarType(EjsVar *vp) |
| Get a variables type. | |
| EjsVar* | ejsInvokeOperator(Ejs *ejs, EjsVar *vp, int opCode, EjsVar *rhs) |
| Invoke an opcode on a native type. | |
| int | ejsLookupProperty(Ejs *ejs, EjsVar *vp, EjsName *qname) |
| Lookup a property by name. | |
| void | ejsMarkVar(Ejs *ejs, EjsVar *parent, EjsVar *vp) |
| Mark a variable as currently in use. | |
| EjsVar* | ejsSerialize(Ejs *ejs, EjsVar *value, int maxDepth, bool showAll, bool showBase) |
| Serialize a variable. | |
| int | ejsSetProperty(Ejs *ejs, EjsVar *vp, int slotNum, EjsVar *value) |
| Set a property's value. | |
| int | ejsSetPropertyByName(Ejs *ejs, EjsVar *vp, EjsName *qname, EjsVar *value) |
| Set a property's value. | |
| int | ejsSetPropertyName(Ejs *ejs, EjsVar *vp, int slotNum, EjsName *qname) |
| Set a property's name. | |
| int | ejsSetPropertyTrait(Ejs *ejs, EjsVar *vp, int slotNum, struct EjsType *type, int attributes) |
| Set a property's traits. |
| MprNumber | Configured numeric type. |
| EjsCode | Byte code. |
| EjsEx | Exception Handler Record. |
| EjsHashEntry | Hash entry for a property. |
| EjsList | List type. |
| EjsLookup | Lookup State. |
| EjsNames | Property Names. |
| EjsService | Ejscript Service structure. |
| EjsStack | Evaluation stack. |
| EjsTrait | Property traits. |
| EjsTypeHelpers | Type Helpers. |
| #define | _h_EJS_BYTECODETABLE_H 1 |
| ejsByteCodeTable.h - Master Byte Code Table. | |
| #define | _h_EJS_WEB_h 1 |
| ejsWeb.h -- Header for the Ejscript Web Framework. | |
| #define | EJS_ATTR_BLOCK_HELPERS (1 << 7) |
| Use block helper methods. | |
| #define | EJS_ATTR_BUILTIN (1 << 12) |
| Type is builtin. | |
| #define | EJS_ATTR_CALLS_SUPER (1 << 11) |
| Constructor calls super(). | |
| #define | EJS_ATTR_CONST (1 << 16) |
| Property is constant after first assignment. | |
| #define | EJS_ATTR_CONSTRUCTOR (1 << 26) |
| Method is a constructor. | |
| #define | EJS_ATTR_DYNAMIC_INSTANCE (1 << 17) |
| Instances are not sealed. | |
| #define | EJS_ATTR_ENUMERABLE (1 << 19) |
| Property is visible. | |
| #define | EJS_ATTR_FINAL (1 << 14) |
| Type can't be subclassed. | |
| #define | EJS_ATTR_FULL_SCOPE (1 << 28) |
| Function needs closure when defined. | |
| #define | EJS_ATTR_GETTER (1 << 20) |
| Property is a getter. | |
| #define | EJS_ATTR_HAS_CONSTRUCTOR (1 << 4) |
| Type has a constructor. | |
| #define | EJS_ATTR_HAS_INITIALIZER (1 << 9) |
| Type has an initializer. | |
| #define | EJS_ATTR_HAS_RETURN (1 << 29) |
| Function has a return statement. | |
| #define | EJS_ATTR_HAS_STATIC_INITIALIZER (1 << 10) |
| Type has an initializer. | |
| #define | EJS_ATTR_HAS_VALUE (1 << 31) |
| Property has a value record. | |
| #define | EJS_ATTR_INITIALIZER (1 << 3) |
| Initializer code. | |
| #define | EJS_ATTR_INTERFACE (1 << 30) |
| Class is an interface. | |
| #define | EJS_ATTR_LITERAL_GETTER (1 << 21) |
| Property is a getter in object literal. | |
| #define | EJS_ATTR_NATIVE (1 << 1) |
| Property is builtin. | |
| #define | EJS_ATTR_NO_BIND (1 << 13) |
| Type properties are never bound. | |
| #define | EJS_ATTR_OBJECT (1 << 18) |
| Instances are based on EjsObject. | |
| #define | EJS_ATTR_OBJECT_HELPERS (1 << 6) |
| Use object helper methods. | |
| #define | EJS_ATTR_OPER_OVERLOAD (1 << 5) |
| Type overloaded operators. | |
| #define | EJS_ATTR_OPERATOR (1 << 22) |
| Operator. | |
| #define | EJS_ATTR_OVERRIDE (1 << 15) |
| Override base type. | |
| #define | EJS_ATTR_PROTOTYPE (1 << 2) |
| TODO - not supported yet (KEEP). | |
| #define | EJS_ATTR_READONLY (1 << 23) |
| Readonly outside class. | |
| #define | EJS_ATTR_REST (1 << 27) |
| Parameter is a "..." rest. | |
| #define | EJS_ATTR_SETTER (1 << 24) |
| Property is a settter. | |
| #define | EJS_ATTR_SLOTS_NEED_FIXUP (1 << 8) |
| Missing inherited slots. | |
| #define | EJS_ATTR_STATIC (1 << 25) |
| Class static property. | |
| #define | EJS_FLAG_COMPILER 0x4 |
| Running inside the compiler. | |
| #define | EJS_FLAG_DOC 0x40 |
| Load documentation from modules. | |
| #define | EJS_FLAG_EMPTY 0x2 |
| Create an empty interpreter without native elements. | |
| #define | EJS_FLAG_EVENT 0x1 |
| Event pending. | |
| #define | EJS_FLAG_EXIT 0x80 |
| Interpreter should exit. | |
| #define | EJS_FLAG_LOADING 0x100 |
| Loading a module. | |
| #define | EJS_FLAG_MASTER 0x20 |
| Create a master interpreter. | |
| #define | EJS_FLAG_NO_EXE 0x8 |
| VM will not execute code. | |
| #define | EJS_FLAG_NOEXIT 0x200 |
| App should service events and not exit. | |
| #define | EJS_FLAGS_ENUM_ALL 0x2 |
| Enumerate non-enumerable and fixture properties. | |
| #define | EJS_FLAGS_ENUM_INHERITED 0x1 |
| Enumerate inherited base classes. | |
| #define | EJS_GC_IN_USE 0xe801e2ec |
| Magic number when allocated. | |
| #define | EJS_GC_WORK_QUOTA 512 |
| Allocations required before garbage colllection. | |
| #define | EJS_HASH_MIN_PROP 8 |
| Min props to hash. | |
| #define | EJS_LOTSA_PROP 256 |
| Object with lots of properties. | |
| #define | EJS_MAX_TYPE 256 |
| Maximum number of types. | |
| #define | EJS_NUM_GLOBAL 256 |
| Number of globals slots to pre-create. | |
| #define | EJS_NUM_PROP 8 |
| Default object number of properties. | |
| #define | EJS_SPEC_ECMA 0 |
| Run in strict ECMA-262 compliance mode. | |
| #define | EJS_SPEC_FIXED 2 |
| Run with ECMA-262 plus enhancements and add breaking fixes. | |
| #define | EJS_SPEC_PLUS 1 |
| Run in enhanced ECMA-262 with non-breaking changes. | |
| #define | ejsIsNull ejsIs(vp, ES_Null) |
| Determine if a variable is a null. | |
| #define | ejsIsNull ejsIs(vp, ES_Null) |
| Determine if a variable is a null. |
Ejsript Interperter Management.
Create an ejs interpreter.
| ctx | Any memory context returned by mprAlloc. |
| master | Optional master interpreter to clone. |
| searchPath | Module search path to use. Set to NULL for the default search path. |
| flags | Optional flags to modify the interpreter behavior. Valid flags are:
|
Open the Ejscript service.
| ctx | Any memory context returned by mprAlloc. |
Evaluate a file.
| path | Filename of the script to evaluate. |
Evaluate a module.
| path | Filename of the module to evaluate. |
Evaluate a script.
| script | Script to evaluate. |
Instruct the interpreter to exit.
| ejs | Interpeter object returned from ejsCreate. |
| status | Reserved and ignored. |
Get the hosting handle.
| ejs | Interpeter object returned from ejsCreate. |
Report an error message using the MprLog error channel.
| ejs | Interpeter object returned from ejsCreate. |
| fmt | Is an alternate printf style format to emit if the interpreter has no valid error message. |
| ... | Arguments for fmt. |
Set the module search path.
| ejs | Ejs interpreter. |
| ejsPath | Search path. This is a colon (or semicolon on Windows) separated string of directories. |
Throw an exception.
| ejs | Interpeter object returned from ejsCreate. |
| error | Exception argument object. |
Array class.
| EjsVar ** | data | Array elements. | |
| int | length | Array length property. | |
| EjsObject | obj | Extends Object. |
Create an array.
| ejs | Ejs reference returned from ejsCreate. |
| size | Initial size of the array. |
Determine if a variable is an array.
| vp | Variable to test. |
Block class.
| uint | hasScriptFunctions | Block has non-native functions requiring namespaces. | |
| cchar * | name | Block name. | |
| EjsList | namespaces | Current list of namespaces open in this block of properties. | |
| int | numInherited | Number of inherited traits. | |
| int | numTraits | Number of allocated traits. | |
| EjsObject | obj | Extends Object - Property storage. | |
| struct EjsBlock * | scopeChain | Lexical scope chain for this block. | |
| int | sizeTraits | Size of traits. | |
| EjsTrait * | traits | Actual property traits. |
Determine if a variable is a block.
| vp | Variable to test. |
Boolean class.
| bool | value | Boolean value. | |
| EjsVar | var | Logically extends Object. |
Create a boolean.
| ejs | Ejs reference returned from ejsCreate. |
| value | Desired boolean value. Set to 1 for true and zero for false. |
Get the C boolean value from a boolean object.
| vp | Boolean variable to access. |
Determine if a variable is a boolean.
| vp | Variable to test. |
Cast a variable to a boolean.
| ejs | Ejs reference returned from ejsCreate. |
| vp | Variable to cast. |
ByteArray class.
| int | endian | Endian encoding. | |
| bool | growable | Aray is growable. | |
| int | growInc | Current read position. | |
| EjsFunction * | input | Input callback function to get more data. | |
| int | length | Length property. | |
| EjsFunction * | output | Output callback function send data. | |
| int | readPosition | Current read position. | |
| int | swap | I/O must swap bytes due to endian byte ordering. | |
| uchar * | value | Data bytes in the array. | |
| EjsVar | var | Logically extends Object. | |
| int | writePosition | Current write position. |
Create a byte array.
| ejs | Ejs reference returned from ejsCreate. |
| size | Initial size of the byte array. |
Determine if a variable is a byte array.
| vp | Variable to test. |
Set the I/O byte array positions.
| ejs | Ejs reference returned from ejsCreate. |
| ap | Byte array object. |
| readPosition | New read position to set. |
| writePosition | New write position to set. |
Date class.
| MprTime | value | Time in milliseconds since "1970/01/01 GMT". | |
| EjsVar | var | Logically extends Object. |
Determine if a variable is a Date.
| vp | Variable to test. |
Error classes.
| int | code | Unique error lookup code. | |
| char * | message | Exception message. | |
| EjsObject | obj | Extends Object. | |
| char * | stack | Execution stack back trace. |
Format the stack backtrace.
| ejs | Ejs reference returned from ejsCreate. |
Get the interpreter error message.
| ejs | Ejs reference returned from ejsCreate. |
| withStack | Set to 1 to include a stack backtrace in the error message. |
Determine if an exception has been thrown.
| ejs | Ejs reference returned from ejsCreate. |
Throw an argument exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an math exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an assertion exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an general error exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an instruction code exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an internal error exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an IO exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an Memory depletion exception.
| ejs | Ejs reference returned from ejsCreate. |
Throw an out of bounds exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an reference exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an resource exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an state exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an syntax error exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
Throw an type error exception.
| ejs | Ejs reference returned from ejsCreate. |
| fmt | Printf style format string to use for the error message. |
| ... | Message arguments. |
File class.
| MprFile * | file | Open file handle. | |
| MprPath | info | Cached file info. | |
| int | mode | Current open mode. | |
| char * | modeString | User supplied mode string. | |
| EjsObject | obj | Extends Object. | |
| char * | path | Filename path. | |
| int | perms | Posix permissions mask. |
FileSystem class.
| MprFileSystem * | fs | MPR file system object. | |
| EjsObject | obj | Extends Object. | |
| char * | path | Filename path. |
Determine if a variable is a Path.
| vp | Variable to test. |
Function class.
| EjsBlock | block | Base block. Only used for closures. | |
| EjsCode | code | Byte code. | |
| uint | constructor | Function is a constructor. | |
| uint | fullScope | Closures must capture full scope. | |
| uint | getter | Function is a getter. | |
| uint | hasReturn | Function has a return stmt. | |
| uint | isInitializer | Function is an initializer function. | |
| uint | lang | Language compliance level: ecma|plus|fixed. | |
| uint | literalGetter | Function is in an object literal. | |
| int | nextSlot | Next multimethod or getter/setter. | |
| uint | numArgs | Count of parameters. | |
| uint | numDefault | Count of parameters with default initializers. | |
| EjsObject * | obj | Function.properties. Demand created. | |
| uint | override | Function overrides a base class method. | |
| EjsVar * | owner | Back reference to original owning block. | |
| EjsNativeFunction | proc | Native function pointer. | |
| EjsType * | prototype | Function.prototype. Demand created. | |
| uint | rest | Function has a "..." rest of args parameter. | |
| struct EjsType * | resultType | Return type of method. | |
| uint | setter | Function is a setter. | |
| int | slotNum | Slot number in owner for this function. | |
| uint | staticMethod | Function is a static method. | |
| EjsVar * | thisObj | Bound "this" for closures. |
Create a function object.
| ejs | Ejs reference returned from ejsCreate. |
| code | Pointer to the byte code. The byte code is not copied so this must be a persistent pointer. |
| codeLen | Length of the code. |
| numArgs | Number of formal arguments to the function. |
| numExceptions | Number of exception handlers. |
| returnType | Return type of the function. Set to NULL for no defined type. |
| attributes | Integer mask of access attributes. |
| constants | Reference to the module constant pool. Some byte code opcodes contain references into the constant pool. |
| scope | Reference to the chain of blocks that that comprises the lexical scope chain for this function. |
| lang | Language level (ecma|plus|fixed). Use constants EJS_SPEC_ECMA, EJS_SPEC_PLUS, EJS_SPEC_FIXED. |
Determine if a variable is a function.
This will return true if the variable is a function of any kind, including methods, native and script functions or initializers| vp | Variable to test. |
Determine if the function is an initializer.
Initializers are special functions created by the compiler to do static and instance initialization of classes during construction| vp | Variable to test. |
Determine if the function is a native function.
Functions can be either native - meaning the implementation is via a C function, or can be scripted| vp | Variable to test. |
Run a function.
| ejs | Ejs reference returned from ejsCreate. |
| fn | Function object to run. |
| obj | Object to use as the "this" object when running the function. |
| argc | Count of actual parameters. |
| argv | Vector of actual parameters. |
Run a function by slot number.
| ejs | Ejs reference returned from ejsCreate. |
| obj | Object that holds the function at its "slotNum" slot. Also use this object as the "this" object when running the function. |
| slotNum | Slot number in obj that contains the function to run. |
| argc | Count of actual parameters. |
| argv | Vector of actual parameters. |
Run the initializer for a module.
| ejs | Ejs reference returned from ejsCreate. |
| module | Module object reference. |
Http Class.
| EjsFunction * | callback | Async callback function. | |
| char * | certFile | SSL certificate file. | |
| MprBuf * | content | Response data. | |
| int | contentLength | Expected content length for post/put data. | |
| Ejs * | ejs | Convenience access to ejs interpreter instance. | |
| uint | followRedirects | Transparently follow 30X redirects. | |
| uint | gotResponse | Request has been sent and response headers have been received. | |
| MprHttp * | http | Underlying MPR http object. | |
| char * | keyFile | SSL key file. | |
| char * | method | HTTP method. | |
| EjsObject | obj | Extends Object. | |
| char * | postData | Post data supplied via post() method. | |
| int | readOffset | Read response I/O ptr. | |
| uint | requestStarted | Request started and connection to server is open. | |
| char * | uri | Target uri. |
Iterator Class.
| bool | deep | Iterator deep (recursively over all properties). | |
| int | index | Current index. | |
| EjsVar * | indexVar | Reference to current item. | |
| EjsArray * | namespaces | Namespaces to consider in iteration. | |
| EjsNativeFunction | nativeNext | Native next function. | |
| EjsVar * | target | Object to be enumerated. | |
| EjsVar | var | Logically extends Object. |
Create an iterator object.
| ejs | Ejs reference returned from ejsCreate. |
| target | Target variable to iterate or enumerate. |
| next | Function to invoke to step to the next element. |
| deep | Set to true to do a deep iteration/enumeration. |
| namespaces | Reserved and not used. Supply NULL. |
Qualified name structure.
| cchar * | name | Property name. | |
| cchar * | space | Property namespace. |
Allocate and Initialize a Qualified Name structure.
| ctx | Any memory context returned by mprAlloc. |
| space | Namespace string. |
| name | Name string. |
Initialize a Qualified Name structure.
| qname | Reference to an existing, uninitialized EjsName structure. |
| space | Namespace string. |
| name | Name string. |
Namespace Class.
| int | flags | Fast comparison flags. | |
| char * | name | Textual name of the namespace. | |
| char * | uri | Optional uri definition. | |
| EjsVar | var | Logically extends Object. |
Create a namespace object.
| ejs | Ejs reference returned from ejsCreate. |
| name | Space name to use for the namespace. |
| uri | URI to associate with the namespace. |
Determine if a variable is a namespace.
Number class.
| MprNumber | value | Numeric value. | |
| EjsVar | var | Logically extends Object. |
Create a number object.
| ejs | Ejs reference returned from ejsCreate. |
| value | Numeric value to initialize the number object. |
Get the numeric value stored in a EjsNumber object.
| vp | Variable to examine. |
Get the numeric value stored in a EjsNumber object.
| vp | Variable to examine. |
Get the numeric value stored in a EjsNumber object.
| vp | Variable to examine. |
Determine if a variable is a number.
| vp | Variable to examine. |
Cast a variable to a number.
| ejs | Ejs reference returned from ejsCreate. |
| vp | Variable to cast. |
Object Type.
| int | capacity | Current capacity for properties. | |
| EjsNames * | names | Hash table of property names. | |
| int | numProp | Number of properties. | |
| EjsVar ** | slots | Vector of slots containing var references. | |
| EjsVar | var | Implement EjsVar interface. |
Create an object instance of the specified type.
| ejs | Interpreter instance returned from ejsCreate. |
| type | Base type to use when creating the object instance. |
| size | Number of extra slots to allocate when creating the object. |
Create an object instance of the specified type.
| ejs | Interpreter instance returned from ejsCreate. |
| type | Base type to use when creating the object instance. |
| size | Number of extra slots to allocate when creating the object. |
| dynamic | Set to true to make the object as being dynamic. Dynamic objects can create new properties and grow at any time. |
Create a simple object.
| ejs | Interpreter instance returned from ejsCreate. |
Grow an object.
| ejs | Interpreter instance returned from ejsCreate. |
| obj | Object reference to grow. |
| size | New minimum count of properties. If size is less than the current number of properties, the call will be ignored, i.e. it will not shrink objects. |
Determine if a variable is an EjsObject.
| vp | Variable to test. |
Mark an object as currently in use.
| ejs | Interpreter instance returned from ejsCreate. |
| parent | Owning variable for the property. |
| obj | Object to mark as currently being used. |
Path class.
| MprList * | files | File list for enumeration. | |
| MprPath | info | Cached file info. | |
| EjsObject | obj | Extends Object. | |
| char * | path | Filename path. |
Create a FileSystem object.
| ejs | Ejs reference returned from ejsCreate. |
| path | Path to describe the file system. Can be any path in the file system. |
Determine if a variable is a Path.
| vp | Variable to test. |
RegExp Class.
| void * | compiled | Compiled pattern. | |
| int | endLastMatch | End of the last match (one past end). | |
| bool | global | Search for pattern globally (multiple times). | |
| bool | ignoreCase | Do case insensitive matching. | |
| struct EjsString * | matched | Last matched component. | |
| bool | multiline | Match patterns over multiple lines. | |
| char * | pattern | Pattern to match with. | |
| int | startLastMatch | Start of the last match. | |
| EjsVar | var | Logically extends Object. |
Create a new regular expression object.
| ejs | Ejs reference returned from ejsCreate. |
| pattern | Regular expression pattern string. |
Determine if the variable is a regular expression.
String Class.
| int | length | String length (sans null). | |
| char * | value | String value. Currently UTF-8. Will upgrade to UTF-16 soon. | |
| EjsVar | var | Logically extentends Object. |
Create an empty string object.
| ejs | Ejs reference returned from ejsCreate. |
| len | Length of space to reserve for future string data. |
Create a string object.
| ejs | Ejs reference returned from ejsCreate. |
| value | C string value to define for the string object. Note: this will soon be changed to unicode. |
Create a string object and free the argument.
| ejs | Ejs reference returned from ejsCreate. |
| value | C string value to define for the string object. Note: this will soon be changed to unicode. |
Create a string and reserve extra room.
| ejs | Ejs reference returned from ejsCreate. |
| value | C string value to define for the string object. Note: this will soon be changed to unicode. |
| len | Length of the string storage to allocate. |
Duplicate a string object.
| ejs | Ejs reference returned from ejsCreate. |
| sp | String value to copy. |
Cast a variable to a string.
| ejs | Ejs reference returned from ejsCreate. |
| vp | Variable to cast. |
Timer Class.
| EjsFunction * | callback | Callback function. | |
| int | drift | Event is allowed to drift. | |
| Ejs * | ejs | Need interpreter reference in callback. | |
| MprEvent * | event | MPR event for the timer. | |
| EjsObject | obj | Extends Object. | |
| int | period | Time in msec between invocations. |
Type class.
| struct EjsType * | baseType | Base class. | |
| EjsBlock | block | Type properties (functions and static properties). | |
| uint | callsSuper | Constructor calls super(). | |
| uint | dynamicInstance | Instances may add properties. | |
| uint | final | Type is final. | |
| uint | fixupDone | Slot fixup performed. | |
| uint | hasBaseConstructors | Base types has constructors. | |
| uint | hasBaseInitializers | Base types have initializers. | |
| uint | hasBaseStaticInitializers | Base types have initializers. | |
| uint | hasConstructor | Type has a constructor. | |
| uint | hasFinalizer | Instances need finalization. | |
| uint | hasInitializer | Type has instance level initialization code. | |
| uint | hasObject | Type based on EjsObject. | |
| uint | hasStaticInitializer | Type has static level initialization code. | |
| struct EjsTypeHelpers * | helpers | Type helper methods. | |
| short | id | Unique type id. | |
| MprList * | implements | List of implemented interfaces. | |
| uint | initialized | Static initializer has run. | |
| EjsBlock * | instanceBlock | Instance properties template. | |
| ushort | instanceSize | Size of instances in bytes. | |
| uint | isInterface | Interface vs class. | |
| struct EjsModule * | module | Module owning the type - stores the constant pool. | |
| uint | needFixup | Slots need fixup. | |
| uint | nobind | Don't bind properties for this type to slots. | |
| uint | numAlloc | Allocation chunking increment. | |
| uint | numericIndicies | Instances support direct numeric indicies. | |
| uint | operatorOverload | Using overloaded operators - TODO not used. | |
| EjsName | qname | Qualified name of the type. Type name and namespace. | |
| uint | separateInstanceSlots | Instances slots allocated separately to object. | |
| uint | skipScope | Skip examining this object when searching the scope chain. | |
| uint | subTypeCount | Length of baseType chain Governed by EJS_MAX_BASE_CLASS. | |
| void * | typeData | Type specific data. |
Bind a native C function to a function property.
| ejs | Interpreter instance returned from ejsCreate. |
| block | Block containing the function property to bind. |
| slotNum | Slot number of the method property. |
| fn | Native C function to bind. |
Bind a native C function to a method property.
| ejs | Interpreter instance returned from ejsCreate. |
| type | Type containing the function property to bind. |
| slotNum | Slot number of the method property. |
| fn | Native C function to bind. |
Create a new type object.
| ejs | Ejs reference returned from ejsCreate. |
| name | Qualified name to give the type. This name is merely referenced by the type and must be persistent. This name is not used to define the type as a global property. |
| up | Reference to a module that will own the type. Set to null if not owned by any module. |
| baseType | Base type for this type. |
| size | Size of instances. This is the size in bytes of an instance object. |
| slotNum | Slot number that the type will be installed at. This is used by core types to define a unique type ID. For non-core types, set to -1. |
| numTypeProp | Number of type (class) properties for the type. These include static properties and methods. |
| numInstanceProp | Number of instance properties. |
| attributes | Attribute mask to modify how the type is initialized. Valid values include:
|
| data |
Define a global function.
Define an instance property.
| ejs | Interpreter instance returned from ejsCreate. |
| type | Type in which to create the instance property. |
| slotNum | Instance slot number in the type that will hold the property. Set to -1 to allocate the next available free slot. |
| name | Qualified name for the property including namespace and name. |
| propType | Type of the instance property. |
| attributes | Integer mask of access attributes. |
| value | Initial value of the instance property. |
Get a type.
| ejs | Interpreter instance returned from ejsCreate. |
| slotNum | Slot number of the type to retrieve. Use ES_TYPE defines. |
Test if an variable is an instance of a given type.
| ejs | Interpreter instance returned from ejsCreate. |
| target | Target variable to test. |
| type | Type to compare with the target. |
Determine if a variable is an instance block.
Types store the template for instance properties in an instance block object| vp | Variable to test. |
Determine if a variable is an type.
| vp | Variable to test. |
Test if a type is a derived type of a given base type.
| ejs | Interpreter instance returned from ejsCreate. |
| target | Target type to test. |
| baseType | Base class to see if the target subclasses it. |
Foundation Variable Interface.
| uint | builtin | Property is always present. | |
| uint | dynamic | Object may add properties. Derrived from type. | |
| uint | generation | GC generation for this var. | |
| uint | hasGetterSetter | Class has getter/setter functions. | |
| uint | hidden | Not enumerable via for/in. | |
| uint | isFrame | Is a frame (stack-based var). | |
| uint | isFunction | Instance is a function. | |
| uint | isInstanceBlock | Object is a type instance block object. | |
| uint | isObject | Instance is an Object. | |
| uint | isType | Instance is a type object (TODO Could do without this bit). | |
| uint | jsonVisited | JSON traversal. | |
| uint | marked | GC marked in use. | |
| uint | native | Native property backed by C/Java implementation. | |
| uint | nativeProc | Method has native proc. | |
| struct EjsVar * | next | GC linkage. | |
| uint | permanent | Object is immune from GC. | |
| uint | refLinks | Cross generational reference mask. | |
| uint | rootLinks | Cross generational root mask. | |
| uint | survived | Object has survived one GC pass. | |
| struct EjsType * | type | Type of this object (not base type). ie. type for Object is EjsType. | |
| uint | visited | Has been traversed. |
Allocate a new variable.
| ejs | Interpreter instance returned from ejsCreate. |
| type | Type object from which to create an object instance. |
| size | Size of extra property slots to reserve. This is used for dynamic objects. |
Cast a variable to a new type.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to cast. |
| type | Type to cast to. |
Clone a variable.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to clone. |
| deep | Set to true to do a deep copy. |
Copy an object.
| ejs | Interpreter instance returned from ejsCreate. |
| src | Source object to copy. |
| deep | Set to true to do a deep copy. |
Create a new variable instance.
| ejs | Interpreter instance returned from ejsCreate. |
| type | Type from which to create a new instance. |
| argc | Count of args in argv. |
| argv | Vector of arguments. Each arg is an EjsVar. |
Create a variable.
| ejs | Interpreter instance returned from ejsCreate. |
| type | Type to cast to. |
| numSlots | Size of extra property slots to reserve. This is used for dynamic objects. |
Define a property.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable in which to define a property. |
| slotNum | Slot number in the variable for the property. Slots are numbered sequentially from zero. Set to -1 to request the next available slot number. |
| qname | Qualified name containing a name and a namespace. |
| type | Base type of the property. Set to ejs->voidType to leave as untyped. |
| attributes | Attribute traits. Useful attributes include:
|
| value | Initial value of the property. |
Delete a property.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable in which to delete the property. |
| slotNum | Slot number in the variable for the property to delete. |
Delete a property by name.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable in which to delete the property. |
| qname | Qualified name for the property including name and namespace. |
Destroy a variable.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Varaible to destroy. |
Finalize a variable before destroying.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to cast. |
Free a new variable.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to free. |
Get a property.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to examine. |
| slotNum | Slot number for the requested property. |
Get a property by name.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to examine. |
| qname | Qualified name specifying both a namespace and name. |
Get a count of properties in a variable.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to examine. |
Get a variable property's name.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to examine. |
| slotNum | Slot number for the requested property. |
Get a property's traits.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to examine. |
| slotNum | Slot number for the requested property. |
Get a variables type.
| vp | Variable reference. |
Invoke an opcode on a native type.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to examine. |
| opCode | Byte ope code to execute. |
| rhs | Expression right hand side for binary expression op codes. May be null for other op codes. |
Lookup a property by name.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to examine. |
| qname | Qualified name of the property to search for. |
Mark a variable as currently in use.
| ejs | Interpreter instance returned from ejsCreate. |
| parent | Owning variable for the property. |
| vp | Variable to mark as currently being used. |
Serialize a variable.
Set a property's value.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to examine. |
| slotNum | Slot number for the requested property. |
| value | Reference to a value to store. |
Set a property's value.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to examine. |
| qname | Qualified property name. |
| value | Reference to a value to store. |
Set a property's name.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to examine. |
| slotNum | Slot number of the property in the variable. |
| qname | Qualified property name. |
Set a property's traits.
| ejs | Interpreter instance returned from ejsCreate. |
| vp | Variable to examine. |
| slotNum | Slot number of the property in the variable. |
| type | Base type for the property. Set to NULL for an untyped property. |
| attributes | Integer mask of access attributes. |
Copy data into a byte array.
| ejs | Ejs reference returned from ejsCreate. |
| ap | Byte array object. |
| offset | Offset in the byte array to which to copy the data. |
| data | Pointer to the source data. |
| length | Length of the data to copy. |
Determine if a variable is a File.
| vp | Variable to test. |
Run a script.
| ejs | Interpeter object returned from ejsCreate. |
Configured numeric type.
The configure program will define BLD_FEATURE_NUM_TYPE to be either double, float, int or int64Byte code.
| uchar * | byteCode | Byte code. | |
| int | codeLen | Byte code length. | |
| struct EjsConst * | constants | Constant pool. Reference to module constant pool. | |
| int | finallyIndex | Index in handlers for finally handler. | |
| struct EjsEx ** | handlers | Exception handlers. | |
| int | numHandlers | Number of exception handlers. | |
| int | sizeHandlers | Size of handlers array. |
Exception Handler Record.
| struct EjsType * | catchType | Type of error to catch. | |
| uint | flags | Exception flags. | |
| uint | handlerEnd | Ptr to one past the end. | |
| uint | handlerStart | Ptr to start of catch block. | |
| uint | tryEnd | Ptr to one past the end. | |
| uint | tryStart | Ptr to start of try block. |
Hash entry for a property.
| int | nextSlot | Next property in hash chain. | |
| EjsName | qname | Property name. |
List type.
Lookup State.
Property Names.
| int * | buckets | Hash buckets and head of link chains. | |
| EjsHashEntry * | entries | Hash entries. | |
| int | sizeBuckets | Size of buckets. | |
| int | sizeEntries | Size of entries array in elements. |
Ejscript Service structure.
Evaluation stack.
Property traits.
| int | attributes | Property attributes. | |
| struct EjsType * | type | Property type. |
Type Helpers.