wxArt2D
Public Member Functions | List of all members
a2dIdBase Class Reference

A class for id's of various kinds. More...

#include <id.h>

Public Member Functions

virtual wxString GetIdClassName ()
 

Detailed Description

A class for id's of various kinds.

a2dIdBase is used in situations, where traditionally an enumeration type is used. The disadvantage of an enumeration is, that it cannot easily be expanded by derived classes. If this would be done, all derived classes would share the same id range and would have to know each other. a2dIdBase solves this. Instead of a enum value, a distinct a2dIdBase object is used for identification. The identification is usually done by address. The a2dIdBase objects are generally static members of a class of global variables, so that they are accessable by all objects requiring the id. A a2dIdBase should always be derived of, so that different ID classes cannot be inadvertedly intermixed. A a2dIdBase cannot easily be serialized, because the address will change. To do this, it must be converted to a string form. Derived classes will have ways to do this. Another way to have unique IDs is to use wxNewId. The advantage of a2dIdBase is, that it can be extended to be serialized and that it need not be initialized.

Definition at line 61 of file id.h.


The documentation for this class was generated from the following file:
a2dIdBase Class Reference -- Sun Oct 12 2014 17:04:40 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation