Qore reflection Module  0.9.16
Qore::Reflection::TypedHashMember Class Reference

This class provides information about Qore typed hash (hashdecl) members. More...

Inheritance diagram for Qore::Reflection::TypedHashMember:
Qore::Reflection::AbstractMember

Public Member Methods

 constructor ()
 Throws an exception; this class cannot be created directly or used in a user class hierarchy. More...
 
auto getValue (hash< auto > h)
 Returns the value of the member for the given object. More...
 
bool isBuiltin ()
 returns True if the typed hash (hashdecl) defining the member is a builtin typed hash (hashdecl) More...
 
bool isUser ()
 returns True if the typed hash (hashdecl) defining the member is a user typed hash (hashdecl) More...
 
- Public Member Methods inherited from Qore::Reflection::AbstractMember
 constructor ()
 Throws an exception; this class cannot be created directly or used in a user class hierarchy. More...
 
auto getDefaultValue ()
 Returns the default value for the member or nothing if the member has no default value. More...
 
string getName ()
 returns the member's name More...
 
hash< SourceLocationInfo > getSourceLocation ()
 Returns the source location of the member declaration. More...
 
Type getType ()
 Returns the type object for this member. More...
 
bool isEqual (AbstractMember mem)
 Returns True if the AbstractMember object passed as an argument is equal to the current object; False if not. More...
 

Detailed Description

This class provides information about Qore typed hash (hashdecl) members.

Restrictions:
Qore::PO_NO_REFLECTION

There is no setter method in this class due to design issues related to lvalue restrictions with non-object data.

Since
Qore 0.9.0

Member Function Documentation

◆ constructor()

Qore::Reflection::TypedHashMember::constructor ( )

Throws an exception; this class cannot be created directly or used in a user class hierarchy.

Exceptions
TYPEDHASHMEMBER-CONSTRUCTOR-ERRORthe TypedHashMember class cannot be constructed directly or inherited directly by a user-defined class

◆ getValue()

auto Qore::Reflection::TypedHashMember::getValue ( hash< auto >  h)

Returns the value of the member for the given object.

Code Flags:
RET_VALUE_ONLY
Example:
auto val = m.getValue(h);
Parameters
ha hash to get the member value from; must have been declared with the typed hash (hashdecl)'s type declaring the member, or a MEMBER-ERROR exception is thrown
Returns
the value of the member for the given object; must have been declared with the typed hash (hashdecl)'s type declaring the member, or a MEMBER-ERROR exception is thrown
Exceptions
PROGRAM-ERRORthrown if the Program object holding the class has been destroyed
MEMBER-ERRORthe hash was not declared with the typed hash (hashdecl)'s type implementing this member

◆ isBuiltin()

bool Qore::Reflection::TypedHashMember::isBuiltin ( )

returns True if the typed hash (hashdecl) defining the member is a builtin typed hash (hashdecl)

Code Flags:
RET_VALUE_ONLY
Example:
bool b = m.isBuiltin();
Exceptions
PROGRAM-ERRORthrown if the Program object holding the typed hash (hashdecl) has been destroyed

◆ isUser()

bool Qore::Reflection::TypedHashMember::isUser ( )

returns True if the typed hash (hashdecl) defining the member is a user typed hash (hashdecl)

Code Flags:
RET_VALUE_ONLY
Example:
bool b = m.isUser();
Exceptions
PROGRAM-ERRORthrown if the Program object holding the cltyped hash (hashdecl)ass has been destroyed

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