Loading...
Searching...
No Matches
Qore::Reflection::NormalMember Class Reference

This class provides information about Qore class normal (non-static) members. More...

`#include <QC_NormalMember.dox.h>`

Inheritance diagram for Qore::Reflection::NormalMember:

## Public Member Functions

| constructor ()
| Throws an exception; this class cannot be created directly or used in a user class hierarchy.
auto | getValue (object obj)
| Returns the value of the member for the given object.
nothing | setValue (object obj, auto val)
| Sets the value of the member.
Public Member Functions inherited from Qore::Reflection::AbstractClassMember
| constructor ()
| Throws an exception; this class cannot be created directly or used in a user class hierarchy.
string | getAccessModifierString ()
| returns a string for the access modifier for the member
AbstractClass | getClass ()
| Returns the class for the member.
list< string > | getModifierList ()
| returns a list of strings of modifiers describing the member
int | getModifiers ()
| returns a bitfield of modifiers describing the member
bool | isBuiltin ()
| returns True if the class defining the member is a builtin class
bool | isStatic ()
| returns True if the member is static
bool | isTransient ()
| returns True if the member is transient
bool | isUser ()
| returns True if the class defining the member is a user class
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 class normal (non-static) members.

Restrictions:
  Qore::PO_NO_REFLECTION

Since
  Qore 0.9.0

## Member Function Documentation

## constructor()

Qore::Reflection::NormalMember::constructor | ( |  | ) |

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

Exceptions

  NORMALMEMBER-CONSTRUCTOR-ERROR | the NormalMember class cannot be constructed directly or inherited directly by a user-defined class

## getValue()

auto Qore::Reflection::NormalMember::getValue | ( | object | obj | ) |

Returns the value of the member for the given object.

Code Flags:
  RET_VALUE_ONLY

Example:
  auto val = m.getValue(obj);

Parameters

  obj | an object to get the member value from; must be an object of the class implementing the member or a `MEMBER-ERROR` exception is thrown

Returns
  the value of the member for the given object; if the object is not a member of the class, then a `MEMBER-ERROR` exception is thrown

Exceptions

  PROGRAM-ERROR | thrown if the Program object holding the class has been destroyed
  MEMBER-ERROR | the object was not instantiated from the class implementing this member

## setValue()

nothing Qore::Reflection::NormalMember::setValue | ( | object | obj,
|  | auto | val )

Sets the value of the member.

Example:
  m.setValue(obj, val);

Parameters

  obj | an object to set the member value on; must be an object of the class implementing the member or a `MEMBER-ERROR` exception is thrown
  val | the new value of the member

Exceptions

  PROGRAM-ERROR | thrown if the Program object holding the class has been destroyed
  MEMBER-ERROR | the object was not instantiated from the class implementing this member
  RUNTIME-TYPE-ERROR | value type is not compatible with the assigned member's type

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

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