P-E-R-R-Y
Utilitaires, contrats et vendors du moteur, en une seule doc
Loading...
Searching...
No Matches
IGraphic2Module Class Referenceabstract

A vendor's 2D factory : window, input, loaded resources and the objects that reference them. A vendor that cannot do 3D implements this one and nothing else. More...

#include <IGraphic2Module.hpp>

Inheritance diagram for IGraphic2Module:
Collaboration diagram for IGraphic2Module:

Public Member Functions

virtual ~IGraphic2Module ()=default
virtual graphic::IWindow2 * createWindow (int32_t screenWidth, int32_t screenHeight, std::string title)=0
virtual void deleteWindow (graphic::IWindow2 *)=0
virtual graphic::IWindow2 * window ()=0
 La fenetre ouverte de ce vendor, nullptr s'il n'y en a pas.
virtual graphic::IKeyboard * createKeyboard (graphic::IWindow *window)=0
virtual void deleteKeyboard (graphic::IKeyboard *keyboard)=0
virtual graphic::IMouse * createMouse (graphic::IWindow *window)=0
virtual void deleteMouse (graphic::IMouse *mouse)=0
virtual graphic::IGamepad * createGamepad (graphic::IWindow *window)=0
virtual void deleteGamepad (graphic::IGamepad *gamepad)=0
virtual graphic::ITexture * createTexture (std::string path)=0
virtual void deleteTexture (graphic::ITexture *texture)=0
virtual graphic::IFont * createFont (std::string path)=0
virtual void deleteFont (graphic::IFont *font)=0
virtual graphic::IPolygon * createPolygon (std::vector< Vector2f > points)=0
virtual void deletePolygon (graphic::IPolygon *polygon)=0
virtual graphic::ISprite * createSprite (graphic::ITexture *texture)=0
virtual void deleteSprite (graphic::ISprite *sprite)=0
virtual graphic::IText * createText (std::string text, graphic::IFont *font)=0
virtual void deleteText (graphic::IText *text)=0
Public Member Functions inherited from IModule
virtual ~IModule ()=default
virtual const char * type () const =0
 Le contrat qu'il remplit : "graphic2", "audio", "game"...
virtual const char * name () const =0
 Le fournisseur : "raylib", "sfml", "console"...
virtual const char *const * claims () const
 Les ressources qu'il tient pour lui seul : "opengl"...
void bind (IModuleManager &manager)
 Le manager, pose au chargement. Jamais nul ensuite.
bool acquire ()
 Se declarer detenteur.
void release ()
 Rendre ce qu'on tenait. A appeler apres l'avoir detruit.
unsigned uses () const
 Combien de detenteurs, a cet instant.
bool mustClose () const
 Sa bibliotheque est condamnee : les detenteurs doivent lacher.
bool isClosed () const
 Plus aucun detenteur.
void condemn ()
 Le condamner. Appele par le manager, jamais par un module.
void reset ()
 Le rendre a neuf : ni detenteur, ni condamnation.

Static Public Attributes

static constexpr const char * entry = "getGraphic2Module"
 Symbol the loader looks up : present = this vendor can draw 2D.
static constexpr const char * contract = "graphic2"
static constexpr const char * accepts [] = {"graphic2", "graphic3", nullptr}
 Les contrats qui me satisfont, du plus general au plus precis.

Additional Inherited Members

Protected Member Functions inherited from IModule
IModuleManager * registry () const
 Pour aller chercher les autres modules.

Detailed Description

A vendor's 2D factory : window, input, loaded resources and the objects that reference them. A vendor that cannot do 3D implements this one and nothing else.

Constructor & Destructor Documentation

◆ ~IGraphic2Module()

virtual IGraphic2Module::~IGraphic2Module ( )
virtualdefault

Member Function Documentation

◆ createFont()

virtual graphic::IFont * IGraphic2Module::createFont ( std::string path)
pure virtual

◆ createGamepad()

virtual graphic::IGamepad * IGraphic2Module::createGamepad ( graphic::IWindow * window)
pure virtual

◆ createKeyboard()

