R-Type  2
Doom but in better
Loading...
Searching...
No Matches
GUI::ECS::Systems Namespace Reference

Data Structures

class  Clock
 A class for managing time tracking within the ECS system. More...
 
class  Collision
 Represents a rectangular component that can detect collisions and mouse interactions, such as hovering and clicking. More...
 
class  Colour
 A class for representing and manipulating colors using RGBA components. Inherits from EntityNode to associate colors with entities in the ECS. More...
 
class  EventManager
 Manages input events such as mouse movements, key presses, and window interactions. More...
 
class  Font
 Manages font entities in the GUI ECS. More...
 
class  KeyMapper
 
class  MouseInfo
 
class  Window
 Manages an SFML-based graphical window and handles rendering of ECS components. More...
 

Enumerations

enum class  ActiveShape { NONE = -1 , RECTANGLE = 0 , CIRCLE , CONVEX }
 Enum representing different types of shapes managed by the ShapeComponent. More...
 
enum class  Key {
  Unknown = -1 , A = 0 , B , C ,
  D , E , F , G ,
  H , I , J , K ,
  L , M , N , O ,
  P , Q , R , S ,
  T , U , V , W ,
  X , Y , Z , Up ,
  F1 , F2 , F3 , F4 ,
  F5 , F6 , F7 , F8 ,
  F9 , F10 , F11 , F12 ,
  F13 , F14 , F15 , F16 ,
  F17 , F18 , F19 , F20 ,
  F21 , F22 , F23 , F24 ,
  Tab , End , Add , Cut ,
  Num0 , Num1 , Num2 , Num3 ,
  Num4 , Num5 , Num6 , Num7 ,
  Num8 , Num9 , LAlt , RAlt ,
  Menu , Home , Down , Left ,
  Copy , Redo , Undo , Help ,
  Back , Stop , Comma , Enter ,
  Slash , Grave , Equal , Space ,
  Right , Pause , Paste , LShift ,
  RShift , Escape , Period , Hyphen ,
  PageUp , Insert , Delete , Divide ,
  Search , Select , Forward , Refresh ,
  Execute , LSystem , RSystem , Numpad0 ,
  Numpad1 , Numpad2 , Numpad3 , Numpad4 ,
  Numpad5 , Numpad6 , Numpad7 , Numpad8 ,
  Numpad9 , PageDown , LControl , RControl ,
  LBracket , RBracket , Subtract , Multiply ,
  CapsLock , HomePage , VolumeUp , Semicolon ,
  Backslash , Backspace , Favorites , MediaStop ,
  Apostrophe , LaunchMail , VolumeDown , ModeChange ,
  VolumeMute , Application , NumpadEqual , NumpadEnter ,
  NumpadDecimal , NonUsBackslash , MediaPlayPause , MediaNextTrack ,
  LaunchMediaSelect , LaunchApplication1 , LaunchApplication2 , MediaPreviousTrack
}
 
enum class  MouseWheel { Vertical , Horizontal }
 An enum class to allow the user to know which direction the mouse has scrolled. More...
 

Functions

std::ostream & operator<< (std::ostream &os, const Clock &item)
 Outputs the clock's info to a stream.
 
std::ostream & operator<< (std::ostream &os, const Collision &item)
 Outputs the collision component's info to a stream.
 
const bool operator== (Collision left, Collision right)
 Compares two collision components for equality.
 
const bool operator!= (Collision left, Collision right)
 Compares two collision components for inequality.
 
const Collision operator+ (Collision left, Collision right)
 Adds two collision components component-wise.
 
const Collision operator- (Collision left, Collision right)
 Subtracts two collision components component-wise.
 
const Collision operator* (Collision left, Collision right)
 Multiplies two collision components component-wise.
 
const Collisionoperator+= (Collision &left, Collision right)
 Adds another collision component to the current collision component component-wise.
 
const Collisionoperator-= (Collision &left, Collision right)
 Subtracts another collision component from the current collision component component-wise.
 
const Collisionoperator*= (Collision &left, Collision right)
 Multiplies another collision component with the current collision component component-wise.
 
std::ostream & operator<< (std::ostream &os, const Colour &colour)
 Outputs the color's info to a stream.
 
const bool operator== (Colour left, Colour right)
 Compares two colors for equality.
 
const bool operator!= (Colour left, Colour right)
 Compares two colors for inequality.
 
const Colour operator+ (Colour left, Colour right)
 Adds two colors component-wise.
 
const Colour operator- (Colour left, Colour right)
 Subtracts two colors component-wise.
 
const Colour operator* (Colour left, Colour right)
 Multiplies two colors component-wise.
 
const Colouroperator+= (Colour &left, Colour right)
 Adds another color to the current color component-wise.
 
const Colouroperator-= (Colour &left, Colour right)
 Subtracts another color from the current color component-wise.
 
const Colouroperator*= (Colour &left, Colour right)
 Multiplies another color with the current color component-wise.
 
std::ostream & operator<< (std::ostream &os, const EventManager &item)
 Outputs the event's info to a stream.
 
std::ostream & operator<< (std::ostream &os, const Font &item)
 Outputs the font's info to a stream.
 
std::ostream & operator<< (std::ostream &os, const KeyMapper &item)
 Outputs the keyMapper's info to a stream.
 
std::ostream & operator<< (std::ostream &os, const Key &item)
 Outputs the keyMapper's info to a stream.
 
std::ostream & operator<< (std::ostream &os, const MouseInfo &item)
 Outputs the Mouse's info to a stream.
 
std::ostream & operator<< (std::ostream &os, const Window &item)
 Outputs the window's info to a stream.
 

Variables

const std::unordered_map< Key, std::string > keyCodeEquivalence
 An unordered map to track the equivalence between the Key and the string representation.
 

Enumeration Type Documentation

◆ ActiveShape

enum class GUI::ECS::Systems::ActiveShape
strong

Enum representing different types of shapes managed by the ShapeComponent.

Enumerator
NONE 

No shape initialized.

RECTANGLE 

Rectangle shape.

CIRCLE 

Circle shape.

CONVEX 

Convex shape.

Definition at line 26 of file ActiveShape.hpp.

◆ Key

enum class GUI::ECS::Systems::Key
strong
Enumerator
Unknown 
Up 
F1 
F2 
F3 
F4 
F5 
F6 
F7 
F8 
F9 
F10 
F11 
F12 
F13 
F14 
F15 
F16 
F17 
F18 
F19 
F20 
F21 
F22 
F23 
F24 
Tab 
End 
Add 
Cut 
Num0 
Num1 
Num2 
Num3 
Num4 
Num5 
Num6 
Num7 
Num8 
Num9 
LAlt 
RAlt 
Menu 
Home 
Down 
Left 
Copy 
Redo 
Undo 
Help 
Back 
Stop 
Comma 
Enter 
Slash 
Grave 
Equal 
Space 
Right 
Pause 
Paste 
LShift 
RShift 
Escape 
Period 
Hyphen 
PageUp 
Insert 
Delete 
Divide 
Search 
Select 
Forward 
Refresh 
Execute 
LSystem 
RSystem 
Numpad0 
Numpad1 
Numpad2 
Numpad3 
Numpad4 
Numpad5 
Numpad6 
Numpad7 
Numpad8 
Numpad9 
PageDown 
LControl 
RControl 
LBracket 
RBracket 
Subtract 
Multiply 
CapsLock 
HomePage 
VolumeUp 
Semicolon 
Backslash 
Backspace 
Favorites 
MediaStop 
Apostrophe 
LaunchMail 
VolumeDown 
ModeChange 
VolumeMute 
Application 
NumpadEqual 
NumpadEnter 
NumpadDecimal 
NonUsBackslash 
MediaPlayPause 
MediaNextTrack 
LaunchMediaSelect 
LaunchApplication1 
LaunchApplication2 
MediaPreviousTrack 

Definition at line 33 of file Key.hpp.

◆ MouseWheel

enum class GUI::ECS::Systems::MouseWheel
strong

An enum class to allow the user to know which direction the mouse has scrolled.

Enumerator
Vertical 

The vertical mouse wheel.

Horizontal 

The horizontal mouse wheel.

Definition at line 35 of file MouseInfo.hpp.

Function Documentation

◆ operator!=() [1/2]

const bool GUI::ECS::Systems::operator!= ( Collision left,
Collision right )
nodiscard

Compares two collision components for inequality.

Parameters
leftThe first collision component.
rightThe second collision component.
Returns
true if the collision components are not equal; otherwise, false.

Definition at line 357 of file Collision.cpp.

◆ operator!=() [2/2]

const bool GUI::ECS::Systems::operator!= ( Colour left,
Colour right )
nodiscard

Compares two colors for inequality.

Parameters
leftThe first color.
rightThe second color.
Returns
true if the colors are not equal; otherwise, false.

Definition at line 266 of file Colour.cpp.

◆ operator*() [1/2]

const GUI::ECS::Systems::Collision GUI::ECS::Systems::operator* ( Collision left,
Collision right )
nodiscard

Multiplies two collision components component-wise.

Parameters
leftThe first collision component.
rightThe second collision component.
Returns
The resulting collision component.

Definition at line 384 of file Collision.cpp.

◆ operator*() [2/2]

const GUI::ECS::Systems::Colour GUI::ECS::Systems::operator* ( Colour left,
Colour right )
nodiscard

Multiplies two colors component-wise.

Parameters
leftThe first color.
rightThe second color.
Returns
The resulting color.

Definition at line 291 of file Colour.cpp.

◆ operator*=() [1/2]

const GUI::ECS::Systems::Collision & GUI::ECS::Systems::operator*= ( Collision & left,
Collision right )

Multiplies another collision component with the current collision component component-wise.

Parameters
leftThe collision component to modify.
rightThe collision component to multiply.
Returns
Reference to the modified collision component.

Definition at line 413 of file Collision.cpp.

◆ operator*=() [2/2]

const GUI::ECS::Systems::Colour & GUI::ECS::Systems::operator*= ( Colour & left,
Colour right )

Multiplies another color with the current color component-wise.

Parameters
leftThe color to modify.
rightThe color to multiply.
Returns
Reference to the modified color.

Definition at line 319 of file Colour.cpp.

◆ operator+() [1/2]

const GUI::ECS::Systems::Collision GUI::ECS::Systems::operator+ ( Collision left,
Collision right )
nodiscard

Adds two collision components component-wise.

Parameters
leftThe first collision component.
rightThe second collision component.
Returns
The resulting collision component.

Definition at line 362 of file Collision.cpp.

◆ operator+() [2/2]

const GUI::ECS::Systems::Colour GUI::ECS::Systems::operator+ ( Colour left,
Colour right )
nodiscard

Adds two colors component-wise.

Parameters
leftThe first color.
rightThe second color.
Returns
The resulting color.

Definition at line 271 of file Colour.cpp.

◆ operator+=() [1/2]

const GUI::ECS::Systems::Collision & GUI::ECS::Systems::operator+= ( Collision & left,
Collision right )

Adds another collision component to the current collision component component-wise.

Parameters
leftThe collision component to modify.
rightThe collision component to add.
Returns
Reference to the modified collision component.

Definition at line 395 of file Collision.cpp.

◆ operator+=() [2/2]

const GUI::ECS::Systems::Colour & GUI::ECS::Systems::operator+= ( Colour & left,
Colour right )

Adds another color to the current color component-wise.

Parameters
leftThe color to modify.
rightThe color to add.
Returns
Reference to the modified color.

Definition at line 301 of file Colour.cpp.

◆ operator-() [1/2]

const GUI::ECS::Systems::Collision GUI::ECS::Systems::operator- ( Collision left,
Collision right )
nodiscard

Subtracts two collision components component-wise.

Parameters
leftThe first collision component.
rightThe second collision component.
Returns
The resulting collision component.

Definition at line 373 of file Collision.cpp.

◆ operator-() [2/2]

const GUI::ECS::Systems::Colour GUI::ECS::Systems::operator- ( Colour left,
Colour right )
nodiscard

Subtracts two colors component-wise.

Parameters
leftThe first color.
rightThe second color.
Returns
The resulting color.

Definition at line 281 of file Colour.cpp.

◆ operator-=() [1/2]

const GUI::ECS::Systems::Collision & GUI::ECS::Systems::operator-= ( Collision & left,
Collision right )

Subtracts another collision component from the current collision component component-wise.

Parameters
leftThe collision component to modify.
rightThe collision component to subtract.
Returns
Reference to the modified collision component.

