igraphic 0.2.0
Contrats graphiques chargeables : IGraphic2Module / IGraphic3Module
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::IWindow2createWindow (int32_t screenWidth, int32_t screenHeight, std::string title)=0
 
virtual void deleteWindow (graphic::IWindow2 *)=0
 
virtual graphic::IWindow2window ()=0
 La fenetre ouverte de ce vendor, nullptr s'il n'y en a pas.
 
virtual graphic::IKeyboardcreateKeyboard (graphic::IWindow *window)=0
 
virtual void deleteKeyboard (graphic::IKeyboard *keyboard)=0
 
virtual graphic::IMousecreateMouse (graphic::IWindow *window)=0
 
virtual void deleteMouse (graphic::IMouse *mouse)=0
 
virtual graphic::IGamepadcreateGamepad (graphic::IWindow *window)=0
 
virtual void deleteGamepad (graphic::IGamepad *gamepad)=0
 
virtual graphic::ITexturecreateTexture (std::string path)=0
 
virtual void deleteTexture (graphic::ITexture *texture)=0
 
virtual graphic::IFontcreateFont (std::string path)=0
 
virtual void deleteFont (graphic::IFont *font)=0
 
virtual graphic::IPolygoncreatePolygon (std::vector< Vector2f > points)=0
 
virtual void deletePolygon (graphic::IPolygon *polygon)=0
 
virtual graphic::ISpritecreateSprite (graphic::ITexture *texture)=0
 
virtual void deleteSprite (graphic::ISprite *sprite)=0
 
virtual graphic::ITextcreateText (std::string text, graphic::IFont *font)=0
 
virtual void deleteText (graphic::IText *text)=0
 

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.
 

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

Implemented in IGraphic3Module.

◆ 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*

Member Data Documentation

◆ accepts

constexpr 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

constexpr 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

constexpr 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: