Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Static Public Member Functions | Private Member Functions | List of all members
Olympe::OperatorRegistry Class Reference

Static registry of math and comparison operator strings. More...

#include <OperatorRegistry.h>

Static Public Member Functions

static const std::vector< std::string > & GetMathOperators ()
 Returns the list of supported math operator symbols.
 
static const std::vector< std::string > & GetComparisonOperators ()
 Returns the list of supported comparison operator symbols.
 
static bool IsValidMathOperator (const std::string &op)
 Returns true if the given symbol is a valid math operator.
 
static bool IsValidComparisonOperator (const std::string &op)
 Returns true if the given symbol is a valid comparison operator.
 
static std::string GetDisplayName (const std::string &op)
 Returns a human-readable display name for an operator.
 

Private Member Functions

 OperatorRegistry ()=delete
 

Detailed Description

Static registry of math and comparison operator strings.

All methods are static — no instance creation required.

Definition at line 29 of file OperatorRegistry.h.

Constructor & Destructor Documentation

◆ OperatorRegistry()

Olympe::OperatorRegistry::OperatorRegistry ( )
privatedelete

Member Function Documentation

◆ GetComparisonOperators()

const std::vector< std::string > & Olympe::OperatorRegistry::GetComparisonOperators ( )
static

Returns the list of supported comparison operator symbols.

Returns
Vector of strings: {"==", "!=", "<", "<=", ">", ">="}

Definition at line 32 of file OperatorRegistry.cpp.

References Olympe::s_comparisonOperators.

◆ GetDisplayName()

std::string Olympe::OperatorRegistry::GetDisplayName ( const std::string &  op)
static

Returns a human-readable display name for an operator.

Examples: "+" -> "Add (+)", "==" -> "Equal (==)" Falls back to the operator symbol itself if not found.

Parameters
opOperator symbol.
Returns
Display name string.

Definition at line 57 of file OperatorRegistry.cpp.

◆ GetMathOperators()

const std::vector< std::string > & Olympe::OperatorRegistry::GetMathOperators ( )
static

Returns the list of supported math operator symbols.

Returns
Vector of strings: {"+", "-", "*", "/", "%"}

Definition at line 27 of file OperatorRegistry.cpp.

References Olympe::s_mathOperators.

◆ IsValidComparisonOperator()

bool Olympe::OperatorRegistry::IsValidComparisonOperator ( const std::string &  op)
static

Returns true if the given symbol is a valid comparison operator.

Parameters
opOperator symbol to check.

Definition at line 47 of file OperatorRegistry.cpp.

References GetComponentTypeID_Static(), and Olympe::s_comparisonOperators.

+ Here is the call graph for this function:

◆ IsValidMathOperator()

bool Olympe::OperatorRegistry::IsValidMathOperator ( const std::string &  op)
static

Returns true if the given symbol is a valid math operator.

Parameters
opOperator symbol to check.

Definition at line 37 of file OperatorRegistry.cpp.

References GetComponentTypeID_Static(), and Olympe::s_mathOperators.

Referenced by Olympe::VSGraphVerifier::CheckMathOperators().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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