Definition at line 404 of file Collision.cpp.

◆ operator-=() [2/2]

const GUI::ECS::Systems::Colour & GUI::ECS::Systems::operator-= ( Colour & left,
Colour right )

Subtracts another color from the current color component-wise.

Parameters
leftThe color to modify.
rightThe color to subtract.
Returns
Reference to the modified color.

Definition at line 310 of file Colour.cpp.

◆ operator<<() [1/9]

std::ostream & GUI::ECS::Systems::operator<< ( std::ostream & os,
const Clock & item )

Outputs the clock's info to a stream.

Parameters
osThe output stream.
itemThe clock to output.
Returns
The modified output stream.

Definition at line 73 of file Clock.cpp.

◆ operator<<() [2/9]

std::ostream & GUI::ECS::Systems::operator<< ( std::ostream & os,
const Collision & item )

Outputs the collision component's info to a stream.

Parameters
osThe output stream.
itemThe collision component to output.
Returns
The modified output stream.

Definition at line 306 of file Collision.cpp.

◆ operator<<() [3/9]

std::ostream & GUI::ECS::Systems::operator<< ( std::ostream & os,
const Colour & colour )

Outputs the color's info to a stream.

Parameters
osThe output stream.
colourThe color to output.
Returns
The modified output stream.

Definition at line 255 of file Colour.cpp.

◆ operator<<() [4/9]

std::ostream & GUI::ECS::Systems::operator<< ( std::ostream & os,
const EventManager & item )

Outputs the event's info to a stream.

Parameters
osThe output stream.
itemThe event to output.
Returns
The modified output stream.

Definition at line 181 of file EventManager.cpp.

◆ operator<<() [5/9]

std::ostream & GUI::ECS::Systems::operator<< ( std::ostream & os,
const Font & item )

Outputs the font's info to a stream.

Parameters
osThe output stream.
itemThe font to output.
Returns
The modified output stream.

Definition at line 274 of file Font.cpp.

◆ operator<<() [6/9]

std::ostream & GUI::ECS::Systems::operator<< ( std::ostream & os,
const Key & item )

Outputs the keyMapper's info to a stream.

Parameters
osThe output stream.
itemThe Key enum to output.
Returns
The modified output stream.

Definition at line 499 of file Key.cpp.

◆ operator<<() [7/9]

std::ostream & GUI::ECS::Systems::operator<< ( std::ostream & os,
const KeyMapper & item )

Outputs the keyMapper's info to a stream.

Parameters
osThe output stream.
itemThe keyMapper to output.
Returns
The modified output stream.

Definition at line 493 of file Key.cpp.

◆ operator<<() [8/9]

std::ostream & GUI::ECS::Systems::operator<< ( std::ostream & os,
const MouseInfo & item )

Outputs the Mouse's info to a stream.

Parameters
osThe output stream.
itemThe Mouse to output.
Returns
The modified output stream.

Definition at line 424 of file MouseInfo.cpp.

◆ operator<<() [9/9]

std::ostream & GUI::ECS::Systems::operator<< ( std::ostream & os,
const Window & item )

Outputs the window's info to a stream.

Parameters
osThe output stream.
itemThe window to output.
Returns
The modified output stream.

Definition at line 316 of file Window.cpp.

◆ operator==() [1/2]

const bool GUI::ECS::Systems::operator== ( Collision left,
Collision right )
nodiscard

Compares two collision components for equality.

Parameters
leftThe first collision component.
rightThe second collision component.
Returns
true if the collision components are equal; otherwise, false.

Definition at line 351 of file Collision.cpp.

◆ operator==() [2/2]

const bool GUI::ECS::Systems::operator== ( Colour left,
Colour right )
nodiscard

Compares two colors for equality.

Parameters
leftThe first color.
rightThe second color.
Returns
true if the colors are equal; otherwise, false.

Definition at line 261 of file Colour.cpp.

Variable Documentation

◆ keyCodeEquivalence

const std::unordered_map< GUI::ECS::Systems::Key, std::string > GUI::ECS::Systems::keyCodeEquivalence
extern

An unordered map to track the equivalence between the Key and the string representation.

Definition at line 16 of file Key.cpp.