From 355a48866d1a43df9443a3b559c8ec8642343f3a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 5 Nov 2019 10:18:51 +0100 Subject: documentation: change JS docs template Use another template for the JS api documentation which provides a better overview over the classes and methods. Signed-off-by: Jo-Philipp Wich --- documentation/jsapi/LuCI.Class.html | 2609 +++++++++++++++++++++++------------ 1 file changed, 1761 insertions(+), 848 deletions(-) (limited to 'documentation/jsapi/LuCI.Class.html') diff --git a/documentation/jsapi/LuCI.Class.html b/documentation/jsapi/LuCI.Class.html index 7b5c3a8f74..28916f113e 100644 --- a/documentation/jsapi/LuCI.Class.html +++ b/documentation/jsapi/LuCI.Class.html @@ -1,195 +1,1234 @@ - + - JSDoc: Class: Class - - - + Class: Class + + + + + - - + + + + + + + + - -
- -

Class: Class

- +
+ +
+

Class: Class

+
- +
+

+ LuCI. -

- LuCI.Class

- -

LuCI.Class is the abstract base class all LuCI classes inherit from.

+ Class + + +

LuCI.Class is the abstract base class all LuCI classes inherit from.

It provides simple means to create subclasses of given classes and implements prototypal inheritance.

- -
- -
-
- - - - - - - - - - - - - - + +
+
+ + + + +
+
+

+ + new LuCI.Class() +

+ + +
+ luci.js, line 59 +
+ +
+ +
+
+ + + + + + + + +
- - + - - - - - - - - - - -
Source:
-
- - - + +
+ + + - - - - - - - - - - - - - - - - + + + + + + + +
- - - - - - - - + + + + + +

Methods

- +
- +
+
+

+ + staticLuCI.Class.extend(properties){LuCI.Class} +

+ +
+ luci.js, line 87 +
+ +
-

(static) extend(properties) → {LuCI.Class}

+
+
- - - - -
-

Extends this base class with the properties described in +

+

Extends this base class with the properties described in properties and returns a new subclassed Class instance

-
- - - - - - - - +
+ -
Parameters:
+ + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - - - + + +
NameTypeDescription
NameTypeDescription
properties @@ -198,164 +1237,148 @@ implements prototypal inheritance.

An object describing the properties to add to the new + +

+ +

An object describing the properties to add to the new subclass.

- - - - - - + + +
- - + - - - - - - - - - - -
Source:
-
- - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Returns a new LuCI.Class sublassed from this class, extended -by the given properties and with its prototype set to this base -class to enable inheritance. The resulting value represents a -class constructor and can be instantiated with new.

-
- - - -
-
- Type -
-
- -LuCI.Class - - -
+ +
- - - - - - - + -

(static) instantiate(params, …new_argsopt) → {LuCI.Class}

- - - - -
-

Calls the class constructor using new with the given argument -array being passed as variadic parameters to the constructor.

-
- - - - - - - - - -
Parameters:
+ + +
Returns:
+ - - - + + + + + + + + + + + + +
NameTypeDescription
+ + LuCI.Class + + + Returns a new LuCI.Class sublassed from this class, extended +by the given properties and with its prototype set to this base +class to enable inheritance. The resulting value represents a +class constructor and can be instantiated with new.
+ + + + +
- Attributes + +
+
+

+ + staticLuCI.Class.instantiate(params, new_args){LuCI.Class} +

+ - +
+ luci.js, line 169 +
+
- Description - - + +
+
+ + +
+

Calls the class constructor using new with the given argument +array being passed as variadic parameters to the constructor.

+
+ - + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - + + + - + - - - - - - - - + + +
NameTypeDescription
params @@ -364,30 +1387,27 @@ array being passed as variadic parameters to the constructor.

- - - - - -

An array of arbitrary values which will be passed as arguments +

+ + + + + + +

An array of arbitrary values which will be passed as arguments to the constructor function.

new_args @@ -396,172 +1416,155 @@ to the constructor function.

