Qore Programming Language Reference Manual  0.8.11.1
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_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...
 
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...
 

Detailed Description

Object functions

Function Documentation

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

calls a pseudo-method on the given value

Parameters
valthe value to call the pseudo-method on
meththe 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
valthe value to call the pseudo-method on
meththe string method name of the pseudo-method to call
argvany 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.

Parameters
objthe object to use for the call
methodthe method to call
...any additional arguments to the method
Returns
the value returned by the method call
Example:
my any $result = callObjectMethod($obj, "method", $arg1, $arg2);
Exceptions
METHOD-DOES-NOT-EXISTThe named method does not exist in this class
ILLEGAL-EXPLICIT-METHOD-CALLThe named method may not be called explicitly
METHOD-IS-PRIVATEThe named method is private and therefore can only be called within the class
BASE-CLASS-IS-PRIVATEThe named method is a member of a privately inherited base class
Note
the method called could cause additional exceptions to be thrown
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
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.

Parameters
objthe object to use for the call
methodthe method to call
vargany additional arguments to the method
Returns
the value returned by the method call
Example:
my any $result = callObjectMethodArgs($obj, "method", $arglist);
Exceptions
METHOD-DOES-NOT-EXISTThe named method does not exist in this class
ILLEGAL-EXPLICIT-METHOD-CALLThe named method may not be called explicitly
METHOD-IS-PRIVATEThe named method is private and therefore can only be called within the class
BASE-CLASS-IS-PRIVATEThe named method is a member of a privately inherited base class
Note
the method called could cause additional exceptions to be thrown
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
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
Parameters
objan 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:
my list $l = getMethodList($obj);
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