All Classes Namespaces Functions Variables Groups Pages
Object Functions

## Functions

any | Qore::callObjectMethod (object obj, string method,...)
| Calls a method of an object, passing the remainder of the arguments to the function as arguments to the method. More...
nothing | Qore::callObjectMethod ()
| This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
any | Qore::callObjectMethodArgs (object obj, string method, *softlist varg)
| Calls a method of an object, using the optional third argument as the argument list to the method. More...
nothing | Qore::callObjectMethodArgs ()
| This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
any | Qore::call_object_method (object obj, string method,...)
| Calls a method of an object, passing the remainder of the arguments to the function as arguments to the method. More...
any | Qore::call_object_method_args (object obj, string method, *softlist varg)
| Calls a method of an object, using the optional third argument as the argument list to the method. More...
any | Qore::call_pseudo (any val, string meth,...)
| calls a pseudo-method on the given value More...
any | Qore::call_pseudo_args (any val, string meth, *softlist argv)
| calls a pseudo-method on the given value with arguments given as a list More...
object | Qore::create_object (string class_name,...)
| creates an object from the class name (which can include a namespace path) and optionally any arguments for the constructor More...
object | Qore::create_object_args (string class_name, *softlist argv)
| creates an object from the class name (which can include a namespace path) and optionally any arguments for the constructor More...
list | Qore::getMethodList (object obj)
| Returns a list of strings of the names of the methods of the class of the object passed as a parameter. More...
nothing | Qore::getMethodList ()
| This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
list | Qore::get_method_list (object obj)
| Returns a list of strings of the names of the methods of the class of the object passed as a parameter. More...

## Detailed Description

Object functions

## Function Documentation

any Qore::call_object_method | ( | object | obj,
|  | string | method,
|  |  | ...
| ) |  |

Calls a method of an object, passing the remainder of the arguments to the function as arguments to the method.

Parameters

  obj | the object to use for the call
  method | the method to call
  ... | any additional arguments to the method

Returns
  the value returned by the method call

Example:
  any result = call_object_method(obj, "method", arg1, arg2);

Exceptions

  METHOD-DOES-NOT-EXIST | The named method does not exist in this class
  ILLEGAL-EXPLICIT-METHOD-CALL | The named method may not be called explicitly
  METHOD-IS-PRIVATE | The named method is private and therefore can only be called within the class
  BASE-CLASS-IS-PRIVATE | The named method is a member of a privately inherited base class

Note
  the method called could cause additional exceptions to be thrown

Since
  Qore 0.8.12 as a replacement for deprecated camel-case callObjectMethod()

any Qore::call_object_method_args | ( | object | obj,
|  | string | method,
|  | *softlist | varg
| ) |  |

Calls a method of an object, using the optional third argument as the argument list to the method.

Parameters

  obj | the object to use for the call
  method | the method to call
  varg | any additional arguments to the method

Returns
  the value returned by the method call

Example:
  any result = call_object_method_args(obj, "method", arglist);

Exceptions

  METHOD-DOES-NOT-EXIST | The named method does not exist in this class
  ILLEGAL-EXPLICIT-METHOD-CALL | The named method may not be called explicitly
  METHOD-IS-PRIVATE | The named method is private and therefore can only be called within the class
  BASE-CLASS-IS-PRIVATE | The named method is a member of a privately inherited base class

Note
  the method called could cause additional exceptions to be thrown

Since
  Qore 0.8.12 as a replacement for deprecated camel-case callObjectMethodArgs()

any Qore::call_pseudo | ( | any | val,
|  | string | meth,
|  |  | ...
| ) |  |

calls a pseudo-method on the given value

Parameters

  val | the value to call the pseudo-method on
  meth | the string method name of the pseudo-method to call
  ... | any other arguments to the method

Returns
  the return value of the pseudo-method

See Also
  <value> for the class hierarchy of pseudo-classes

Note
  this function can be used for security to ensure that a given pseudo-method of the <object> class is called, as by default if a method of the same name is implemented by the object's class, the class method will be called instead.

Since
  Qore 0.8.5

any Qore::call_pseudo_args | ( | any | val,
|  | string | meth,
|  | *softlist | argv
| ) |  |

calls a pseudo-method on the given value with arguments given as a list

Parameters

  val | the value to call the pseudo-method on
  meth | the string method name of the pseudo-method to call
  argv | any other arguments to the method

Returns
  the return value of the pseudo-method

See Also
  <value> for the class hierarchy of pseudo-classes

Note
  this function can be used for security to ensure that a given pseudo-method of the <object> class is called, as by default if a method of the same name is implemented by the object's class, the class method will be called instead.

Since
  Qore 0.8.8