- - <optional>
- - - - - - <repeatable>
- -

Specifies arguments to be passed to the subclass constructor +

+ + + optional + + + + + repeatable + + +

Specifies arguments to be passed to the subclass constructor as-is in order to instantiate the new subclass.

- - - - - - + + +
- - + - - - - - - - - - - -
Source:
-
- - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Returns a new LuCI.Class instance extended by the given -properties with its prototype set to this base class to -enable inheritance.

-
- - - -
-
- Type -
-
- -LuCI.Class - - -
+ +
- - - - - - - + -

(static) isSubclass(classValue) → {boolean}

- - - - -
-

Checks whether the given class value is a subclass of this class.

-
- - - - - - - - - -
Parameters:
+ +
Returns:
+ + - - - + + + + + + + + + + + + +
NameTypeDescription
+ + LuCI.Class + + + Returns a new LuCI.Class instance extended by the given +properties with its prototype set to this base class to +enable inheritance.
- + + + +
+ +
+
+

+ + staticLuCI.Class.isSubclass(classValue){boolean} +

+ + +
+ luci.js, line 195 +
+ +
- Description - - + +
+
+ + +
+

Checks whether the given class value is a subclass of this class.

+
+ - + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + - - - + + +
NameTypeDescription
classValue @@ -570,167 +1573,151 @@ enable inheritance.

The class object to test.

+ +

The class object to test.

- - - - - - + + +
- - + - - - - - - - - - - -
Source:
-
- - - + +
+ + + + + + + + +
Returns:
+ - - - - - - - - - - -
Returns:
- + + + -
-

Returns true when the given classValue is a subclass of this +

+ + + + + + + + + + + +
TypeDescription
+ + boolean + + + Returns true when the given classValue is a subclass of this class or false if the given value is not a valid class or not -a subclass of this class'.

- - - - -
-
- Type -
-
- -boolean - - -
-
- +a subclass of this class'.
- - - + + + +
- +
+
+

+ + staticLuCI.Class.singleton(properties, new_args){LuCI.Class} +

+ +
+ luci.js, line 145 +
+ +
-

(static) singleton(properties, …new_argsopt) → {LuCI.Class}

+
+
- - - - -
-

Extends this base class with the properties described in +

+

Extends this base class with the properties described in properties, instantiates the resulting subclass using the additional optional arguments passed to this function and returns the resulting subclassed Class instance.

This function serves as a convenience shortcut for Class.extend() and subsequent new.

-
- - - - - - - - +
+ -
Parameters:
+ + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - - - - + + + - + - - - - - - - - + + +
NameTypeAttributesDescription
NameTypeDescription
properties @@ -739,30 +1726,27 @@ and returns the resulting subclassed Class instance.

- - - - - -

An object describing the properties to add to the new +

+ + + + + + +

An object describing the properties to add to the new subclass.

new_args @@ -771,134 +1755,122 @@ subclass.

- - <optional>
- - - - - - <repeatable>
- -

Specifies arguments to be passed to the subclass constructor +

+ + + optional + + + + + repeatable + + +

Specifies arguments to be passed to the subclass constructor as-is in order to instantiate the new subclass.

- - - - - - + + +
- - + - - - - - - - - - - -
Source:
-
- - - + +
+ + + + + + + + +
Returns:
+ - - - - - - - - - - -
Returns:
- + + + -
-

Returns a new LuCI.Class instance extended by the given +

+ + + + + + + + + + + +
TypeDescription
+ + LuCI.Class + + + Returns a new LuCI.Class instance extended by the given properties with its prototype set to this base class to -enable inheritance.

- - - - -
-
- Type -
-
- -LuCI.Class - - -
-
- +enable inheritance.
- - - + + + +
- +
+
+

+ + super(key, callArgs){*|null} +

+ +
+ luci.js, line 267 +
+ +
-

super(key, callArgsopt) → {*|null}

+
+
- - - - -
-

Walks up the parent class chain and looks for a class member +

+

