![]() |
R-Type
2
Doom but in better
|
Functions | |
std::ostream & | operator<< (std::ostream &os, const bool &item) |
Outputs a boolean value to the given output stream using a custom string representation. | |
template<typename T1 , typename T2 > | |
std::ostream & | operator<< (std::ostream &os, const std::pair< T1, T2 > &item) |
Outputs a pair of items to the given output stream using a custom string representation. | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &os, const std::vector< T > &set) |
Outputs a vector of items to the given output stream using a custom string representation. | |
template<typename Key , typename Value > | |
std::ostream & | operator<< (std::ostream &os, const std::unordered_map< Key, Value > &map) |
Outputs an unordered_map of items to the given output stream using a custom string representation. | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &os, const std::set< T > &set) |
Outputs a set of items to the given output stream using a custom string representation. | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &os, const std::unordered_set< T > &set) |
Outputs an unordered_set of items to the given output stream using a custom string representation. | |
std::ostream & | operator<< (std::ostream &os, const ActiveScreen &item) |
Outputs a the string value of the ActiveScreen enum to the given output stream using a custom string representation. | |
std::ostream & | operator<< (std::ostream &os, const GUI::ECS::GameComponents::Package_t &item) |
Outputs a the string value of the Package_t enum to the given output stream using a custom string representation. | |
std::ostream & | operator<< (std::ostream &os, const GUI::ECS::GameComponents::EntityType &item) |
Outputs a the string value of the EntityType enum to the given output stream using a custom string representation. | |
std::ostream & | operator<< (std::ostream &os, const GUI::ECS::GameComponents::ECSPackage_t &item) |
Outputs a the string value of the ECSPackage_t enum to the given output stream using a custom string representation. | |
std::ostream & | operator<< (std::ostream &os, const GUI::ECS::GameComponents::EntityActions_t &item) |
Outputs a the string value of the EntityActions_t enum to the given output stream using a custom string representation. | |
std::ostream & | operator<< (std::ostream &os, const GUI::ECS::GameComponents::EntityActionType &item) |
Outputs a the string value of the EntityActionType enum to the given output stream using a custom string representation. | |
std::ostream & | operator<< (std::ostream &os, const GUI::ECS::Systems::ActiveShape &item) |
Outputs a the string value of the ActiveShape enum to the given output stream using a custom string representation. | |
std::ostream & | operator<< (std::ostream &os, const GUI::Network::MessageType &item) |
Outputs a the string value of the MessageType enum to the given output stream using a custom string representation. | |
std::ostream & | operator<< (std::ostream &os, const GUI::Network::MessageInfo &item) |
Outputs a the string value of the MessageInfo enum to the given output stream using a custom string representation. | |
std::ostream & | operator<< (std::ostream &os, const GUI::Network::MessageNode &item) |
Outputs a the string value of the MessageNode enum to the given output stream using a custom string representation. | |
template<typename T , typename Exception = CustomExceptions::InvalidType> | |
std::optional< T > | unCast (const std::any &classNode, const bool raiseOnError=true, const std::string customErrorMessage="") |
Casts the content of a std::any back to its original type. | |
|
inline |
Outputs a the string value of the ActiveScreen enum to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the ActiveScreen to a string and then inserts the result into the output stream.
os | The output stream to which the ActiveScreen will be written. |
item | The ActiveScreen struct value to output. |
Definition at line 156 of file OperatorRebind.hpp.
|
inline |
Outputs a boolean value to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the boolean value to a string ("true" or "false") and then inserts the result into the output stream.
os | The output stream to which the boolean value will be written. |
item | The boolean value to output. |
Definition at line 38 of file OperatorRebind.hpp.
|
inline |
Outputs a the string value of the ECSPackage_t enum to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the ECSPackage_t to a string and then inserts the result into the output stream.
os | The output stream to which the ECSPackage_t will be written. |
item | The ECSPackage_t struct value to output. |
Definition at line 207 of file OperatorRebind.hpp.
|
inline |
Outputs a the string value of the EntityActions_t enum to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the EntityActions_t to a string and then inserts the result into the output stream.
os | The output stream to which the EntityActions_t will be written. |
item | The EntityActions_t struct value to output. |
Definition at line 224 of file OperatorRebind.hpp.
|
inline |
Outputs a the string value of the EntityActionType enum to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the EntityActionType to a string and then inserts the result into the output stream.
os | The output stream to which the EntityActionType will be written. |
item | The EntityActionType enum value to output. |
Definition at line 241 of file OperatorRebind.hpp.
|
inline |
Outputs a the string value of the EntityType enum to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the EntityType to a string and then inserts the result into the output stream.
os | The output stream to which the EntityType will be written. |
item | The EntityType struct value to output. |
Definition at line 190 of file OperatorRebind.hpp.
|
inline |
Outputs a the string value of the Package_t enum to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the Package_t to a string and then inserts the result into the output stream.
os | The output stream to which the Package_t will be written. |
item | The Package_t struct value to output. |
Definition at line 173 of file OperatorRebind.hpp.
|
inline |
Outputs a the string value of the ActiveShape enum to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the ActiveShape to a string and then inserts the result into the output stream.
os | The output stream to which the ActiveShape will be written. |
item | The ActiveShape enum value to output. |
Definition at line 258 of file OperatorRebind.hpp.
|
inline |
Outputs a the string value of the MessageInfo enum to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the MessageInfo to a string and then inserts the result into the output stream.
os | The output stream to which the MessageInfo will be written. |
item | The MessageInfo value to output. |
Definition at line 292 of file OperatorRebind.hpp.
|
inline |
Outputs a the string value of the MessageNode enum to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the MessageNode to a string and then inserts the result into the output stream.
os | The output stream to which the MessageNode will be written. |
item | The MessageNode value to output. |
Definition at line 309 of file OperatorRebind.hpp.
|
inline |
Outputs a the string value of the MessageType enum to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the MessageType to a string and then inserts the result into the output stream.
os | The output stream to which the MessageType will be written. |
item | The MessageType value to output. |
Definition at line 275 of file OperatorRebind.hpp.
|
inline |
Outputs a pair of items to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the pair to a string and then inserts the result into the output stream.
T1 | The type of the first element in the pair. |
T2 | The type of the second element in the pair. |
os | The output stream to which the pair will be written. |
item | The pair of items to output. |
Definition at line 59 of file OperatorRebind.hpp.
|
inline |
Outputs a set of items to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the set to a string and then inserts the result into the output stream.
T | The type of the elements in the set. |
os | The output stream to which the set will be written. |
item | The set of items to output. |
Definition at line 119 of file OperatorRebind.hpp.
|
inline |
Outputs an unordered_map of items to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the unordered_map to a string and then inserts the result into the output stream.
T | The type of the elements in the unordered_map. |
os | The output stream to which the unordered_map will be written. |
item | The unordered_map of items to output. |
Definition at line 99 of file OperatorRebind.hpp.
|
inline |
Outputs an unordered_set of items to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the unordered_set to a string and then inserts the result into the output stream.
T | The type of the elements in the unordered_set. |
os | The output stream to which the unordered_set will be written. |
item | The unordered_set of items to output. |
Definition at line 139 of file OperatorRebind.hpp.
|
inline |
Outputs a vector of items to the given output stream using a custom string representation.
This function uses the custom Recoded::myToString
function to convert the vector to a string and then inserts the result into the output stream.
T | The type of the elements in the vector. |
os | The output stream to which the vector will be written. |
item | The vector of items to output. |
Definition at line 79 of file OperatorRebind.hpp.
std::optional< T > Utilities::unCast | ( | const std::any & | classNode, |
const bool | raiseOnError = true, | ||
const std::string | customErrorMessage = "" ) |
Casts the content of a std::any
back to its original type.
This function attempts to safely cast the value stored in a std::any
object to the specified type T
. If the casting fails due to a type mismatch, an exception of type Exception
may be thrown, or a warning may be logged based on the raiseOnError
parameter.
T | The expected type of the value contained in the std::any object. |
Exception | The type of exception to throw in case of a failure. Defaults to CustomExceptions::InvalidType . The exception must be constructible with a single string parameter, as this is the only argument passed when thrown. |
classNode | The std::any object containing the value to be cast. |
raiseOnError | Whether to throw an exception if the casting fails. Defaults to true . |
customErrorMessage | An optional custom message prepended to the error description if an exception is thrown or a warning is logged. |
std::optional
, or std::nullopt
if the casting fails and exceptions are not raised.Exception | If raiseOnError is true and:
|
raiseOnError
is false
and an error occurs, a warning is logged using PRETTY_WARNING
, and std::nullopt
is returned instead of throwing an exception.Example usage:
Definition at line 65 of file UnCast.hpp.