any Qore::callObjectMethod | ( | object | obj,
|  | string | method,
|  |  | ...
| ) |  |

Calls a method of an object, passing the remainder of the arguments to the function as arguments to the method.

Code Flags:
  DEPRECATED

Parameters

  obj | the object to use for the call
  method | the method to call
  ... | any additional arguments to the method

Returns
  the value returned by the method call

Example:
  any result = callObjectMethod(obj, "method", arg1, arg2);

Exceptions

  METHOD-DOES-NOT-EXIST | The named method does not exist in this class
  ILLEGAL-EXPLICIT-METHOD-CALL | The named method may not be called explicitly
  METHOD-IS-PRIVATE | The named method is private and therefore can only be called within the class
  BASE-CLASS-IS-PRIVATE | The named method is a member of a privately inherited base class

Note
  the method called could cause additional exceptions to be thrown

Deprecated:
  use call_object_method(); camel-case function names were deprecated in Qore 0.8.12

nothing Qore::callObjectMethod | ( |  | ) |

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
  RUNTIME_NOOP, DEPRECATED

any Qore::callObjectMethodArgs | ( | object | obj,
|  | string | method,
|  | *softlist | varg
| ) |  |

Calls a method of an object, using the optional third argument as the argument list to the method.

Code Flags:
  DEPRECATED

Parameters

  obj | the object to use for the call
  method | the method to call
  varg | any additional arguments to the method

Returns
  the value returned by the method call

Exceptions

  METHOD-DOES-NOT-EXIST | The named method does not exist in this class
  ILLEGAL-EXPLICIT-METHOD-CALL | The named method may not be called explicitly
  METHOD-IS-PRIVATE | The named method is private and therefore can only be called within the class
  BASE-CLASS-IS-PRIVATE | The named method is a member of a privately inherited base class

Note
  the method called could cause additional exceptions to be thrown

Deprecated:
  use call_object_method_args(); camel-case function names were deprecated in Qore 0.8.12

nothing Qore::callObjectMethodArgs | ( |  | ) |

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
  RUNTIME_NOOP, DEPRECATED

object Qore::create_object | ( | string | class_name,
|  |  | ...
| ) |  |

creates an object from the class name (which can include a namespace path) and optionally any arguments for the constructor

Example
  object obj = create_object(class_name, arg1, arg2);

Parameters

  class_name | the name of the class to instantiate (can be prefixed with a namespace path)
  ... | any other arguments to the constructor

Returns
  the object created

Exceptions

  CREATE-OBJECT-ERROR | unknown class, class implements features restricted by current parse options / sandboxing restrictions
  CONSTRUCTOR-IS-PRIVATE | attempt to instantiate an object with a private constructor from outside the class

Note
  see the class documentation for the class to be instantiated for a list of additional exceptions that can be thrown

See Also
  create_object_args()

Since
  Qore 0.8.12

object Qore::create_object_args | ( | string | class_name,
|  | *softlist | argv
| ) |  |

creates an object from the class name (which can include a namespace path) and optionally any arguments for the constructor

Example
  object obj = create_object_args(class_name, arg_list);

Parameters

  class_name | the name of the class to instantiate (can be prefixed with a namespace path)
  argv | any other arguments to the constructor

Returns
  the object created

Exceptions

  CREATE-OBJECT-ERROR | unknown class, class implements features restricted by current parse options / sandboxing restrictions
  CONSTRUCTOR-IS-PRIVATE | attempt to instantiate an object with a private constructor from outside the class

Note
  see the class documentation for the class to be instantiated for a list of additional exceptions that can be thrown

See Also
  create_object()

Since
  Qore 0.8.12

list Qore::get_method_list | ( | object | obj | ) |

Returns a list of strings of the names of the methods of the class of the object passed as a parameter.

Code Flags:
  CONSTANT

Parameters

  obj | an object of the class to get the method list from

Returns
  a list of strings of the names of the methods of the class of the object passed as a parameter; returns all methods in the class, both private and public but does not return inherited methods

Example:
  list l = get_method_list(obj);

Since
  Qore 0.8.12 as a replacement for deprecated camel-case getMethodList()

list Qore::getMethodList | ( | object | obj | ) |

Returns a list of strings of the names of the methods of the class of the object passed as a parameter.

Code Flags:
  CONSTANT, DEPRECATED

Parameters

  obj | an object of the class to get the method list from

Returns
  a list of strings of the names of the methods of the class of the object passed as a parameter; returns all methods in the class, both private and public but does not return inherited methods

Deprecated:
  use get_method_list(); camel-case function names were deprecated in Qore 0.8.12

nothing Qore::getMethodList | ( |  | ) |

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
  RUNTIME_NOOP, DEPRECATED