Walks up the parent class chain and looks for a class member called key in any of the parent classes this class inherits from. Returns the member value of the superclass or calls the member as function and returns its return value when the @@ -913,46 +1885,39 @@ parent classes. Calls the key() method with parameters arg1 and arg2 when found within one of the parent classes. -

- - - - - - - - +
+ -
Parameters:
+ + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - + - - - + + + - + - - - - - - - - + + +
NameTypeAttributesDescription
NameTypeDescription
key @@ -961,29 +1926,26 @@ when found within one of the parent classes. - - - - - -

The name of the superclass member to retrieve.

+ + + + + + +

The name of the superclass member to retrieve.

callArgs @@ -992,90 +1954,64 @@ when found within one of the parent classes. - - <optional>
- - - - - -

An optional array of function call parameters to use. When +

+ + + optional + + + + + +

An optional array of function call parameters to use. When this parameter is specified, the found member value is called as function using the values of this array as arguments.

- - - - - - + + +
- - + + - - - - - - - - - + + + + + + +
-
Source:
-
- -
- - - - - - - - - - - - - -
Throws:
- - + +
Throws:
+ +
@@ -1084,7 +2020,6 @@ as function using the values of this array as arguments.

the found member named by key is not a function value.

-
@@ -1098,103 +2033,109 @@ the found member named by key is not a function value.

-
+ + + +
Returns:
-
Returns:
- + + + -
-

Returns the value of the found member or the return value of +

+ + + + + + + + + + + +
TypeDescription
+ + * + | + + null + + + Returns the value of the found member or the return value of the call to the found method. Returns null when no member was found in the parent class chain or when the call to the -superclass method returned null.

- - - - -
-
- Type -
-
- -* -| - -null - - -
-
- +superclass method returned null.
- - - + + + + - +
+
+

+ + varargs(args, offset, extra_args){Array.<*>} +

+ +
+ luci.js, line 225 +
+ +
-

varargs(args, offset, …extra_argsopt) → {Array.<*>}

+
+
- - - - -
-

Extract all values from the given argument array beginning from +

+

Extract all values from the given argument array beginning from offset and prepend any further given optional parameters to the beginning of the resulting array copy.

-
- - - - - - - - +
+ -
Parameters:
+ + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - + - - - + + + - + - - - - - - - - + + + - + - - - - - + - - - + + +
NameTypeAttributesDescription
NameTypeDescription
args @@ -1203,29 +2144,26 @@ the beginning of the resulting array copy.

- - - - - -

The array to extract the values from.

+ + + + + + +

The array to extract the values from.

offset @@ -1234,30 +2172,27 @@ the beginning of the resulting array copy.

- - - - - -

The offset from which to extract the values. An offset of 0 +

+ + + + + + +

The offset from which to extract the values. An offset of 0 would copy all values till the end.

extra_args @@ -1266,144 +2201,122 @@ would copy all values till the end.

- - <optional>
- - - - - - <repeatable>
- -

Extra arguments to add to prepend to the resultung array.

+ + + optional + + + + + repeatable + + +

Extra arguments to add to prepend to the resultung array.

- - - - - - + + +
- - + - - - - - - - - - - -
Source:
-
- - - + +
+ + + + + + + + +
Returns:
+ - - - - - - - - - - -
Returns:
- + + + -
-

Returns a new array consisting of the optional extra arguments +

+ + + + + + + + + + + +
TypeDescription
+ + Array.<*> + + + Returns a new array consisting of the optional extra arguments and the values extracted from the args array beginning with -offset.

- - - - -
-
- Type -
-
- -Array.<*> - - -
-
- +offset.
- - - - - + + +
+ + + + +
-
- - + -
- -
-
- Documentation generated by JSDoc 3.6.3 on Tue Nov 05 2019 09:33:05 GMT+0100 (Central European Standard Time) -
+ - - +
+ Documentation generated by JSDoc 3.6.3 on Tue Nov 05 2019 10:17:12 GMT+0100 (Central European Standard Time) +
+
+
+ + \ No newline at end of file -- cgit v1.2.3