cgv
Loading...
Searching...
No Matches
cgv::signal::bool_combiner Class Reference

base class for signals that combine the boolean result of the attached functors with boolean and/or operations More...

#include <bool_combiner.h>

Public Member Functions

 bool_combiner (const char *opt)
 construct from option string.
 
bool get_neutral_value () const
 return the neutral bool value with which one can initialize the result variable
 
void set_options (const char *opt)
 set a different option string
 
bool is_combination_with_and () const
 return whether combination is done with the boolean and operation
 
bool is_evaluation_short_circuit () const
 return whether to perform short-circuit evaluation
 

Protected Member Functions

bool combine_result (bool new_value, bool &value) const
 base class for signals that combine the boolean result of the attached functors with boolean and/or operations
 

Protected Attributes

bool combine_with_and
 
bool short_circuit
 

Detailed Description

base class for signals that combine the boolean result of the attached functors with boolean and/or operations

Definition at line 9 of file bool_combiner.h.

Constructor & Destructor Documentation

◆ bool_combiner()

cgv::signal::bool_combiner::bool_combiner ( const char *  opt)

construct from option string.

The option string can be composed of the following characters:

  • '&' ... combine with logical and
  • '|' ... combine with logical or
  • '*' ... short-circuit evaluation of boolean expression
  • '+' ... full evaluation

Definition at line 29 of file bool_combiner.cxx.

References set_options().

Member Function Documentation

◆ combine_result()

bool cgv::signal::bool_combiner::combine_result ( bool  new_value,
bool &  value 
) const
protected

base class for signals that combine the boolean result of the attached functors with boolean and/or operations

Definition at line 19 of file bool_combiner.cxx.

◆ get_neutral_value()

bool cgv::signal::bool_combiner::get_neutral_value ( ) const

return the neutral bool value with which one can initialize the result variable

Definition at line 37 of file bool_combiner.cxx.

◆ is_combination_with_and()

bool cgv::signal::bool_combiner::is_combination_with_and ( ) const

return whether combination is done with the boolean and operation

Definition at line 59 of file bool_combiner.cxx.

◆ is_evaluation_short_circuit()

bool cgv::signal::bool_combiner::is_evaluation_short_circuit ( ) const

return whether to perform short-circuit evaluation

Definition at line 64 of file bool_combiner.cxx.

◆ set_options()

void cgv::signal::bool_combiner::set_options ( const char *  opt)

set a different option string

Definition at line 44 of file bool_combiner.cxx.

Referenced by bool_combiner().

Member Data Documentation

◆ combine_with_and

bool cgv::signal::bool_combiner::combine_with_and
protected

Definition at line 13 of file bool_combiner.h.

◆ short_circuit

bool cgv::signal::bool_combiner::short_circuit
protected

Definition at line 14 of file bool_combiner.h.


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