Interface for an object that has a unique ID number. More...
#include <Identifiable.hpp>
Public Member Functions | |
Identifiable () | |
virtual unsigned int | getID () const |
string | toString () const |
Static Public Member Functions | |
static Identifiable * | findByID (unsigned int id) |
Private Attributes | |
unsigned int | id |
Static Private Attributes | |
static unsigned int | count = 0 |
static vector< Identifiable * > | ids |
Interface for an object that has a unique ID number.
Identifiable | ( | ) |
Increments counter and stores it as this object's unique ID number.
Identifiable * findByID | ( | unsigned int | id | ) | [static] |
Finds an identifiable object by its unique ID number.
unsigned int getID | ( | ) | const [virtual] |
Returns a unique identifier to the object.
string toString | ( | ) | const |
Forms a string from the object's attributes.
Implemented in Boolean, BooleanXor, Shape, and SimpleDrawable.