Classes | |
class | wxRefCounter |
class | wxObject |
class | wxClassInfo |
class | wxObjectDataPtr< T > |
This is a helper template class primarily written to avoid memory leaks because of missing calls to wxRefCounter::DecRef() and wxObjectRefData::DecRef(). More... | |
Macros | |
#define | wxCLASSINFO(className) |
Returns a pointer to the wxClassInfo object associated with this class. More... | |
#define | wxDECLARE_ABSTRACT_CLASS(className) |
Used inside a class declaration to declare that the class should be made known to the class hierarchy, but objects of this class cannot be created dynamically. More... | |
#define | wxDECLARE_DYNAMIC_CLASS(className) |
Used inside a class declaration to make the class known to wxWidgets RTTI system and also declare that the objects of this class should be dynamically creatable from run-time type information. More... | |
#define | wxDECLARE_CLASS(className) |
Used inside a class declaration to declare that the class should be made known to the class hierarchy, but objects of this class cannot be created dynamically. More... | |
#define | wxIMPLEMENT_ABSTRACT_CLASS(className, baseClassName) |
Used in a C++ implementation file to complete the declaration of a class that has run-time type information. More... | |
#define | wxIMPLEMENT_ABSTRACT_CLASS2(className, baseClassName1, baseClassName2) |
Used in a C++ implementation file to complete the declaration of a class that has run-time type information and two base classes. More... | |
#define | wxIMPLEMENT_DYNAMIC_CLASS(className, baseClassName) |
Used in a C++ implementation file to complete the declaration of a class that has run-time type information, and whose instances can be created dynamically. More... | |
#define | wxIMPLEMENT_DYNAMIC_CLASS2(className, baseClassName1, baseClassName2) |
Used in a C++ implementation file to complete the declaration of a class that has run-time type information, and whose instances can be created dynamically. More... | |
#define | wxIMPLEMENT_CLASS(className, baseClassName) |
Synonym for wxIMPLEMENT_ABSTRACT_CLASS(). More... | |
#define | wxIMPLEMENT_CLASS2(className, baseClassName1, baseClassName2) |
Synonym for wxIMPLEMENT_ABSTRACT_CLASS2(). More... | |
#define | wx_truncate_cast(T, x) |
This case doesn’t correspond to any standard cast but exists solely to make casts which possibly result in a truncation of an integer value more readable. More... | |
#define | wxConstCast(ptr, classname) |
This macro expands into const_cast<classname *>(ptr) if the compiler supports const_cast or into an old, C-style cast, otherwise. More... | |
#define | wxDynamicCast(ptr, classname) |
This macro returns the pointer ptr cast to the type classname * if the pointer is of this type (the check is done during the run-time) or NULL otherwise. More... | |
#define | wxDynamicCastThis(classname) |
This macro is equivalent to wxDynamicCast(this, classname) but the latter provokes spurious compilation warnings from some compilers (because it tests whether this pointer is non-NULL which is always true), so this macro should be used to avoid them. More... | |
#define | wxStaticCast(ptr, classname) |
This macro checks that the cast is valid in debug mode (an assert failure will result if wxDynamicCast(ptr, classname) == NULL) and then returns the result of executing an equivalent of static_cast<classname *>(ptr) . More... | |
#define | WXDEBUG_NEW(arg) |
This is defined in debug mode to be call the redefined new operator with filename and line number arguments. More... | |
Typedefs | |
typedef wxRefCounter | wxObjectRefData |
Functions | |
wxObject * | wxCreateDynamicObject (const wxString &className) |
Creates and returns an object of the given class, if the class has been registered with the dynamic class system using DECLARE... More... | |
#define wx_truncate_cast | ( | T, | |
x | |||
) |
This case doesn’t correspond to any standard cast but exists solely to make casts which possibly result in a truncation of an integer value more readable.
Include file:
#include <wx/defs.h>
#define wxCLASSINFO | ( | className | ) |
Returns a pointer to the wxClassInfo object associated with this class.
Include file:
#include <wx/object.h>
#define wxConstCast | ( | ptr, | |
classname | |||
) |
This macro expands into const_cast<classname *>(ptr)
if the compiler supports const_cast or into an old, C-style cast, otherwise.
Include file:
#include <wx/defs.h>
#define WXDEBUG_NEW | ( | arg | ) |
This is defined in debug mode to be call the redefined new operator with filename and line number arguments.
The definition is:
In non-debug mode, this is defined as the normal new operator.
Include file:
#include <wx/object.h>
#define wxDECLARE_ABSTRACT_CLASS | ( | className | ) |
Used inside a class declaration to declare that the class should be made known to the class hierarchy, but objects of this class cannot be created dynamically.
Include file:
#include <wx/object.h>
Example:
#define wxDECLARE_CLASS | ( | className | ) |
Used inside a class declaration to declare that the class should be made known to the class hierarchy, but objects of this class cannot be created dynamically.
The same as wxDECLARE_ABSTRACT_CLASS().
Include file:
#include <wx/object.h>
#define wxDECLARE_DYNAMIC_CLASS | ( | className | ) |
Used inside a class declaration to make the class known to wxWidgets RTTI system and also declare that the objects of this class should be dynamically creatable from run-time type information.
Notice that this implies that the class should have a default constructor, if this is not the case consider using wxDECLARE_ABSTRACT_CLASS().
Include file:
#include <wx/object.h>
Example:
#define wxDynamicCast | ( | ptr, | |
classname | |||
) |
This macro returns the pointer ptr cast to the type classname * if the pointer is of this type (the check is done during the run-time) or NULL otherwise.
Usage of this macro is preferred over obsoleted wxObject::IsKindOf() function.
The ptr argument may be NULL, in which case NULL will be returned.
Include file:
#include <wx/object.h>
Example:
#define wxDynamicCastThis | ( | classname | ) |
This macro is equivalent to wxDynamicCast(this, classname)
but the latter provokes spurious compilation warnings from some compilers (because it tests whether this
pointer is non-NULL which is always true), so this macro should be used to avoid them.
Include file:
#include <wx/object.h>
#define wxIMPLEMENT_ABSTRACT_CLASS | ( | className, | |
baseClassName | |||
) |
Used in a C++ implementation file to complete the declaration of a class that has run-time type information.
Include file:
#include <wx/object.h>
Example:
#define wxIMPLEMENT_ABSTRACT_CLASS2 | ( | className, | |
baseClassName1, | |||
baseClassName2 | |||
) |
Used in a C++ implementation file to complete the declaration of a class that has run-time type information and two base classes.
Include file:
#include <wx/object.h>
#define wxIMPLEMENT_CLASS | ( | className, | |
baseClassName | |||
) |
Synonym for wxIMPLEMENT_ABSTRACT_CLASS().
Please prefer to use the more clear, if longer, wxIMPLEMENT_ABSTRACT_CLASS in the new code.
Include file:
#include <wx/object.h>
#define wxIMPLEMENT_CLASS2 | ( | className, | |
baseClassName1, | |||
baseClassName2 | |||
) |
Synonym for wxIMPLEMENT_ABSTRACT_CLASS2().
Please prefer to use the more clear, if longer, wxIMPLEMENT_ABSTRACT_CLASS2 in the new code.
Include file:
#include <wx/object.h>
#define wxIMPLEMENT_DYNAMIC_CLASS | ( | className, | |
baseClassName | |||
) |
Used in a C++ implementation file to complete the declaration of a class that has run-time type information, and whose instances can be created dynamically.
Include file:
#include <wx/object.h>
Example:
#define wxIMPLEMENT_DYNAMIC_CLASS2 | ( | className, | |
baseClassName1, | |||
baseClassName2 | |||
) |
Used in a C++ implementation file to complete the declaration of a class that has run-time type information, and whose instances can be created dynamically.
Use this for classes derived from two base classes.
Include file:
#include <wx/object.h>
#define wxStaticCast | ( | ptr, | |
classname | |||
) |
This macro checks that the cast is valid in debug mode (an assert failure will result if wxDynamicCast(ptr, classname) == NULL) and then returns the result of executing an equivalent of static_cast<classname *>(ptr)
.
Include file:
#include <wx/object.h>
typedef wxRefCounter wxObjectRefData |