Qore reflection Module 1.18.0
Loading...
Searching...
No Matches
Qore::Reflection::DestructorMethod Class Reference

This class provides information about Qore destructor methods. More...

#include <QC_DestructorMethod.dox.h>

Inheritance diagram for Qore::Reflection::DestructorMethod:
Qore::Reflection::AbstractMethod Qore::Reflection::AbstractReflectionFunction

Public Member Methods

auto call (object obj)
 calls the destructor on given object; destroys the object More...
 
 constructor (Class cls)
 Creates the object from the class if the class implements a destructor method. More...
 
 constructor (string class_name)
 Creates the object from the class name or namespace path if the class implements a destructor method. More...
 
- Public Member Methods inherited from Qore::Reflection::AbstractMethod
 constructor ()
 Throws an exception if called directly; this class can only be instantiated by builtin subclasses. More...
 
AbstractClass getClass ()
 Returns the class for the method. More...
 
string getMethodTypeName ()
 returns the type of method as a string; one of "normal", "static", "constructor", "destructor", "copy" More...
 
AbstractMethodVariant getVariant (...)
 Returns the given direct child method variant declared in this method or throws an exception if the method variant is not defined. More...
 
AbstractMethodVariant getVariantArgs (softlist< Type > argv)
 Returns the given direct child method variant declared in this method or throws an exception if the method variant is not defined. More...
 
list< AbstractMethodVariantgetVariants ()
 returns the variants implemented by the method More...
 
bool isStatic ()
 returns True if the method is a static method More...
 
- Public Member Methods inherited from Qore::Reflection::AbstractReflectionFunction
 constructor ()
 Throws an exception if called directly; this class can only be instantiated by builtin subclasses. More...
 
list< string > getCodeFlagList ()
 returns a list of strings of code flags common to all variants for this function More...
 
int getCodeFlags ()
 returns a bitfield of code flags common to all variants for this function More...
 
int getDomain ()
 returns the functional domain common to all variants for this function (for builtin functions only) as a bitfield of functional_domain_constants More...
 
list< string > getDomainStringList ()
 returns a list of functional domain strings common to all variants for this function (for builtin functions only); an empty list is returned for user functions More...
 
*string getModuleName ()
 Returns the module name providing the function or method or nothing if the function or method was not provided by a module. More...
 
string getName ()
 returns the function or method name More...
 
bool isBuiltin ()
 returns True if the function or method is a builtin function or method More...
 
bool isEqual (AbstractReflectionFunction func)
 Returns True if the function or method object passed as an argument is equal to the current object; False if not. More...
 
bool isInjected ()
 returns True if the function or method has been injected as a dependency injection More...
 
bool isMethod ()
 returns True if the object is a method but not a pseudo-method More...
 
bool isPseudoMethod ()
 returns True if the object is a pseudo-method More...
 
bool isUser ()
 returns True if the function or method is a user function or method More...
 
int numVariants ()
 returns the number of variants implemented by the function or method More...
 

Detailed Description

This class provides information about Qore destructor methods.

Restrictions:
Qore::PO_NO_REFLECTION
See also
DestructorMethodVariant
Since
Qore 0.9.0

Member Function Documentation

◆ call()

auto Qore::Reflection::DestructorMethod::call ( object  obj)

calls the destructor on given object; destroys the object

Example:
m.call(obj);
Parameters
objthe object to destroy
Exceptions
PROGRAM-ERRORthrown if the Program object holding the class and method has been destroyed
METHOD-ERRORthe object was not instantiated from the class implementing this method

◆ constructor() [1/2]

Qore::Reflection::DestructorMethod::constructor ( Class  cls)

Creates the object from the class if the class implements a destructor method.

Example:
DestructorMethod m(cls);
Parameters
clsthe class for the method
Exceptions
UNKOWN-METHODcannot find a destructor method for the class

◆ constructor() [2/2]

Qore::Reflection::DestructorMethod::constructor ( string  class_name)

Creates the object from the class name or namespace path if the class implements a destructor method.

Example:
DestructorMethod m("Thread::Mutex");
Parameters
class_namethe class name or namespace path for the class
Exceptions
UNKNOWN-CLASScannot find a class with the given name or path
UNKOWN-METHODcannot find a destructor method for the class

The documentation for this class was generated from the following file: