Class Class Reference

#include <reflectionbase.h>

Inheritance diagram for Class:

详细描述

Class represents a C++ class. It may contain member functions and member classes. Also if the class is an interface (in the sense of the MAXON API), the corresponding interface information can be obtained from Class .

公共成员函数

const MAXON_METHOD InterfaceReference *  GetInterface () const
const MAXON_METHOD NonvirtualInterfaceReference *  GetNonvirtualInterface () const
MAXON_METHOD Block < const Class *const >  GetBaseClasses () const
const MAXON_METHOD Class GetStaticInterface () const
-  Public Member Functions inherited from Container
MAXON_METHOD Block < const Class *const >  GetClasses () const
const MAXON_METHOD Class FindClass (const Id &name) const
MAXON_METHOD Block < const 函数 *const >  GetFunctions () const
MAXON_METHOD Result < const 函数 * >  FindFunction (const Id &name) const
MAXON_METHOD Result < void >  FindFunctions (const Id &name, const ValueReceiver < const 函数 * > &result) const
-  Public Member Functions inherited from Member
enum maxon::reflection::Member::KIND   MAXON_ENUM_FLAGS_CLASS ( KIND )
const MAXON_METHOD Container GetEnclosingContainer () const
MAXON_METHOD KIND   GetKind () const
const MAXON_METHOD Id GetSimpleName () const
const MAXON_METHOD Id GetId () const
MAXON_METHOD String   ToString (const FormatStatement *fs=nullptr) const

静态公共成员函数

static const Class Find (const Id &memberId)
template<typename INTERFACE >
static const Class FindInterface ()
static const Class FindInterface (const NonvirtualInterfaceReference *i)
static const Class FindInterface (const InterfaceReference *i)
-  Static Public Member Functions inherited from Container
static const Container Find (const Id &memberId)
-  Static Public Member Functions inherited from Member
static MAXON_METHOD Result < Bool GetMembers (const ValueReceiver < const Member & > &members)
static const MAXON_METHOD Member Find (const Id &memberId)

私有成员函数

  MAXON_INTERFACE_NONVIRTUAL_DERIVED ( Class , MAXON_REFERENCE_NONE , "net.maxon.reflection.interface.class")

Additional Inherited Members

-  Public Types inherited from Member
enum   KIND {
   PACKAGE ,
   CLASS ,
   FUNCTION ,
   INSTANCE_FUNCTION ,
   CONST_INSTANCE_FUNCTION ,
   CONTAINER_TEST ,
   FUNCTION_TEST
}

成员函数文档编制

◆  MAXON_INTERFACE_NONVIRTUAL_DERIVED()

MAXON_INTERFACE_NONVIRTUAL_DERIVED ( Class   ,
MAXON_REFERENCE_NONE   ,
"net.maxon.reflection.interface.class"   
)
private

◆  GetInterface()

const MAXON_METHOD InterfaceReference* GetInterface ( ) const

Returns a corresponding InterfaceReference if this Class is virtual interface, otherwise nullptr. If the interface has static methods, also GetNonvirtualInterface() returns a valid pointer which points to the NonvirtualInterfaceReference for the static methods.

返回
A InterfaceReference for this Class , or nullptr if this is no virtual interface.

◆  GetNonvirtualInterface()

const MAXON_METHOD NonvirtualInterfaceReference* GetNonvirtualInterface ( ) const

Returns a corresponding NonvirtualInterfaceReference if this Class is a non-virtual interface, or if this Class is a virtual interface with static methods. otherwise nullptr.

返回
An NonvirtualInterfaceReference for this Class , or nullptr if there is no corresponding non-virtual interface.

◆  GetBaseClasses()

MAXON_METHOD Block <const Class * const> GetBaseClasses ( ) const

TODO: (Ole) Not yet supported.

◆  GetStaticInterface()

const MAXON_METHOD Class * GetStaticInterface ( ) const

Return a Class containing the static methods of this virtual interface, or nullptr is this Class isn't a virtual interface or has no static methods.

返回
The Class for the static methods of this virtual interface, or nullptr.

◆  Find()

static const Class * Find ( const Id memberId )
static

Finds the class whose id is memberId . The id is the qualified name of the class with dot as separator, see Member::GetId() . If there is no class with the given memberId , nullptr is returned.

参数
[in] memberId A member id for a class.
返回
The class with the given memberId , or nullptr.

◆  FindInterface() [1/3]

static const Class * FindInterface ( )
static

Finds the Class object for a given non-virtual or virtual interface.

Template Parameters
INTERFACE The interface class (such as StringInterface ).
返回
The Class object for the given interface, or nullptr if no reflection was registered for that interface.

◆  FindInterface() [2/3]

static const Class * FindInterface ( const NonvirtualInterfaceReference *  i )
static

Finds the Class object for a given non-virtual interface reference.

参数
[in] i The interface.
返回
The Class object for the given interface, or nullptr if no reflection was registered for that interface or #i was nullptr.

◆  FindInterface() [3/3]

static const Class * FindInterface ( const InterfaceReference *  i )
static

Finds the Class object for a given virtual interface reference.

参数
[in] i The interface.
返回
The Class object for the given interface, or nullptr if no reflection was registered for that interface or #i was nullptr.