The Battle for Wesnoth  1.15.3+dev
Public Member Functions | Private Attributes | List of all members
unit_formula_manager Class Reference

#include <formula_manager.hpp>

Public Member Functions

 unit_formula_manager ()
 
 unit_formula_manager (const unit_formula_manager &o)
 
const wfl::map_formula_callable_ptrformula_vars () const
 
void add_formula_var (std::string str, wfl::variant var)
 
bool has_formula () const
 
bool has_loop_formula () const
 
bool has_priority_formula () const
 
const std::string & get_formula () const
 
const std::string & get_loop_formula () const
 
const std::string & get_priority_formula () const
 
void read (const config &ai)
 
void write (config &cfg)
 

Private Attributes

std::string unit_formula_
 
std::string unit_loop_formula_
 
std::string unit_priority_formula_
 
wfl::map_formula_callable_ptr formula_vars_
 

Detailed Description

Definition at line 24 of file formula_manager.hpp.

Constructor & Destructor Documentation

◆ unit_formula_manager() [1/2]

unit_formula_manager::unit_formula_manager ( )
inline

Definition at line 26 of file formula_manager.hpp.

◆ unit_formula_manager() [2/2]

unit_formula_manager::unit_formula_manager ( const unit_formula_manager o)
inline

Definition at line 27 of file formula_manager.hpp.

Member Function Documentation

◆ add_formula_var()

void unit_formula_manager::add_formula_var ( std::string  str,
wfl::variant  var 
)

Definition at line 23 of file formula_manager.cpp.

References formula_vars_.

Referenced by formula_vars().

◆ formula_vars()

const wfl::map_formula_callable_ptr& unit_formula_manager::formula_vars ( ) const
inline

◆ get_formula()

const std::string& unit_formula_manager::get_formula ( ) const
inline

Definition at line 39 of file formula_manager.hpp.

References unit_formula_.

◆ get_loop_formula()

const std::string& unit_formula_manager::get_loop_formula ( ) const
inline

Definition at line 40 of file formula_manager.hpp.

References unit_loop_formula_.

◆ get_priority_formula()

const std::string& unit_formula_manager::get_priority_formula ( ) const
inline

Definition at line 41 of file formula_manager.hpp.

References read(), unit_priority_formula_, and write().

◆ has_formula()

bool unit_formula_manager::has_formula ( ) const
inline

Definition at line 36 of file formula_manager.hpp.

References unit_formula_.

Referenced by write().

◆ has_loop_formula()

bool unit_formula_manager::has_loop_formula ( ) const
inline

Definition at line 37 of file formula_manager.hpp.

References unit_loop_formula_.

Referenced by write().

◆ has_priority_formula()

bool unit_formula_manager::has_priority_formula ( ) const
inline

Definition at line 38 of file formula_manager.hpp.

References unit_priority_formula_.

Referenced by write().

◆ read()

void unit_formula_manager::read ( const config ai)

◆ write()

void unit_formula_manager::write ( config cfg)

Member Data Documentation

◆ formula_vars_

wfl::map_formula_callable_ptr unit_formula_manager::formula_vars_
private

Definition at line 50 of file formula_manager.hpp.

Referenced by add_formula_var(), formula_vars(), read(), and write().

◆ unit_formula_

std::string unit_formula_manager::unit_formula_
private

Definition at line 47 of file formula_manager.hpp.

Referenced by get_formula(), has_formula(), read(), and write().

◆ unit_loop_formula_

std::string unit_formula_manager::unit_loop_formula_
private

Definition at line 48 of file formula_manager.hpp.

Referenced by get_loop_formula(), has_loop_formula(), read(), and write().

◆ unit_priority_formula_

std::string unit_formula_manager::unit_priority_formula_
private

Definition at line 49 of file formula_manager.hpp.

Referenced by get_priority_formula(), has_priority_formula(), read(), and write().


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