|
R-Type
2
Doom but in better
|
Data Structures | |
| class | Rect |
| A generic 2D rectangle class that holds position and size as pairs. More... | |
Typedefs | |
| typedef Rect< int > | IntRect |
| The Rect element cast as an int. | |
| typedef Rect< long int > | LIntRect |
| The Rect element cast as a long int. | |
| typedef Rect< long long int > | LLIntRect |
| The Rect element cast as a long long int. | |
| typedef Rect< unsigned int > | UIntRect |
| The Rect element cast as an unsigned int. | |
| typedef Rect< unsigned long int > | ULIntRect |
| The Rect element cast as an unsigned long int. | |
| typedef Rect< unsigned long long int > | ULLIntRect |
| The Rect element cast as an unsigned long long int. | |
| typedef Rect< float > | FloatRect |
| the Rect element cast as a float | |
| typedef Rect< double > | DoubleRect |
| The Rect element cast as a double. | |
Functions | |
| template<typename T > | |
| std::ostream & | operator<< (std::ostream &os, const Rect< T > &rectangle) |
| Operator in charge of outputing the values contained in the _rect when it is passed through a << operator. | |
| template<typename T > | |
| constexpr bool | operator== (const Rect< T > &lhs, const Rect< T > &rhs) |
| Overload that allows the user to check if 2 rect instances are identical. | |
| template<typename T > | |
| constexpr bool | operator!= (const Rect< T > &lhs, const Rect< T > &rhs) |
| Inequality operators for the Rect. | |
| template<typename RectType > | |
| const std::string | myToString (const Rect< RectType > &rectangle) |
Converts a Rect<T> object to its string representation. | |
| const std::string | myToString (bool value) |
| Converts a boolean value to its string representation. | |
| template<typename T > | |
| const std::string | myToString (const T &value) |
| Converts a numeric value to its string representation. | |
| template<typename T1 , typename T2 > | |
| const std::string | myToString (const std::pair< T1, T2 > &value) |
Converts a std::pair to its string representation. | |
| template<typename Key , typename Value > | |
| std::string | myToString (const std::map< Key, Value > &map) |
| Converts a std::map to a string representation. | |
| template<typename T > | |
| std::string | myToString (const std::set< T > &set) |
| Converts a std::set to a string representation. | |
| template<typename T > | |
| const std::string | myToString (const std::vector< T > &set) |
| Converts a std::vector to a string representation. | |
| template<typename Key , typename Value > | |
| std::string | myToString (const std::unordered_map< Key, Value > &map) |
| Converts a std::unordered_map to a string representation. | |
| template<typename T > | |
| const std::string | myToString (const std::unordered_set< T > &set) |
| Converts a std::unordered_set to a string representation. | |
| const std::string | myToString (const ActiveScreen &item) |
Converts an ActiveScreen enumeration value to a string. | |
| const std::string | myToString (const GUI::ECS::GameComponents::Package &item) |
Converts a GUI::ECS::GameComponents::Package structure to a string. | |
| const std::string | myToString (const GUI::ECS::GameComponents::EntityType &item) |
Converts a GUI::ECS::GameComponents::EntityType enumeration value to a string. | |
| const std::string | myToString (const GUI::ECS::GameComponents::ECSPackage &item) |
Converts a GUI::ECS::GameComponents::ECSPackage structure to a string. | |
| const std::string | myToString (const GUI::ECS::GameComponents::EntityActions &item) |
Converts a GUI::ECS::GameComponents::EntityActions structure to a string. | |
| const std::string | myToString (const GUI::ECS::GameComponents::EntityActionType &item) |
Converts a GUI::ECS::GameComponents::EntityActionType enumeration value to a string. | |
| const std::string | myToString (const GUI::ECS::Systems::ActiveShape &shape) |
| Overload for the Active Shape enum so that the user can just output the type of the shape they want. | |
| const std::string | myToString (const GUI::Network::MessageType &messageType) |
| Overload for the Message Type enum so that the user can just output the type of the message that was received. | |
| const std::string | myToString (const GUI::Network::MessageInfo &messageInfo) |
| Overload for the Message Type enum so that the user can just output the type of the message that was received. | |
| const std::string | myToString (const GUI::Network::MessageNode &messageNode) |
| Overload for the Message Type enum so that the user can just output the type of the message that was received. | |
| typedef Rect<double> Recoded::DoubleRect |
| typedef Rect<float> Recoded::FloatRect |
| typedef Rect<int> Recoded::IntRect |
| typedef Rect<long int> Recoded::LIntRect |
| typedef Rect<long long int> Recoded::LLIntRect |
| typedef Rect<unsigned int> Recoded::UIntRect |
| typedef Rect<unsigned long int> Recoded::ULIntRect |
| typedef Rect<unsigned long long int> Recoded::ULLIntRect |
| const std::string Recoded::myToString | ( | bool | value | ) |
Converts a boolean value to its string representation.
Unlike std::to_string, which converts true to "1" and false to "0", this function returns "true" for true and "false" for false.
| value | The boolean value to convert. |
Recoded::myToString to convert elements to strings. Definition at line 16 of file ToString.cpp.
| const std::string Recoded::myToString | ( | const ActiveScreen & | item | ) |
Converts an ActiveScreen enumeration value to a string.
This function maps each value of the ActiveScreen enum to a corresponding string representation.
| item | The ActiveScreen enum value to convert. |
ActiveScreen enum value.Recoded::myToString to convert elements to strings. Definition at line 24 of file ToString.cpp.
| const std::string Recoded::myToString | ( | const GUI::ECS::GameComponents::ECSPackage & | item | ) |
Converts a GUI::ECS::GameComponents::ECSPackage structure to a string.
Converts a GUI::ECS::GameComponents::ECSPackage_t structure to a string.
This function generates a formatted string representing the details of the ECSPackage structure.
| item | The ECSPackage structure to convert. |
ECSPackage.Recoded::myToString to convert elements to strings.This function generates a formatted string representing the details of the ECSPackage_t structure.
| item | The ECSPackage_t structure to convert. |
ECSPackage_t.Recoded::myToString to convert elements to strings. Definition at line 105 of file ToString.cpp.
| const std::string Recoded::myToString | ( | const GUI::ECS::GameComponents::EntityActions & | item | ) |
Converts a GUI::ECS::GameComponents::EntityActions structure to a string.
Converts a GUI::ECS::GameComponents::EntityActions_t structure to a string.
This function generates a formatted string representing the details of the EntityActions structure.
| item | The EntityActions structure to convert. |
EntityActions.Recoded::myToString to convert elements to strings.This function generates a formatted string representing the details of the EntityActions_t structure.
| item | The EntityActions_t structure to convert. |
EntityActions_t.Recoded::myToString to convert elements to strings. Definition at line 116 of file ToString.cpp.
| const std::string Recoded::myToString | ( | const GUI::ECS::GameComponents::EntityActionType & | item | ) |
Converts a GUI::ECS::GameComponents::EntityActionType enumeration value to a string.
This function maps each value of the EntityActionType enum to a corresponding string representation.
| item | The EntityActionType enum value to convert. |
EntityActionType enum value.Recoded::myToString to convert elements to strings. Definition at line 127 of file ToString.cpp.
| const std::string Recoded::myToString | ( | const GUI::ECS::GameComponents::EntityType & | item | ) |
Converts a GUI::ECS::GameComponents::EntityType enumeration value to a string.
This function maps each value of the EntityType enum to a corresponding string representation.
| item | The EntityType enum value to convert. |
EntityType enum value.Recoded::myToString to convert elements to strings. Definition at line 87 of file ToString.cpp.
| const std::string Recoded::myToString | ( | const GUI::ECS::GameComponents::Package & | item | ) |
Converts a GUI::ECS::GameComponents::Package structure to a string.
Converts a GUI::ECS::GameComponents::Package_t structure to a string.
This function generates a formatted string representing the details of the Package structure.
| item | The Package structure to convert. |
Package.Recoded::myToString to convert elements to strings.This function generates a formatted string representing the details of the Package_t structure.
| item | The Package_t structure to convert. |
Package_t.Recoded::myToString to convert elements to strings. Definition at line 75 of file ToString.cpp.
| const std::string Recoded::myToString | ( | const GUI::ECS::Systems::ActiveShape & | shape | ) |
Overload for the Active Shape enum so that the user can just output the type of the shape they want.
| shape | GUI::ECS::Systems::ActiveShape |
Definition at line 138 of file ToString.cpp.
| const std::string Recoded::myToString | ( | const GUI::Network::MessageInfo & | messageInfo | ) |
Overload for the Message Type enum so that the user can just output the type of the message that was received.
| shape | GUI::Network::MessageInfo |
Definition at line 187 of file ToString.cpp.
| const std::string Recoded::myToString | ( | const GUI::Network::MessageNode & | messageNode | ) |
Overload for the Message Type enum so that the user can just output the type of the message that was received.
| shape | GUI::Network::MessageNode |
Definition at line 200 of file ToString.cpp.
| const std::string Recoded::myToString | ( | const GUI::Network::MessageType & | messageType | ) |
Overload for the Message Type enum so that the user can just output the type of the message that was received.
| shape | GUI::Network::MessageType |
Definition at line 155 of file ToString.cpp.
| const std::string Recoded::myToString | ( | const Rect< RectType > & | rectangle | ) |
Converts a Rect<T> object to its string representation.
This function formats a Rect<T> as ( x: <x>, y: <y>, width: <width>, height: <height> ), where <x>, <y>, <width>, and <height> are the string representations of the rectangle's properties. The string representations of the properties are generated using myToString.
Example:
| RectType | The type of the rectangle's properties (e.g., int, float). |
| rectangle | The Rect<T> object to convert to a string. |
( x: <x>, y: <y>, width: <width>, height: <height> ).Recoded::myToString to convert elements to strings. | std::string Recoded::myToString | ( | const std::map< Key, Value > & | map | ) |
Converts a std::map to a string representation.
This function iterates over the key-value pairs of a std::map and generates a string in the format: ‘{ 'key1’ : 'value1', 'key2' : 'value2', ... }`.
| Key | The type of the keys in the map. |
| Value | The type of the values in the map. |
| map | The map to be converted to a string. |
Recoded::myToString to convert keys and values to strings. Definition at line 119 of file ToString.hpp.
| const std::string Recoded::myToString | ( | const std::pair< T1, T2 > & | value | ) |
Converts a std::pair to its string representation.
This function formats the std::pair as ( x: <first>, y: <second> ), where <first> and <second> are the string representations of the pair's elements. The elements' string representations are generated using myToString.
Example:
| T1 | The type of the first element in the pair. |
| T2 | The type of the second element in the pair. |
| value | The pair to convert. |
( x: <first>, y: <second> ).Recoded::myToString to convert elements to strings. Definition at line 97 of file ToString.hpp.
| std::string Recoded::myToString | ( | const std::set< T > & | set | ) |
Converts a std::set to a string representation.
This function iterates over the elements of a std::set and generates a string in the format: ‘{ 'element1’, 'element2', ... }`.
| T | The type of the elements in the set. |
| set | The set to be converted to a string. |
Recoded::myToString to convert elements to strings. Definition at line 147 of file ToString.hpp.
| std::string Recoded::myToString | ( | const std::unordered_map< Key, Value > & | map | ) |
Converts a std::unordered_map to a string representation.
This function iterates over the key-value pairs of a std::unordered_map and generates a string in the format: ‘{ 'key1’ : 'value1', 'key2' : 'value2', ... }`.
| Key | The type of the keys in the unordered map. |
| Value | The type of the values in the unordered map. |
| map | The unordered map to be converted to a string. |
Recoded::myToString to convert keys and values to strings. Definition at line 203 of file ToString.hpp.
| const std::string Recoded::myToString | ( | const std::unordered_set< T > & | set | ) |
Converts a std::unordered_set to a string representation.
This function iterates over the elements of a std::unordered_set and generates a string in the format: ‘{ 'element1’, 'element2', ... }`.
| T | The type of the elements in the unordered set. |
| set | The unordered set to be converted to a string. |
Recoded::myToString to convert elements to strings. Definition at line 231 of file ToString.hpp.
| const std::string Recoded::myToString | ( | const std::vector< T > & | set | ) |
Converts a std::vector to a string representation.
This function iterates over the elements of a std::vector and generates a string in the format: ‘[ 'element1’, 'element2', ... ]`.
| T | The type of the elements in the vector. |
| vec | The vector to be converted to a string. |
Recoded::myToString to convert elements to strings. Definition at line 174 of file ToString.hpp.
| const std::string Recoded::myToString | ( | const T & | value | ) |
Converts a numeric value to its string representation.
This function is a wrapper around std::to_string and supports all types for which std::to_string is valid. It is intended for general use with numeric types like int, float, double, etc.
| T | The type of the value to convert. Must be a numeric type. |
| value | The value to convert. |
Recoded::myToString to convert elements to strings. Definition at line 69 of file ToString.hpp.
|
inline |
Operator in charge of outputing the values contained in the _rect when it is passed through a << operator.
| T | A template to accept any form of rectangle |
| os | The output stream |
| rectangle | The rectangle instance |