Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions | Variables

Functions

const afw_value_tafw_function_execute_annotate (afw_function_execute_t *x)
 Adaptive Function annotate More...
 
const afw_value_tafw_function_execute_compare_uri (afw_function_execute_t *x)
 Adaptive Function compare_uri More...
 
const afw_value_tafw_function_execute_debug (afw_function_execute_t *x)
 Adaptive Function debug More...
 
const afw_value_tafw_function_execute_execution_start_time_local (afw_function_execute_t *x)
 Adaptive Function execution_start_time_local More...
 
const afw_value_tafw_function_execute_execution_start_time_utc (afw_function_execute_t *x)
 Adaptive Function execution_start_time_utc More...
 
const afw_value_tafw_function_execute_generate_uuid (afw_function_execute_t *x)
 Adaptive Function generate_uuid More...
 
const afw_value_tafw_function_execute_is_defined (afw_function_execute_t *x)
 Adaptive Function is_defined More...
 
const afw_value_tafw_function_execute_is_nullish (afw_function_execute_t *x)
 Adaptive Function is_nullish More...
 
const afw_value_tafw_function_execute_log (afw_function_execute_t *x)
 Adaptive Function log More...
 
const afw_value_tafw_function_execute_now_local (afw_function_execute_t *x)
 Adaptive Function now_local More...
 
const afw_value_tafw_function_execute_now_utc (afw_function_execute_t *x)
 Adaptive Function now_utc More...
 
const afw_value_tafw_function_execute_nullish_coalescing (afw_function_execute_t *x)
 Adaptive Function nullish_coalescing More...
 
const afw_value_tafw_function_execute_optional_chaining (afw_function_execute_t *x)
 Adaptive Function optional_chaining More...
 
const afw_value_tafw_function_execute_parse_uri (afw_function_execute_t *x)
 Adaptive Function parse_uri More...
 
const afw_value_tafw_function_execute_perform (afw_function_execute_t *x)
 Adaptive Function perform More...
 
const afw_value_tafw_function_execute_trace (afw_function_execute_t *x)
 Adaptive Function trace More...
 
const afw_value_tafw_function_execute_variable_exists (afw_function_execute_t *x)
 Adaptive Function variable_exists More...
 
const afw_value_tafw_function_execute_variable_get (afw_function_execute_t *x)
 Adaptive Function variable_get More...
 
const afw_value_tafw_function_execute_variable_is_not_null (afw_function_execute_t *x)
 Adaptive Function variable_is_not_null More...
 

Variables

 afw_function_definition_annotate
 Function definition annotate.
 
 afw_function_definition_compare_uri
 Function definition compare_uri.
 
 afw_function_definition_debug
 Function definition debug.
 
 afw_function_definition_execution_start_time_local
 Function definition execution_start_time_local.
 
 afw_function_definition_execution_start_time_utc
 Function definition execution_start_time_utc.
 
 afw_function_definition_generate_uuid
 Function definition generate_uuid.
 
 afw_function_definition_is_defined
 Function definition is_defined.
 
 afw_function_definition_is_nullish
 Function definition is_nullish.
 
 afw_function_definition_log
 Function definition log.
 
 afw_function_definition_now_local
 Function definition now_local.
 
 afw_function_definition_now_utc
 Function definition now_utc.
 
 afw_function_definition_nullish_coalescing
 Function definition nullish_coalescing.
 
 afw_function_definition_optional_chaining
 Function definition optional_chaining.
 
 afw_function_definition_parse_uri
 Function definition parse_uri.
 
 afw_function_definition_perform
 Function definition perform.
 
 afw_function_definition_trace
 Function definition trace.
 
 afw_function_definition_variable_exists
 Function definition variable_exists.
 
 afw_function_definition_variable_get
 Function definition variable_get.
 
 afw_function_definition_variable_is_not_null
 Function definition variable_is_not_null.
 

Detailed Description

miscellaneous adaptive functions.

Function Documentation

◆ afw_function_execute_annotate()

