SimulationCraft
SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm).
expr_t Struct Referenceabstract

Action expression. More...

#include <expressions.hpp>

Inheritance diagram for expr_t:
const_expr_t fn_expr_t< F > item_effect_base_expr_t item_is_expr_t ref_expr_t< T > target_wrapper_expr_t item_effect_expr_t item_ready_expr_t item_buff_exists_expr_t item_buff_expr_t item_cooldown_exists_expr_t item_cooldown_expr_t item_has_use_buff_expr_t

Public Member Functions

const char * name () const
 
int id () const
 
double eval ()
 
bool success ()
 
bool always_true ()
 
bool always_false ()
 
virtual double evaluate ()=0
 
virtual bool is_constant ()
 
virtual bool is_analyze_expression ()
 

Static Public Member Functions

static double coerce (timespan_t t)
 
template<typename T >
static double coerce (T t)
 
static std::unique_ptr< expr_tparse (action_t *, util::string_view expr_str, bool optimize=false)
 
template<class T >
static std::unique_ptr< expr_tcreate_constant (util::string_view name, T value)
 
static void optimize_expression (std::unique_ptr< expr_t > &expression, bool analyze_further=false, int spacing=0)
 
static void optimize_expression (std::unique_ptr< expr_t > &expression, sim_t &sim)
 

Public Attributes

expression::token_e op_
 

Protected Member Functions

 expr_t (util::string_view name, expression::token_e op=expression::TOK_UNKNOWN)
 

Detailed Description

Action expression.