Go to the source code of this file.
Classes
Macros
Typedefs
Enumerations
enum
VALUE_TYPE {
T_UNDEFINED = 0,
T_NULL = 1,
T_BOOL,
T_INT,
T_FLOAT,
T_STRING,
T_DATE,
T_CURRENCY,
T_LENGTH,
T_ARRAY,
T_MAP,
T_FUNCTION,
T_BYTES,
T_OBJECT,
T_DOM_OBJECT
}
enum
VALUE_UNIT_TYPE {
UT_EM = 1,
UT_EX = 2,
UT_PR = 3,
UT_SP = 4,
reserved1 = 5,
reserved2 = 6,
UT_PX = 7,
UT_IN = 8,
UT_CM = 9,
UT_MM = 10,
UT_PT = 11,
UT_PC = 12,
UT_DIP = 13,
reserved3 = 14,
UT_COLOR = 15,
UT_URL = 16
}
Functions
Macro Definition Documentation
#define FLOAT_VALUE double
Typedef Documentation
typedef BOOL SC_CALLBACK KeyValueCallback(LPVOID param, const
VALUE *pkey, const
VALUE *pval)
typedef VOID NATIVE_FUNCTOR_INVOKE(VOID *tag, UINT argc, const
VALUE *argv,
VALUE *retval)
typedef VOID NATIVE_FUNCTOR_RELEASE(VOID *tag)
Enumeration Type Documentation
| Enumerator |
|---|
| HV_OK_TRUE |
| HV_OK |
| HV_BAD_PARAMETER |
| HV_INCOMPATIBLE_TYPE |
Definition at line 6 of file value.h.
| Enumerator |
|---|
| CVT_SIMPLE |
simple conversion of terminal values
|
| CVT_JSON_LITERAL |
json literal parsing/emission
|
| CVT_JSON_MAP |
json parsing/emission, it parses as if token '{' already recognized
|
| CVT_XJSON_LITERAL |
x-json parsing/emission, date is emitted as ISO8601 date literal, currency is emitted in the form DDDD$CCC
|
Definition at line 245 of file value.h.
| Enumerator |
|---|
| T_UNDEFINED |
| T_NULL |
| T_BOOL |
| T_INT |
| T_FLOAT |
| T_STRING |
| T_DATE |
| T_CURRENCY |
| T_LENGTH |
| T_ARRAY |
| T_MAP |
| T_FUNCTION |
| T_BYTES |
| T_OBJECT |
| T_DOM_OBJECT |
Definition at line 23 of file value.h.
| Enumerator |
|---|
| UT_EM |
| UT_EX |
| UT_PR |
| UT_SP |
| reserved1 |
| reserved2 |
| UT_PX |
| UT_IN |
| UT_CM |
| UT_MM |
| UT_PT |
| UT_PC |
| UT_DIP |
| reserved3 |
| UT_COLOR |
| UT_URL |
Definition at line 42 of file value.h.
| Enumerator |
|---|
| DT_HAS_DATE |
| DT_HAS_TIME |
| DT_HAS_SECONDS |
| DT_UTC |
Definition at line 62 of file value.h.
| Enumerator |
|---|
| UT_OBJECT_ARRAY |
| UT_OBJECT_OBJECT |
| UT_OBJECT_CLASS |
| UT_OBJECT_NATIVE |
| UT_OBJECT_FUNCTION |
| UT_OBJECT_ERROR |
Definition at line 71 of file value.h.
| Enumerator |
|---|
| UT_STRING_STRING |
| UT_STRING_ERROR |
| UT_STRING_SECURE |
| UT_STRING_SYMBOL |
Definition at line 82 of file value.h.
Function Documentation
UINT SCAPI ValueBinaryData
(
const
VALUE *
pval,
UINT *
pnBytes
)
inline |
ValueBinaryData - retreive integer data of T_BYTES type
Definition at line 587 of file sciter-x-api.h.
UINT SCAPI ValueBinaryDataSet
(
VALUE *
pval,
UINT
nBytes,
UINT
type,
UINT
units
)
inline |
ValueBinaryDataSet - sets VALUE to sequence of bytes of type T_BYTES 'type' here must be set to T_BYTES. Optionally sets units field too. The function creates local copy of bytes in its own storage.
Definition at line 588 of file sciter-x-api.h.
UINT SCAPI ValueClear
(
VALUE *
pval )
inline |
ValueClear - clears the VALUE and deallocates all assosiated structures that are not used anywhere else.
Definition at line 574 of file sciter-x-api.h.
UINT SCAPI ValueCompare
(
const
VALUE *
pval1,
)
inline |
ValueCompare - compares two values, returns HV_OK_TRUE if val1 == val2.
Definition at line 575 of file sciter-x-api.h.
UINT SCAPI ValueCopy
(
VALUE *
pdst,
)
inline |
UINT SCAPI ValueElementsCount
(
const
VALUE *
pval,
INT *
pn
)
inline |
ValueElementsCount - retreive number of sub-elements for:
- T_ARRAY - number of elements in the array;
- T_MAP - number of key/value pairs in the map;
- T_FUNCTION - number of arguments in the function;
Definition at line 589 of file sciter-x-api.h.
UINT SCAPI ValueEnumElements
(
const
VALUE *
pval,
LPVOID
param
)
inline |
UINT SCAPI ValueFloatData
(
const
VALUE *
pval,
)
inline |
ValueFloatData - retreive FLOAT_VALUE (double) data of T_FLOAT and T_LENGTH values.
Definition at line 585 of file sciter-x-api.h.
UINT SCAPI ValueFloatDataSet
(
VALUE *
pval,
UINT
type,
UINT
units
)
inline |
ValueFloatDataSet - sets FLOAT_VALUE data of T_FLOAT and T_LENGTH values.
Definition at line 586 of file sciter-x-api.h.
UINT SCAPI ValueFromString
(
VALUE *
pval,
LPCWSTR
str,
UINT
strLength,
UINT
how
)
inline |
ValueFromString - parses string into value:
- CVT_SIMPLE - parse/emit terminal values (T_INT, T_FLOAT, T_LENGTH, T_STRING), "guess" non-strict parsing
- CVT_JSON_LITERAL - parse/emit value using JSON literal rules: {}, [], "string", true, false, null
- CVT_JSON_MAP - parse/emit MAP value without enclosing '{' and '}' brackets. Returns: Number of non-parsed characters in case of errors. Thus if string was parsed in full it returns 0 (success)
Definition at line 597 of file sciter-x-api.h.
UINT SCAPI ValueGetValueOfKey
(
const
VALUE *
pval,
)
inline |
ValueGetValueOfKey - retrieves value of sub-element by key:
- T_MAP - value of key/value pair with the key;
- T_FUNCTION - value of argument with the name key;
- T_OBJECT (tiscript) - value of property of the object Otherwise *pretval will have T_UNDEFINED value.
Definition at line 595 of file sciter-x-api.h.
UINT SCAPI ValueInit
(
VALUE *
pval )
inline |
ValueInit - initialize VALUE storage This call has to be made before passing VALUE* to any other functions
Definition at line 573 of file sciter-x-api.h.
UINT SCAPI ValueInt64Data
(
const
VALUE *
pval,
INT64 *
pData
)
inline |
ValueInt64Data - retreive 64bit integer data of T_CURRENCY and T_DATE values.
Definition at line 583 of file sciter-x-api.h.
UINT SCAPI ValueInt64DataSet
(
VALUE *
pval,
INT64
data,
UINT
type,
UINT
units
)
inline |
ValueInt64DataSet - sets 64bit integer data of T_CURRENCY and T_DATE values.
Definition at line 584 of file sciter-x-api.h.
UINT SCAPI ValueIntData
(
const
VALUE *
pval,
INT *
pData
)
inline |
ValueIntData - retreive integer data of T_INT, T_LENGTH and T_BOOL types
Definition at line 581 of file sciter-x-api.h.
UINT SCAPI ValueIntDataSet
(
VALUE *
pval,
INT
data,
UINT
type,
UINT
units
)
inline |
ValueIntDataSet - sets VALUE integer data of T_INT and T_BOOL types Optionally sets units field too.
Definition at line 582 of file sciter-x-api.h.
UINT SCAPI ValueInvoke
(
const
VALUE *
pval,
UINT
argc,
LPCWSTR
url
)
inline |
ValueInvoke - function invocation (Sciter/TIScript).
- VALUE* pval is a value of type T_OBJECT/UT_OBJECT_FUNCTION
- VALUE* pthis - object that will be known as 'this' inside that function.
- UINT argc, const VALUE* argv - vector of arguments to pass to the function.
- VALUE* pretval - parse/emit MAP value without enclosing '{' and '}' brackets.
- LPCWSTR url - url or name of the script - used for error reporting in the script. Returns: HV_OK, HV_BAD_PARAMETER or HV_INCOMPATIBLE_TYPE
Definition at line 598 of file sciter-x-api.h.
BOOL SCAPI ValueIsNativeFunctor
(
const
VALUE *
pval )
inline |
UINT SCAPI ValueIsolate
(
VALUE *
pdst )
inline |
ValueIsolate - converts T_OBJECT value types to T_MAP or T_ARRAY. use this method if you need to pass values between different threads. The fanction is applicable for the Sciter
Definition at line 577 of file sciter-x-api.h.
UINT SCAPI ValueNativeFunctorSet
(
VALUE *
pval,
VOID *
tag = NULL
)
inline |
ValueNativeFunctorSet - set reference to native function
- VALUE* pval - value to be initialized
- NATIVE_FUNCTOR_INVOKE* pinvoke - reference to native functor implementation.
- NATIVE_FUNCTOR_RELEASE* prelease - reference to native functor dtor implementation.
- VOID* tag - optional tag, passed as it is to pinvoke and prelease Returns: HV_OK, HV_BAD_PARAMETER
Definition at line 599 of file sciter-x-api.h.
UINT SCAPI ValueNthElementKey
(
const
VALUE *
pval,
INT
n,
)
inline |
ValueEnumElements - enumeartes key/value pairs of T_MAP, T_FUNCTION and T_OBJECT values
- T_MAP - key of nth key/value pair in the map;
- T_FUNCTION - name of nth argument of the function (if any);
Definition at line 592 of file sciter-x-api.h.
UINT SCAPI ValueNthElementValue
(
const
VALUE *
pval,
INT
n,
)
inline |
ValueNthElementValue - retreive value of sub-element at index n for:
- T_ARRAY - nth element of the array;
- T_MAP - value of nth key/value pair in the map;
- T_FUNCTION - value of nth argument of the function;
Definition at line 590 of file sciter-x-api.h.
UINT SCAPI ValueNthElementValueSet
(
VALUE *
pval,
INT
n,
const
VALUE *
pval_to_set
)
inline |
ValueNthElementValueSet - sets value of sub-element at index n for:
- T_ARRAY - nth element of the array;
- T_MAP - value of nth key/value pair in the map;
- T_FUNCTION - value of nth argument of the function; If the VALUE is not of one of types above then it makes it of type T_ARRAY with single element - 'val_to_set'.
Definition at line 591 of file sciter-x-api.h.
UINT SCAPI ValueSetValueToKey
(
VALUE *
pval,
const
VALUE *
pval_to_set
)
inline |
ValueSetValueToKey - sets value of sub-element by key:
- T_MAP - value of key/value pair with the key;
- T_FUNCTION - value of argument with the name key;
- T_OBJECT (tiscript) - value of property of the object If the VALUE is not of one of types above then it makes it of type T_MAP with single pair - 'key'/'val_to_set'.
key usually is a value of type T_STRING
Definition at line 594 of file sciter-x-api.h.
UINT SCAPI ValueStringData
(
const
VALUE *
pval,
LPCWSTR *
pChars,
UINT *
pNumChars
)
inline |
ValueStringData - returns string data for T_STRING type For T_FUNCTION returns name of the fuction.
Definition at line 579 of file sciter-x-api.h.
UINT SCAPI ValueStringDataSet
(
VALUE *
pval,
LPCWSTR
chars,
UINT
numChars,
UINT
units
)
inline |
ValueStringDataSet - sets VALUE to T_STRING type and copies chars/numChars to internal refcounted buffer assosiated with the value.
Definition at line 580 of file sciter-x-api.h.
UINT SCAPI ValueToString
(
VALUE *
pval,
UINT
how
)
inline |
ValueToString - converts value to T_STRING inplace:
- CVT_SIMPLE - parse/emit terminal values (T_INT, T_FLOAT, T_LENGTH, T_STRING)
- CVT_JSON_LITERAL - parse/emit value using JSON literal rules: {}, [], "string", true, false, null
- CVT_JSON_MAP - parse/emit MAP value without enclosing '{' and '}' brackets.
Definition at line 596 of file sciter-x-api.h.
UINT SCAPI ValueType
(
const
VALUE *
pval,
UINT *
pType,
UINT *
pUnits
)
inline |
ValueType - returns VALUE_TYPE and VALUE_UNIT_TYPE flags of the VALUE
Definition at line 578 of file sciter-x-api.h.