![]() |
nomlib
|
Base interface class for grouping objects under a united front. More...
#include <IDrawable.hpp>
Public Types | |
| typedef IDrawable | self_type |
| typedef self_type * | raw_ptr |
| A type definition for a C pointer – raw pointer – to an IDrawable object. | |
| typedef std::unique_ptr< self_type > | unique_ptr |
| A type definition for a C++11 std::unique_ptr to an IDrawable object. | |
| typedef std::shared_ptr< self_type > | shared_ptr |
| A type definition for a C++11 std::shared_ptr to an IDrawable object. | |
| typedef const RenderWindow | RenderTarget |
| Public Types inherited from nom::IObject | |
| typedef IObject | self_type |
| typedef IObject * | raw_ptr |
Public Member Functions | |
| IDrawable (void) | |
| Do nothing at all default constructor. | |
| virtual | ~IDrawable (void) |
| Do nothing at all destructor. | |
| virtual void | update (void)=0 |
| virtual void | draw (RenderTarget &) const =0 |
| Render the object onto the primary video buffer – your visible screen. | |
| virtual ObjectTypeInfo | type (void) const |
| Re-implements the IObject::type method. | |
| Public Member Functions inherited from nom::IObject | |
| IObject (void) | |
| Default constructor. | |
| virtual | ~IObject (void) |
| Virtual destructor. | |
| virtual bool | is_type (const ObjectTypeInfo &rhs) const |
| Compare this object type with another object's type. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from nom::IObject | |
| template<typename Base, typename Derived> | |
| static bool | is_a (const Derived object) |
| Compare two objects to determine if a derived class inherits from a base class object. | |
| static void * | operator new (nom::size_type mem) |
| static void | operator delete (void *ptr) |
| Static Public Attributes inherited from nom::IObject | |
| static uint64 | total_alloc_bytes |
| static uint64 | total_dealloc_bytes |
Base interface class for grouping objects under a united front.
nom::IDrawable is a simple, small base interface class ("a pure abstract class") intended for bridging a reliable contract between two or more classes.
[ADDITIONAL DESCRIPTION]
You may freely use this class both inside and outside of the library, with little worry of trouble arising. Sprite layering (think: groups) are the first use that comes to mind!
Usage example:
Definition at line 41 of file IDrawable.hpp.
| typedef self_type* nom::IDrawable::raw_ptr |
A type definition for a C pointer – raw pointer – to an IDrawable object.
Definition at line 48 of file IDrawable.hpp.
| typedef const RenderWindow nom::IDrawable::RenderTarget |
Definition at line 59 of file IDrawable.hpp.
| typedef IDrawable nom::IDrawable::self_type |
Definition at line 44 of file IDrawable.hpp.
| typedef std::shared_ptr<self_type> nom::IDrawable::shared_ptr |
A type definition for a C++11 std::shared_ptr to an IDrawable object.
Definition at line 56 of file IDrawable.hpp.
| typedef std::unique_ptr<self_type> nom::IDrawable::unique_ptr |
A type definition for a C++11 std::unique_ptr to an IDrawable object.
Definition at line 52 of file IDrawable.hpp.
|
inline |
Do nothing at all default constructor.
Definition at line 62 of file IDrawable.hpp.
|
inlinevirtual |
Do nothing at all destructor.
Definition at line 68 of file IDrawable.hpp.
|
pure virtual |
Render the object onto the primary video buffer – your visible screen.
Implemented in nom::FinalFantasyDecorator, nom::FinalFantasyFrame, nom::Gradient, nom::Line, nom::MinimalDecorator, nom::Point, nom::Rectangle, nom::Sprite, nom::SpriteBatch, and nom::Text.
|
inlinevirtual |
Re-implements the IObject::type method.
Reimplemented from nom::IObject.
Reimplemented in nom::Decorator, nom::FinalFantasyDecorator, nom::FinalFantasyFrame, nom::Gradient, nom::Line, nom::MinimalDecorator, nom::Rectangle, nom::Shape, nom::Sprite, nom::SpriteBatch, nom::Text, and nom::Transformable.
Definition at line 94 of file IDrawable.hpp.
|
pure virtual |
Intended to be used internally by the class re-implementing this method; for use in preparing the buffer to be drawn using the draw method call. Whereas both Update & Draw are typically publicly exposed to the end-user, only the Draw method call should be expected of the end-user to be explicitly called.
Implemented in nom::FinalFantasyDecorator, nom::FinalFantasyFrame, nom::Gradient, nom::Line, nom::MinimalDecorator, nom::Point, nom::Rectangle, nom::Sprite, nom::SpriteBatch, and nom::Text.