Qore reflection Module  1.12.2
Qore::Reflection::AbstractReflectionFunction Class Reference

The abstract base class for Qore functions and class methods. More...

Inheritance diagram for Qore::Reflection::AbstractReflectionFunction:
Qore::Reflection::AbstractMethod Qore::Reflection::Function Qore::Reflection::ConstructorMethod Qore::Reflection::CopyMethod Qore::Reflection::DestructorMethod Qore::Reflection::NormalMethod Qore::Reflection::PseudoMethod Qore::Reflection::StaticMethod

Public Member Methods

 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

The abstract base class for Qore functions and class methods.

Restrictions:
Qore::PO_NO_REFLECTION

This class cannot be instantiated directly and also cannot be directly inherited by user-defined classes.

Since
Qore 0.9.0

Member Function Documentation

◆ constructor()

Qore::Reflection::AbstractReflectionFunction::constructor ( )

Throws an exception if called directly; this class can only be instantiated by builtin subclasses.

Exceptions
ABSTRACTREFLECTIONFUNCTION-CONSTRUCTOR-ERRORthis exception is thrown if this class is constructed directly (also if directly inherited by user classes)

◆ getCodeFlagList()

list<string> Qore::Reflection::AbstractReflectionFunction::getCodeFlagList ( )

returns a list of strings of code flags common to all variants for this function

Code Flags:
RET_VALUE_ONLY
Example:
list<string> l = f.getCodeFlagList();
Returns
list of strings of code flags common to all variants for this function; possible values are:
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed
See also
getCodeFlags()
Since
Qore 0.9.5

◆ getCodeFlags()

int Qore::Reflection::AbstractReflectionFunction::getCodeFlags ( )

returns a bitfield of code flags common to all variants for this function

Code Flags:
CONSTANT
Example:
int i = f.getCodeFlags();
Returns
a bitfield of code flags common to all variants for this function
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed
See also
getCodeFlagList()
Since
Qore 0.9.5

◆ getDomain()

int Qore::Reflection::AbstractReflectionFunction::getDomain ( )

returns the functional domain common to all variants for this function (for builtin functions only) as a bitfield of functional_domain_constants

Code Flags:
RET_VALUE_ONLY
Example:
int i = f.getDomain();
Returns
the functional domain common to all variants for this function (for builtin functions only) as a bitfield of functional_domain_constants
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed
Note
user functions always return 0 here; a value is only returned by builtin functions
Since
Qore 0.9.5

◆ getDomainStringList()

list<string> Qore::Reflection::AbstractReflectionFunction::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

Code Flags:
RET_VALUE_ONLY
Example:
list<string> l = f.getDomainStringList();
Returns
a list of functional domain strings common to all variants for this function (for builtin functions only)
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed
Note
user functions always return an empty list here
Since
Qore 0.9.5

◆ getModuleName()

*string Qore::Reflection::AbstractReflectionFunction::getModuleName ( )

Returns the module name providing the function or method or nothing if the function or method was not provided by a module.

Code Flags:
RET_VALUE_ONLY
Example:
*string str = f.getModuleName();
Returns
the module name providing the function or method or nothing if the function or method was not provided by a module
Since
Qore 0.9.5

◆ getName()

string Qore::Reflection::AbstractReflectionFunction::getName ( )

returns the function or method name

Code Flags:
RET_VALUE_ONLY
Example:
string name = f.getName();
Returns
the function or method name
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed

◆ isBuiltin()

bool Qore::Reflection::AbstractReflectionFunction::isBuiltin ( )

returns True if the function or method is a builtin function or method

Code Flags:
RET_VALUE_ONLY
Example:
bool b = f.isBuiltin();
Returns
True if the function or method is a builtin function or method
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed
Note
complementary to isUser()

◆ isEqual()

bool Qore::Reflection::AbstractReflectionFunction::isEqual ( AbstractReflectionFunction  func)

Returns True if the function or method object passed as an argument is equal to the current object; False if not.

Code Flags:
CONSTANT
Example:
bool b = f1.isEqual(f2);
Parameters
functhe function or method object to check with the current object for equality
Returns
True if the object passed as an argument is equal to the current object; False if not
Note
if this method is called on user functions or methods created from the same source code but in different Program containers, it will return False

◆ isInjected()

bool Qore::Reflection::AbstractReflectionFunction::isInjected ( )

returns True if the function or method has been injected as a dependency injection

Code Flags:
RET_VALUE_ONLY
Example:
bool b = f.isInjected();
Returns
True if the function or method has been injected as a dependency injection
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed

◆ isMethod()

bool Qore::Reflection::AbstractReflectionFunction::isMethod ( )

returns True if the object is a method but not a pseudo-method

Code Flags:
RET_VALUE_ONLY
Example:
bool b = f.isMethod();
Returns
True if the object is a method but not a pseudo-method
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed

◆ isPseudoMethod()

bool Qore::Reflection::AbstractReflectionFunction::isPseudoMethod ( )

returns True if the object is a pseudo-method

Code Flags:
RET_VALUE_ONLY
Example:
bool b = f.isPseudoMethod();
Returns
True if the object is a pseudo-method
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed

◆ isUser()

bool Qore::Reflection::AbstractReflectionFunction::isUser ( )

returns True if the function or method is a user function or method

Code Flags:
RET_VALUE_ONLY
Example:
bool b = f.isUser();
Returns
True if the function or method is a user function or method
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed
Note
complementary to isBuiltin()

◆ numVariants()

int Qore::Reflection::AbstractReflectionFunction::numVariants ( )

returns the number of variants implemented by the function or method

Code Flags:
RET_VALUE_ONLY
Example:
int n = f.numVariants();
Returns
the number of variants implemented by the function or method
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed

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