const afw_value_t* afw_function_execute_annotate ( afw_function_execute_t x)

Adaptive Function annotate

Parameters
xfunction execute parameter.

Create an annotated value.

This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.

Declaration:

function annotate(
annotation: (object _AdaptiveAnnotation_),
value: any
): any;

Parameters:

annotation - (object AdaptiveAnnotation) Annotation for value.

value - (any dataType) Any value. This value will not be evaluated.

Returns:

(any dataType) Unevaluated annotated value ready for use by function evaluate().

Definition at line 51 of file afw_function_miscellaneous.c.

◆ afw_function_execute_compare_uri()

const afw_value_t* afw_function_execute_compare_uri ( afw_function_execute_t x)

Adaptive Function compare_uri

Parameters
xfunction execute parameter.

Compare two URIs.

This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.

Declaration:

function compare_uri(
uri1: string,
uri2: string,
isValuePath?: boolean,
currentPath?: string
): boolean;

Parameters:

uri1 - (string) First URI for compare. This URI can not contain an asterisk ("*").

uri2 - (string) Second URI for compare. This URI can contain asterisk ("*") for substitution if isValuePath is true and currentPath2 is specified.

isValuePath - (optional boolean) The URIs are adaptive value paths. If one of the URIs begins with a single slash "/", both must, and each URI will be parsed as an adaptive value path (example: /adaptorId/objectType/objectId.propertyNames).

currentPath - (optional string) If isValuePath is true, this is the current path that is used to resolve a relative path in the URIs. If isValuePath is not true, this parameter is ignored.

Returns:

(boolean) Result of comparison.

Definition at line 113 of file afw_function_miscellaneous.c.

◆ afw_function_execute_debug()

const afw_value_t* afw_function_execute_debug ( afw_function_execute_t x)

Adaptive Function debug

Parameters
xfunction execute parameter.

Conditionally, based on the detail parameter, write a value as a string to the debug file descriptor (usually stderr).

This function is not pure, so it may return a different result given exactly the same parameters and has side effects.

Declaration:

function debug(
value: any,
detail?: boolean
): null;

Parameters:

value - (any dataType) This is the value that will be converted to its string representation and written. An undefined value is represented by <undefined>.

detail - (optional boolean) If true, the string will only written if the debug:function_active:detail flag is on. If false or not specified, the string will only written if the debug:function_active flag is on.

Returns:

(null)

Definition at line 184 of file afw_function_miscellaneous.c.

◆ afw_function_execute_execution_start_time_local()

const afw_value_t* afw_function_execute_execution_start_time_local ( afw_function_execute_t x)

Adaptive Function execution_start_time_local

Parameters
xfunction execute parameter.

Return local dateTime when the execution context was created. This will usually be the start of request time.

This function is not pure, so it may return a different result given exactly the same parameters.

Declaration:

function execution_start_time_local(
): dateTime;

Parameters:

Returns:

(dateTime)

Definition at line 505 of file afw_function_miscellaneous.c.

◆ afw_function_execute_execution_start_time_utc()

const afw_value_t* afw_function_execute_execution_start_time_utc ( afw_function_execute_t x)

Adaptive Function execution_start_time_utc

Parameters
xfunction execute parameter.

Return UTC dateTime when the execution context was created. This will usually be the start of request time.

This function is not pure, so it may return a different result given exactly the same parameters.

Declaration:

function execution_start_time_utc(
): dateTime;

Parameters:

Returns:

(dateTime)

Definition at line 542 of file afw_function_miscellaneous.c.

◆ afw_function_execute_generate_uuid()

const afw_value_t* afw_function_execute_generate_uuid ( afw_function_execute_t x)

Adaptive Function generate_uuid

Parameters
xfunction execute parameter.

Generate a UUID.

This function is not pure, so it may return a different result given exactly the same parameters.

Declaration:

function generate_uuid(
): string;

Parameters:

Returns:

(string)

Definition at line 239 of file afw_function_miscellaneous.c.

◆ afw_function_execute_is_defined()

const afw_value_t* afw_function_execute_is_defined ( afw_function_execute_t x)

Adaptive Function is_defined

Parameters
xfunction execute parameter.

Test value returning boolean True if it is not undefined.

This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.

Declaration:

function is_defined(
value: any
): boolean;

Parameters:

value - (any dataType) Value to check.

Returns:

(boolean) True if value is not undefined.

Definition at line 870 of file afw_function_miscellaneous.c.

◆ afw_function_execute_is_nullish()

const afw_value_t* afw_function_execute_is_nullish ( afw_function_execute_t x)

Adaptive Function is_nullish

Parameters
xfunction execute parameter.

Test value returning boolean True if it is null or undefined.

This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.

Declaration:

function is_nullish(
value: any
): boolean;

Parameters:

value - (any dataType) Value to check.

Returns:

(boolean) True if value is null or undefined.

Definition at line 829 of file afw_function_miscellaneous.c.

◆ afw_function_execute_log()

const afw_value_t* afw_function_execute_log ( afw_function_execute_t x)

Adaptive Function log

Parameters
xfunction execute parameter.

Evaluate and convert value to String and log it.

This function is not pure, so it may return a different result given exactly the same parameters and has side effects.

Declaration:

function log(
value: any
): null;

Parameters:

value - (any dataType) Value to log.

Returns:

(null)

Todo:
FIXME: Add code.

Definition at line 280 of file afw_function_miscellaneous.c.

◆ afw_function_execute_now_local()

const afw_value_t* afw_function_execute_now_local ( afw_function_execute_t x)

Adaptive Function now_local

Parameters
xfunction execute parameter.

Return current local dateTime.

This function is not pure, so it may return a different result given exactly the same parameters.

Declaration:

function now_local(
): dateTime;

Parameters:

Returns:

(dateTime)

Definition at line 316 of file afw_function_miscellaneous.c.

◆ afw_function_execute_now_utc()

const afw_value_t* afw_function_execute_now_utc ( afw_function_execute_t x)

Adaptive Function now_utc

Parameters
xfunction execute parameter.

Return current UTC dateTime.

This function is not pure, so it may return a different result given exactly the same parameters.

Declaration:

function now_utc(
): dateTime;

Parameters:

Returns:

(dateTime)

Definition at line 351 of file afw_function_miscellaneous.c.

◆ afw_function_execute_nullish_coalescing()

const afw_value_t* afw_function_execute_nullish_coalescing ( afw_function_execute_t x)

Adaptive Function nullish_coalescing

Parameters
xfunction execute parameter.

Returns the first value of values that is not null or undefined leaving the remaining values unevaluated.

This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.

Declaration:

function nullish_coalescing(
values_1: any,
values_2: any,
...values_rest: (list of any)
): any;

Parameters:

values - (2 or more any dataType)

Returns:

(any dataType) The first value of values that is not null or undefined.

Definition at line 914 of file afw_function_miscellaneous.c.

◆ afw_function_execute_optional_chaining()

const afw_value_t* afw_function_execute_optional_chaining ( afw_function_execute_t x)

Adaptive Function optional_chaining

Parameters
xfunction execute parameter.

Returns undefined if arg1 is null or undefined without evaluating arg2, but otherwise returns evaluated value of arg2.

This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.

Declaration:

function optional_chaining(
arg1: any,
arg2: any
): any;

Parameters:

arg1 - (any dataType)

arg2 - (any dataType)

Returns:

(any dataType) Undefined value if arg1 is null or undefined but otherwise evaluated arg2.

Definition at line 966 of file afw_function_miscellaneous.c.

◆ afw_function_execute_parse_uri()

const afw_value_t* afw_function_execute_parse_uri ( afw_function_execute_t x)

Adaptive Function parse_uri

Parameters
xfunction execute parameter.

Parse a URI.

This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.

Declaration:

