The abstract base class for Qore typed hashes (hashdecls)
More...
The abstract base class for Qore typed hashes (hashdecls)
- Restrictions:
- Qore::PO_NO_REFLECTION
- Since
- Qore 0.9.0
◆ constructor()
Qore::Reflection::TypedHash::constructor |
( |
string |
path | ) |
|
Creates the object from the typed hash (hashdecl) name or namespace-justified path as a string.
- Example:
- Parameters
-
- Exceptions
-
UNKNOWN-TYPED-HASH | cannot find a typed hash (hashdecl) with the given name or path |
ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
- See also
- forName()
◆ findAllRegex() [1/2]
Returns a list of typed hashes (hashdecls) matching the regular expression pattern argument or an empty list if no typed hashes match.
- Code Flags:
- RET_VALUE_ONLY
- Example:
list<TypedHash> l = TypedHash::findAllRegex("^S");
- Parameters
-
- Returns
- a list of typed hashes (hashdecls) matching the regular expression pattern argument or an empty list if no typed hashes match
◆ findAllRegex() [2/2]
Returns a list of typed hashes (hashdecls) matching the regular expression pattern argument or an empty list if no typed hashes match.
- Code Flags:
- RET_VALUE_ONLY
- Example:
list<TypedHash> l = TypedHash::findAllRegex(pgm, "^S");
- Parameters
-
- Returns
- a list of typed hashes (hashdecls) matching the regular expression pattern argument or an empty list if no typed hashes match
◆ forName() [1/2]
Returns a typed hash (hashdecl) object corresponding to the name or namespace-justified path provided as an argument.
- Code Flags:
- RET_VALUE_ONLY
- Example:
TypedHash th = TypedHash::forName("::ENV");
- Parameters
-
- Returns
- a typed hash (hashdecl) object corresponding to the name or namespace-justified path provided as an argument
- Exceptions
-
UNKNOWN-TYPED-HASH | cannot find a typed hash (hashdecl) with the given name or path |
ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
◆ forName() [2/2]
Returns a typed hash (hashdecl) object corresponding to the name or namespace-justified path provided as an argument.
- Code Flags:
- RET_VALUE_ONLY
- Example:
TypedHash th = TypedHash::forName(pgm, "::ENV");
- Parameters
-
- Returns
- a typed hash (hashdecl) object corresponding to the name or namespace-justified path provided as an argument
- Exceptions
-
UNKNOWN-TYPED-HASH | cannot find a typed hash (hashdecl) with the given name or path |
ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
◆ getMember()
returns the requested member or throws an exception if the member is not defined in the typed hash (hashdecl)
- Code Flags:
- RET_VALUE_ONLY
- Example:
TypedHashMember m = th.getMember(name);
- Returns
- the requested member or throws an exception if the member is not defined in the typed hash (hashdecl)
- Exceptions
-
◆ getMembers()
returns a list of all declared typed hash (hashdecl) members in declaration order
- Code Flags:
- RET_VALUE_ONLY
- Example:
list<TypedHashMember> l = th.getMembers();
- Returns
- a list of all declared typed hash (hashdecl) members in declaration order
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the class has been destroyed |
◆ getModuleName()
*string Qore::Reflection::TypedHash::getModuleName |
( |
| ) |
|
Returns the module name providing the typed hash or NOTHING if the typed hash was not provided by a module.
- Code Flags:
- RET_VALUE_ONLY
- Example:
*string str = th.getModuleName();
- Returns
- the module name providing the typed hash or NOTHING if the typed hash was not provided by a module
◆ getName()
string Qore::Reflection::TypedHash::getName |
( |
| ) |
|
◆ getNamespace()
Namespace Qore::Reflection::TypedHash::getNamespace |
( |
| ) |
|
Returns the namespace for the typed hash.
- Code Flags:
- CONSTANT
- Example:
Namespace ns = th.getNamespace();
- Returns
- the namespace for the typed hash
◆ getOrNothingType()
Type Qore::Reflection::TypedHash::getOrNothingType |
( |
| ) |
|
Returns the "or nothing" type object for this typed hash.
- Code Flags:
- RET_VALUE_ONLY
- Example:
Type t = th.getOrNothingType();
- Returns
- the "or nothing" type object for this typed hash
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the typed hash has been destroyed |
- See also
- getType()
◆ getPathName()
string Qore::Reflection::TypedHash::getPathName |
( |
| ) |
|
◆ getSourceLocation()
◆ getType()
Type Qore::Reflection::TypedHash::getType |
( |
| ) |
|
Returns the type object for this typed hash.
- Code Flags:
- RET_VALUE_ONLY
- Example:
- Returns
- the type object for this typed hash
- Exceptions
-
- See also
- getOrNothingType()
◆ isBuiltin()
bool Qore::Reflection::TypedHash::isBuiltin |
( |
| ) |
|
◆ isEqual()
bool Qore::Reflection::TypedHash::isEqual |
( |
TypedHash |
th | ) |
|
Returns True if the typed hash passed as an argument is equal to the current object; False if not.
- Code Flags:
- CONSTANT
- Example:
bool b = th1.isEqual(th2);
- Parameters
-
- 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 typed hashes (hashdecls) created from the same source code but in different Program containers, it will return False
◆ isUser()
bool Qore::Reflection::TypedHash::isUser |
( |
| ) |
|
The documentation for this class was generated from the following file:
- /export/home/dnichols/src/qore/git/qore/build/modules/reflection/QC_TypedHash.dox.h