|
GameApi 28
Library used by GameApi Builder tool
|
Items in this namespace exist in the ChaiScript language runtime. They are not part of the C++ API. More...
Classes | |
| class | Object |
| Generic concept of a value in ChaiScript. More... | |
| class | Map_Pair |
| Item returned from a Range object from a Map. More... | |
| class | Map |
| Maps strings to Objects. More... | |
| class | Container |
| A concept implemented by string, Vector and Map. It is convertible to Range, default constructable and back_insertable. More... | |
| class | string |
| ChaiScript representation of std::string. It is an std::string but only some member are exposed to ChaiScript. More... | |
| class | Range |
| A concept in ChaiScript that is implemented by string, Vector and Map. It provides easy iteration over the elements in a container. More... | |
| class | Const_Range |
| A concept in ChaiScript that is implemented by string, Vector and Map. It provides easy iteration over the elements in a container. Contained values are const. More... | |
| class | Vector |
| A vector of Objects. More... | |
| class | Type_Info |
| class | Function |
| Represents a function object in ChaiScript. More... | |
Functions | |
| string | to_string (Object o) |
| Converts o into a string. | |
| void | puts (Object o) |
| Prints o to the terminal, without a trailing carriage return. Applies conversions to string automatically. | |
| void | print (Object o) |
| Prints o to the terminal, with a trailing carriage return. Applies conversions to string automatically. | |
| class ChaiScript_Language::Function | max (Object a, Object b) |
| Returns the max of a or b. Requires that operator>(a, b) exists Equivalent to. | |
| Object | min (Object a, Object b) |
| Returns the min of a or b. Requires that operator<(a, b) exists. | |
| bool | even (Object x) |
| Returns true if x is an even integer. | |
| void | for_each (Range c, Function f) |
| Applies the function f over each element in the Range c. | |
| Object | map (Range c, Function f) |
| Applies f over each element in the Range c, joining all the results. | |
| Object | foldl (Range c, Function f, Object initial) |
| Starts with the initial value and applies the function f to it and the first element of the Range c. The result is then applied to the second element, and so on until the elements are exhausted. | |
| Numeric | sum (Range c) |
| Returns the sum total of the values in the Range c. | |
| Numeric | product (Range c) |
| Returns the product of the value in the Range c. | |
| Object | take (Range c, int num) |
| Takes num elements from the Range c, returning them. | |
| Object | take_while (Range c, Function f) |
| Takes elements from the Range c that match function f, stopping at the first non-match, returning them as a new Vector. | |
| Object | drop (Range c, int num) |
| Drops num elements from the Range c, returning the remainder. | |
| Object | drop_while (Range c, Function f) |
| Drops elements from the Range c that match f, stopping at the first non-match, returning the remainder. | |
| Object | reduce (Range c, Function f) |
| Similar to foldl, this takes the first two elements as its starting values for f. This assumes Range c has at least 2 elements. | |
| Object | filter (Container c, Function f) |
| Takes elements from Container c that match function f, return them. | |
| string | join (Range c, string delim) |
| Joins the elements of the Range c into a string, delimiting each with the delim string. | |
| Container | reverse (Container c) |
| Returns the contents of the Container c in reversed order. | |
| Vector | generate_range (Object x, Object y) |
| Generates a new Vector filled with values starting at x and ending with y. | |
| Object | concat (Range x, Range y) |
| Returns a new Range with x and y concatenated. | |
| Vector | collate (Object x, Object y) |
| Returns a new Vector with x and y as its values. | |
| Vector | zip_with (Function f, Range x, Range y) |
| Applies f to elements of x and y, returning a new Vector with the result of each application. | |
| Vector | zip (Range x, Range y) |
| Collates elements of x and y, returning a new Vector with the result. | |
| bool | call_exists (Function f,...) |
| returns true if there exists a call to the Function f that takes the given parameters | |
| Range | retro (Range) |
| Reverses a Range object so that the elements are accessed in reverse. | |
| Const_Range | retro (Const_Range) |
| Reverses a Const_Range object so that the elements are accessed in reverse. | |
| void | throw (Object) |
| Raises the given object as an exception. Any type of object can be thrown. | |
Items in this namespace exist in the ChaiScript language runtime. They are not part of the C++ API.
This file is not technically part of the ChaiScript API. It is used solely for generating Doxygen docs regarding the ChaiScript standard runtime library.
| bool ChaiScript_Language::call_exists | ( | Function | f, |
| ... ) |
returns true if there exists a call to the Function f that takes the given parameters
Example:
Drops elements from the Range c that match f, stopping at the first non-match, returning the remainder.
Example:
| bool ChaiScript_Language::even | ( | Object | x | ) |
Returns true if x is an even integer.
Returns true if x is an odd integer.
Will also work on any non-integer type for which an operator%(x, int) exists
Example:
Will also work on any non-integer type for which an operator%(x, int) exists
Example:
Starts with the initial value and applies the function f to it and the first element of the Range c. The result is then applied to the second element, and so on until the elements are exhausted.
Example:
Applies the function f over each element in the Range c.
Example:
Generates a new Vector filled with values starting at x and ending with y.
Works on types supporting operator<=(x, y) and operator++(x)
Example:
| class ChaiScript_Language::Function ChaiScript_Language::max | ( | Object | a, |
| Object | b ) |
Returns the max of a or b. Requires that operator>(a, b) exists Equivalent to.
Example:
Returns the min of a or b. Requires that operator<(a, b) exists.
Equivalent to
Example:
| void ChaiScript_Language::print | ( | Object | o | ) |
| Numeric ChaiScript_Language::product | ( | Range | c | ) |
| void ChaiScript_Language::puts | ( | Object | o | ) |
Prints o to the terminal, without a trailing carriage return. Applies conversions to string automatically.
Similar to foldl, this takes the first two elements as its starting values for f. This assumes Range c has at least 2 elements.
Example:
| Const_Range ChaiScript_Language::retro | ( | Const_Range | ) |
Reverses a Const_Range object so that the elements are accessed in reverse.
Reverses a Range object so that the elements are accessed in reverse.
| Numeric ChaiScript_Language::sum | ( | Range | c | ) |
Takes elements from the Range c that match function f, stopping at the first non-match, returning them as a new Vector.
Example:
| void ChaiScript_Language::throw | ( | Object | ) |
Converts o into a string.