function parse_uri(
uri: string,
isValuePath?: boolean,
currentPath?: string
): (object _AdaptiveParsedURI_);

Parameters:

uri - (string) URI to parse.

isValuePath - (optional boolean) The URI is an adaptive value path. If the path begins with a single slash "/", the URI will be parsed as an adaptive value path (example: /adaptorId/objectType/objectId.propertyNames).

currentPath - (optional string) If isValuePath is true, this is the current path that is used to resolve relative paths. If isValuePath is not true, this parameter is ignored.

Returns:

(object AdaptiveParsedURI) Object with results of parse.

Definition at line 399 of file afw_function_miscellaneous.c.

◆ afw_function_execute_perform()

const afw_value_t* afw_function_execute_perform ( afw_function_execute_t x)

Adaptive Function perform

Parameters
xfunction execute parameter.

Perform actions right away.

This function is not pure, so it may return a different result given exactly the same parameters.

Declaration:

function perform(
request: (object _AdaptiveActions_)
): (object _AdaptiveResponse_);

Parameters:

request - (object AdaptiveActions) See /afw/_AdaptiveObjectType_/_AdaptiveActions_ for more information.

Returns:

(object AdaptiveResponse) Response object.

Definition at line 462 of file afw_function_miscellaneous.c.

◆ afw_function_execute_trace()

const afw_value_t* afw_function_execute_trace ( afw_function_execute_t x)

Adaptive Function trace

Parameters
xfunction execute parameter.

Write a value to a trace log.

This function is not pure, so it may return a different result given exactly the same parameters and has side effects.

Declaration:

function trace(
value: any,
filter?: boolean,
number?: integer
): null;

Parameters:

value - (any dataType) This is the value that will be converted to its string representation and written the trace log. An undefined value is represented by <undefined>.

filter - (optional boolean) If this optional filter is false, nothing will be written to the trace log. The default is true.

number - (optional integer) This is an optional number between 1 and 8 that is appended to "trace" to identify the trace log. The default is 1.

Returns:

(null)

Definition at line 591 of file afw_function_miscellaneous.c.

◆ afw_function_execute_variable_exists()

const afw_value_t* afw_function_execute_variable_exists ( afw_function_execute_t x)

Adaptive Function variable_exists

Parameters
xfunction execute parameter.

Return the true if the named variable exists.

This function is not pure, so it may return a different result given exactly the same parameters.

Declaration:

function variable_exists(
name: string
): boolean;

Parameters:

name - (string) Name of variable to check. The name can optionally be preceded with a qualifier followed by "::".

Returns:

(boolean) True if variable exists.

Definition at line 666 of file afw_function_miscellaneous.c.

◆ afw_function_execute_variable_get()

const afw_value_t* afw_function_execute_variable_get ( afw_function_execute_t x)

Adaptive Function variable_get

Parameters
xfunction execute parameter.

Return the value of a variable. If variable is not available, return a default or null value.

This function is not pure, so it may return a different result given exactly the same parameters.

Declaration:

function variable_get(
name: string,
defaultValue?: any
): any;

Parameters:

name - (string) Name of variable to get. The name can optionally be preceded with a qualifier followed by "::".

defaultValue - (optional any dataType) The default value of variable if it does not exist in object. If not specified, null value is the default.

Returns:

(any dataType) Evaluated variable value or default.

Definition at line 721 of file afw_function_miscellaneous.c.

◆ afw_function_execute_variable_is_not_null()

const afw_value_t* afw_function_execute_variable_is_not_null ( afw_function_execute_t x)

Adaptive Function variable_is_not_null

Parameters
xfunction execute parameter.

Return the true if the named variable exists and is not null.

This function is not pure, so it may return a different result given exactly the same parameters.

Declaration:

function variable_is_not_null(
name: string
): boolean;

Parameters:

name - (string) Name of variable to check. The name can optionally be preceded with a qualifier followed by "::".

Returns:

(boolean) True if variable exists and is not null.

Definition at line 778 of file afw_function_miscellaneous.c.