Version: 3.1.0
wxClassInfo Class Reference

#include <wx/object.h>

Detailed Description

This class stores meta-information about classes.

Instances of this class are not generally defined directly by an application, but indirectly through use of macros such as wxDECLARE_DYNAMIC_CLASS and wxIMPLEMENT_DYNAMIC_CLASS.

Library:  wxBase
Category:  Runtime Type Information (RTTI)
See Also
wxClassInfo, wxObject

Public Member Functions

 wxClassInfo (const wxChar *className, const wxClassInfo *baseClass1, const wxClassInfo *baseClass2, int size, wxObjectConstructorFn fn)
 Constructs a wxClassInfo object.
 
wxObjectCreateObject () const
 Creates an object of the appropriate kind.
 
const wxCharGetBaseClassName1 () const
 Returns the name of the first base class (NULL if none).
 
const wxCharGetBaseClassName2 () const
 Returns the name of the second base class (NULL if none).
 
const wxCharGetClassName () const
 Returns the string form of the class name.
 
int GetSize () const
 Returns the size of the class.
 
bool IsDynamic () const
 Returns true if this class info can create objects of the associated class.
 
bool IsKindOf (const wxClassInfo *info) const
 Returns true if this class is a kind of (inherits from) the given class.
 

Static Public Member Functions

static wxClassInfoFindClass (const wxString &className)
 Finds the wxClassInfo object for a class with the given name.
 

Constructor & Destructor Documentation

wxClassInfo::wxClassInfo ( const wxChar className,
const wxClassInfo baseClass1,
const wxClassInfo baseClass2,
int  size,
wxObjectConstructorFn  fn 
)

Constructs a wxClassInfo object.

The supplied macros implicitly construct objects of this class, so there is no need to create such objects explicitly in an application.

Member Function Documentation

wxObject* wxClassInfo::CreateObject ( ) const

Creates an object of the appropriate kind.

Returns
NULL if the class has not been declared dynamically creatable (typically, this happens for abstract classes).
static wxClassInfo* wxClassInfo::FindClass ( const wxString className)
static

Finds the wxClassInfo object for a class with the given name.

const wxChar* wxClassInfo::GetBaseClassName1 ( ) const

Returns the name of the first base class (NULL if none).

const wxChar* wxClassInfo::GetBaseClassName2 ( ) const

Returns the name of the second base class (NULL if none).

const wxChar* wxClassInfo::GetClassName ( ) const

Returns the string form of the class name.

int wxClassInfo::GetSize ( ) const

Returns the size of the class.

bool wxClassInfo::IsDynamic ( ) const

Returns true if this class info can create objects of the associated class.

bool wxClassInfo::IsKindOf ( const wxClassInfo info) const

Returns true if this class is a kind of (inherits from) the given class.