| Qore reflection Module 1.14.0

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Qore::Reflection::TypedHashMember Class Reference

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

`#include <QC_TypedHashMember.dox.h>`

Inheritance diagram for Qore::Reflection::TypedHashMember:

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

## 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-ERROR | the 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

  h | a 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-ERROR | thrown if the Program object holding the class has been destroyed
  MEMBER-ERROR | the 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-ERROR | thrown 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-ERROR | thrown if the Program object holding the cltyped hash (hashdecl)ass has been destroyed

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

- modules/reflection/src/QC_TypedHashMember.dox.h