virtual graphic::IKeyboard * IGraphic2Module::createKeyboard ( graphic::IWindow * window)
pure virtual

◆ createMouse()

virtual graphic::IMouse * IGraphic2Module::createMouse ( graphic::IWindow * window)
pure virtual

◆ createPolygon()

virtual graphic::IPolygon * IGraphic2Module::createPolygon ( std::vector< Vector2f > points)
pure virtual

◆ createSprite()

virtual graphic::ISprite * IGraphic2Module::createSprite ( graphic::ITexture * texture)
pure virtual

◆ createText()

virtual graphic::IText * IGraphic2Module::createText ( std::string text,
graphic::IFont * font )
pure virtual

◆ createTexture()

virtual graphic::ITexture * IGraphic2Module::createTexture ( std::string path)
pure virtual

◆ createWindow()

virtual graphic::IWindow2 * IGraphic2Module::createWindow ( int32_t screenWidth,
int32_t screenHeight,
std::string title )
pure virtual

◆ deleteFont()

virtual void IGraphic2Module::deleteFont ( graphic::IFont * font)
pure virtual

◆ deleteGamepad()

virtual void IGraphic2Module::deleteGamepad ( graphic::IGamepad * gamepad)
pure virtual

◆ deleteKeyboard()

virtual void IGraphic2Module::deleteKeyboard ( graphic::IKeyboard * keyboard)
pure virtual

◆ deleteMouse()

virtual void IGraphic2Module::deleteMouse ( graphic::IMouse * mouse)
pure virtual

◆ deletePolygon()

virtual void IGraphic2Module::deletePolygon ( graphic::IPolygon * polygon)
pure virtual

◆ deleteSprite()

virtual void IGraphic2Module::deleteSprite ( graphic::ISprite * sprite)
pure virtual

◆ deleteText()

virtual void IGraphic2Module::deleteText ( graphic::IText * text)
pure virtual

◆ deleteTexture()

virtual void IGraphic2Module::deleteTexture ( graphic::ITexture * texture)
pure virtual

◆ deleteWindow()

virtual void IGraphic2Module::deleteWindow ( graphic::IWindow2 * )
pure virtual

◆ window()

virtual graphic::IWindow2 * IGraphic2Module::window ( )
pure virtual

La fenetre ouverte de ce vendor, nullptr s'il n'y en a pas.

Elle appartient au MODULE, pas a qui l'a demandee. Celui qui a appele createWindow la detruira ; les autres ne font que l'emprunter.

C'est ainsi qu'un jeu heberge dessine dans la fenetre de la borne au lieu d'en ouvrir une seconde - ce que raylib ne saurait pas faire, et qui sous sfml donnerait deux fenetres dont une seule a le clavier.

Un vendor qui en gere plusieurs rend la premiere ; createWindow reste la pour qui en veut vraiment une a lui.

Returns
graphic::IWindow2*

Implemented in RayGraphicModule, SdlGraphicModule, SdlGraphicModule, and SfmlGraphicModule.

Member Data Documentation

◆ accepts

const char* IGraphic2Module::accepts[] = {"graphic2", "graphic3", nullptr}
staticconstexpr

Les contrats qui me satisfont, du plus general au plus precis.

Un IGraphic3Module EST un IGraphic2Module : qui demande de la 2D se contente d'un vendor 3D. La relation vit ICI, une fois, chez celui qui la definit - pas dans chaque module, qui devrait alors se reediter le jour ou une sur-interface apparait, et pas recopiee dans chaque hote.

Chaine litterale plutot qu'un include : IGraphic3Module.hpp inclut deja ce fichier, le citer ferait un cycle.

◆ contract

const char* IGraphic2Module::contract = "graphic2"
staticconstexpr

Ce que type() doit rendre. Ecrit ici et pas chez chaque vendor : une seule source, donc pas de faute de frappe qui viderait une ligne.

◆ entry

const char* IGraphic2Module::entry = "getGraphic2Module"
staticconstexpr

Symbol the loader looks up : present = this vendor can draw 2D.


The documentation for this class was generated from the following file: