Qore reflection Module  1.7.0
Qore::Reflection::AbstractMember Class Reference

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

Inheritance diagram for Qore::Reflection::AbstractMember:
Qore::Reflection::AbstractClassMember Qore::Reflection::TypedHashMember Qore::Reflection::NormalMember Qore::Reflection::StaticMember

Public Member Methods

 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 class and typed hash (hashdecl) members.

Restrictions:
Qore::PO_NO_REFLECTION
Since
Qore 0.9.0

Member Function Documentation

◆ constructor()

Qore::Reflection::AbstractMember::constructor ( )

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

Exceptions
ABSTRACTMEMBER-CONSTRUCTOR-ERRORthe AbstractMember class cannot be constructed directly or inherited directly by a user-defined class

◆ getDefaultValue()

auto Qore::Reflection::AbstractMember::getDefaultValue ( )

Returns the default value for the member or nothing if the member has no default value.

Code Flags:
RET_VALUE_ONLY
Example:
auto v = m.getDefaultValue();
Returns
the default value for the member or nothing if the member has no default value
Exceptions
PROGRAM-ERRORthrown if the Program object holding the class has been destroyed

◆ getName()

string Qore::Reflection::AbstractMember::getName ( )

returns the member's name

Code Flags:
RET_VALUE_ONLY
Example:
string name = mem.getName();
Returns
the member's name
Exceptions
PROGRAM-ERRORthrown if the Program object holding the class or typed hash (hashdecl) has been destroyed

◆ getSourceLocation()

hash<SourceLocationInfo> Qore::Reflection::AbstractMember::getSourceLocation ( )

Returns the source location of the member declaration.

Code Flags:
RET_VALUE_ONLY
Example:
hash<SourceLocationInfo> loc = mem.getSourceLocation();
Returns
the source location of the member declaration
Exceptions
PROGRAM-ERRORthrown if the Program object holding the class has been destroyed

◆ getType()

Type Qore::Reflection::AbstractMember::getType ( )

Returns the type object for this member.

Code Flags:
RET_VALUE_ONLY
Example:
Type t = m.getType();
Returns
the type object for this member
Exceptions
PROGRAM-ERRORthrown if the Program object holding the class has been destroyed

◆ isEqual()

bool Qore::Reflection::AbstractMember::isEqual ( AbstractMember  mem)

Returns True if the AbstractMember object passed as an argument is equal to the current object; False if not.

Code Flags:
CONSTANT
Example:
bool b = m1.isEqual(m2);
Parameters
memthe member to check with the current object for equality
Returns
True if the AbstractMember object passed as an argument is equal to the current object; False if not

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