Version: 3.1.1

#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. More...
 
wxObjectCreateObject () const
 Creates an object of the appropriate kind. More...
 
const wxCharGetBaseClassName1 () const
 Returns the name of the first base class (NULL if none). More...
 
const wxCharGetBaseClassName2 () const
 Returns the name of the second base class (NULL if none). More...
 
const wxCharGetClassName () const
 Returns the string form of the class name. More...
 
int GetSize () const
 Returns the size of the class. More...
 
bool IsDynamic () const
 Returns true if this class info can create objects of the associated class. More...
 
bool IsKindOf (const wxClassInfo *info) const
 Returns true if this class is a kind of (inherits from) the given class. More...
 

Static Public Member Functions

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

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.