Qore Programming Language  1.12.0
TypedHashDecl Class Reference

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 QoreHashNodedoRuntimeCast (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 QoreExternalMemberBasefindLocalMember (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 QoreNamespacegetNamespace () 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 QoreExternalProgramLocationgetSourceLocation () 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
 

Detailed Description

typed hash declaration

Since
Qore 0.8.13

Member Function Documentation

◆ doRuntimeCast()

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

Since
Qore 0.9.5

◆ equal()

DLLEXPORT bool TypedHashDecl::equal ( const TypedHashDecl other) const

returns true if the hashdecl passed as an arugment is equal to this hashdecl

Since
Qore 0.9

◆ findLocalMember()

DLLEXPORT const QoreExternalMemberBase* TypedHashDecl::findLocalMember ( const char *  name) const

Finds the given local member or returns nullptr.

Since
Qore 0.9

◆ getModuleName()

DLLEXPORT const char* TypedHashDecl::getModuleName ( ) const

Returns the module name the class was loaded from or nullptr if it is a builtin class.

Since
Qore 0.9

◆ getNamespace()

DLLEXPORT const QoreNamespace* TypedHashDecl::getNamespace ( ) const

Returns the namespace owning the typed hash declaration.

Since
Qore 0.9.4

◆ getNamespacePath()

DLLEXPORT std::string TypedHashDecl::getNamespacePath ( bool  anchored = false) const

returns the full namespace path of the class

Parameters
anchoredif true then the path will always be prefixed by "::" for the unnamed root namespace
Since
Qore 0.9

◆ getSourceLocation()

DLLEXPORT const QoreExternalProgramLocation* TypedHashDecl::getSourceLocation ( ) const

returns the source location of the typed hash (hashdecl) definition

Since
Qore 0.9

◆ isPublic()

DLLEXPORT bool TypedHashDecl::isPublic ( ) const

returns true if the typed hash has the public (export) flag set

Since
Qore 0.9.3

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