[ Lit Window Library at SourceForge ] [ Lit Window Productions Homepage ] [ wxWidgets Tips&Tricks ] [ wxVisualSetup ]

Public Member Functions | |
| void | add (rule_base *r) |
| void | add_rule (rule_base *new_rule) |
| Add a rule to the solver. | |
| void | assign_value (const accessor &target, const tstring &value) |
| void | assign_value (value_assign_base *new_value) |
| Set a value for a target of the solver and mark all dependent rules as unsolved. | |
| void | clear () |
| Clear the solver. Erase all rules, values etc... | |
| constraint_solver () | |
| void | disable () |
| disable the solver. Changes made to variables are not propagated. | |
| void | enable () |
| enable the solver. Changes made to variables will be propagated | |
| void | enable_undo (bool do_enable=true) |
| Set the undo mode for the solver. | |
| void | execute_all_immediate () |
| Execute all rules once, beginning with the first rule until the last rule. | |
| symbol_table_interface * | get_symbol_table () const |
| bool | is_enabled () const |
| return the status of the solver. | |
| bool | is_undo () const |
| void | mark_value_changed (const const_accessor &target, bool recursive) |
| void | operator+= (rule_base *r) |
| constraint_solver & | operator<< (rule_base *r) |
| void | reset () |
| Reset all calculated values, but leave rules intact. | |
| void | set_symbol_table (symbol_table_interface *new_table) |
| void | solve () |
| Solve the rule set. | |
| virtual | ~constraint_solver () |
Protected Member Functions | |
| void | undo_assign_values () |
| undo all assignments, restore previous values | |
dependencies | |
The following members handle dependencies. They return a list of rules that must be reevaluated when the target 'object_id' changes.
Add those rules to the unsolved list that have target as an argument. | |
| void | unsolve_depencencies_of (const const_accessor &target, bool recursive) |
Protected Attributes | |
| int | m_disabled_count |
| number of calls to 'disable()'. solver is disabled if count>0. | |
| rules_t | m_rules |
| rule_base * | m_suppress_mirror_rule |
| This member holds the mirror rule for the currently evaluated rule. | |
| symbol_table_interface * | m_symbol_table |
| bool | m_undo_enabled |
| if true, solve() will undo all changes when an error occurs. | |
| values_t | m_undo_values |
| If undo is enabled, store the undo values here. | |
| rules_t | m_unsolved_dependencies |
| a list of rules that will be evaluated when calling 'solve'. | |
| values_changed_t * | m_values_changed |
| Record all values that have changed to detect circular rules. | |
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright 2004, Hajo Kirchhoff, Lit Window Productions