Qore Programming Language 1.14.0
|
typed hash declaration More...
#include <TypedHashDecl.h>
Public Member Methods | |
DLLEXPORT void | addMember (const char *name, const QoreTypeInfo *memberTypeInfo, QoreValue init_val) |
adds an element to a built-in hashdecl | |
DLLEXPORT QoreHashNode * | doRuntimeCast (const QoreHashNode *h, ExceptionSink *xsink) const |
Performs a runtime cast and returns a typed hash if the has passed is compatible. More... | |
DLLEXPORT bool | equal (const TypedHashDecl *other) const |
returns true if the hashdecl passed as an arugment is equal to this hashdecl More... | |
DLLEXPORT const QoreExternalMemberBase * | findLocalMember (const char *name) const |
Finds the given local member or returns nullptr. More... | |
DLLEXPORT const char * | getModuleName () const |
Returns the module name the class was loaded from or nullptr if it is a builtin class. More... | |
DLLEXPORT const char * | getName () const |
returns the name of the typed hash | |
DLLEXPORT const QoreNamespace * | getNamespace () const |
Returns the namespace owning the typed hash declaration. More... | |
DLLEXPORT std::string | getNamespacePath (bool anchored=false) const |
returns the full namespace path of the class More... | |
DLLEXPORT const QoreExternalProgramLocation * | getSourceLocation () const |
returns the source location of the typed hash (hashdecl) definition More... | |
DLLEXPORT const QoreTypeInfo * | getTypeInfo (bool or_nothing=false) const |
returns the type info object for the hashdecl | |
DLLEXPORT bool | isPublic () const |
returns true if the typed hash has the public (export) flag set More... | |
DLLEXPORT bool | isSystem () const |
returns true if the typed hash is a builtin typed hash | |
Private Member Methods | |
DLLEXPORT | ~TypedHashDecl () |
deletes the object and frees all memory | |
typed hash declaration
DLLEXPORT QoreHashNode * TypedHashDecl::doRuntimeCast | ( | const QoreHashNode * | h, |
ExceptionSink * | xsink | ||
) | const |
Performs a runtime cast and returns a typed hash if the has passed is compatible.
The caller owns any reference retuned. Throws a Qore-language exception if the hash is not compatible with with the typed hash
DLLEXPORT bool TypedHashDecl::equal | ( | const TypedHashDecl * | other | ) | const |
returns true if the hashdecl passed as an arugment is equal to this hashdecl
DLLEXPORT const QoreExternalMemberBase * TypedHashDecl::findLocalMember | ( | const char * | name | ) | const |
Finds the given local member or returns nullptr.
DLLEXPORT const char * TypedHashDecl::getModuleName | ( | ) | const |
Returns the module name the class was loaded from or nullptr if it is a builtin class.
DLLEXPORT const QoreNamespace * TypedHashDecl::getNamespace | ( | ) | const |
Returns the namespace owning the typed hash declaration.
DLLEXPORT std::string TypedHashDecl::getNamespacePath | ( | bool | anchored = false | ) | const |
returns the full namespace path of the class
anchored | if true then the path will always be prefixed by "::" for the unnamed root namespace |
DLLEXPORT const QoreExternalProgramLocation * TypedHashDecl::getSourceLocation | ( | ) | const |
returns the source location of the typed hash (hashdecl) definition
DLLEXPORT bool TypedHashDecl::isPublic | ( | ) | const |
returns true if the typed hash has the public (export) flag set