Typped generic function invoke. the generic function is overloads by the parameter type
generic
00 Remarks
supports call primitive functions:
- plot(...)
- as.list(...)
- summary(...)
01 Syntax
SMRUCC.Rsharp.Runtime.Internal.generic
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| get | 1 | |
| add | 1 | overloads name = ( x As Object, args As ApiArgumentHelpers.list()), env As Environment ) As Object |
| exists | 2 | check target generic function is exists in the runtime index or not |
| parseGeneric | 1 | genericName.<type |
| invokeGeneric | 2 | |
| getGenericCallable | 1 |
03 Members
get(
String, Type)Parameters
| Name | Type | Description |
|---|---|---|
name | String | - |
type | Type | - |
Returns
this function returns nothing if the target function symbol/type is not exists in the generic function pool.
overloads name = ( x As Object, args As ApiArgumentHelpers.list(), env As Environment ) As Object
Parameters
| Name | Type | Description |
|---|---|---|
name | String | - |
x | Type | - |
[overloads] | GenericFunction | - |
check target generic function is exists in the runtime index or not
Parameters
| Name | Type | Description |
|---|---|---|
x | Object | - |
funcName | String | - |
type | Type | - |
env | Environment | - |
callable | GenericFunction | - |
parseGeneric(
String, Environment)genericName.<type>
Parameters
| Name | Type | Description |
|---|---|---|
funcName | String | - |
env | Environment | - |
invoke a generic R# function
The function name is comes from the compiler options CallerMemberNameAttribute
Parameters
| Name | Type | Description |
|---|---|---|
args | list | - |
x | Object | - |
env | Environment | - |
funcName | String | - |
Parameters
| Name | Type | Description |
|---|---|---|
x | Object | this function will auto cast the data type of this input parameter x |
type | Type | - |
funcName | String | - |
env | Environment | - |
suppress | Boolean | this function may be call by the function for check function existsed or not, no needs to throw the error, so set suppress to TRUE could avoid generates the error message and stop the program. |
exists(
String)