This class provides information about Qore class members.
More...
This class provides information about Qore class members.
- Restrictions:
- Qore::PO_NO_REFLECTION
- Since
- Qore 0.9.0
◆ constructor()
Qore::Reflection::AbstractConstant::constructor |
( |
| ) |
|
Throws an exception; this class cannot be created directly or used in a user class hierarchy.
- Exceptions
-
ABSTRACTCONSTANT-CONSTRUCTOR-ERROR | the AbstractConstant class cannot be constructed directly or inherited directly by a user-defined class |
◆ getModifierList()
list<string> Qore::Reflection::AbstractConstant::getModifierList |
( |
| ) |
|
returns a list of strings of modifiers describing the constant
- Code Flags:
- RET_VALUE_ONLY
- Example:
list<string> l = con.getModifierList();
- Returns
- list of strings of modifiers describing the member; possible values are:
"private"
: gives the accessibility of the constant (class constants only)
"private:internal"
: gives the accessibility of the constant (class constants only)
"public"
: for non-class constants, this is returned if the public flag is on the constant, meaning that it will be exported to child Program objects, otherwise thhis gives the access permission for class constants
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the constant has been destroyed |
- See also
- getModifiers()
◆ getModifiers()
int Qore::Reflection::AbstractConstant::getModifiers |
( |
| ) |
|
returns a bitfield of modifiers describing the constant
- Code Flags:
- RET_VALUE_ONLY
- Example:
int i = con.getModifiers();
- Returns
- a bitfield of modifiers describing the constant; possible values are:
- MC_PRIVATE: gives the accessibility of the constant (class constants only)
- MC_PRIVATEINTERNAL: gives the accessibility of the constant (class constants only)
- MC_PUBLIC: for non-class constants, this is returned if the public flag is on the constant, meaning that it will be exported to child Program objects, otherwise thhis gives the access permission for class constants
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the constant has been destroyed |
- See also
- getModifierList()
◆ getName()
string Qore::Reflection::AbstractConstant::getName |
( |
| ) |
|
returns the constant's name
- Code Flags:
- RET_VALUE_ONLY
- Example:
string name = con.getName();
- Returns
- the constant's name
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the constant has been destroyed |
◆ getSourceLocation()
Returns the source location of the contant declaration.
- Code Flags:
- RET_VALUE_ONLY
- Example:
hash<SourceLocationInfo> loc = con.getSourceLocation();
- Returns
- the source location of the contant declaration
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the constant has been destroyed |
◆ getType()
Type Qore::Reflection::AbstractConstant::getType |
( |
| ) |
|
Returns the type object for this constant.
- Code Flags:
- RET_VALUE_ONLY
- Example:
- Returns
- the type object for this constant
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the constant has been destroyed |
◆ getValue()
auto Qore::Reflection::AbstractConstant::getValue |
( |
| ) |
|
Returns the value of the constant.
- Code Flags:
- RET_VALUE_ONLY
- Example:
- Returns
- the value for the constant
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the constant has been destroyed |
◆ isBuiltin()
bool Qore::Reflection::AbstractConstant::isBuiltin |
( |
| ) |
|
returns True if the constant is builtin
- Code Flags:
- RET_VALUE_ONLY
- Example:
bool b = con.isBuiltin();
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the constant has been destroyed |
◆ isClassConstant()
bool Qore::Reflection::AbstractConstant::isClassConstant |
( |
| ) |
|
returns True if the constant is a class constant
- Code Flags:
- RET_VALUE_ONLY
- Example:
bool b = con.isClassConstant();
- Returns
- True if the constant is a class constant
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the constant has been destroyed |
◆ isEqual()
Returns True if the AbstractConstant object passed as an argument is equal to the current object; False if not.
- Code Flags:
- CONSTANT
- Example:
bool b = con1.isEqual(con2);
- Parameters
-
con | the constant to check with the current object for equality |
- Returns
- True if the AbstractConstant object passed as an argument is equal to the current object; False if not
◆ isUser()
bool Qore::Reflection::AbstractConstant::isUser |
( |
| ) |
|
returns True if the constant is a user constant
- Code Flags:
- RET_VALUE_ONLY
- Example:
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the constant has been destroyed |
The documentation for this class was generated from the following file:
- /export/home/dnichols/src/qore/git/qore/build/modules/reflection/QC_AbstractConstant.dox.h