Class template timed_generator

boost::signals::timed_generator — Creates its own thread and periodically sends a signal with the stored value.

Synopsis

template<typename Signature, typename OutSignal = SIGNAL_NETWORK_DEFAULT_OUT, 
         typename SignalArgs = typename default_signal_args<Signature>::type> 
class timed_generator :
  public boost::signals::storage< Signature, OutSignal, SignalArgs >
{
public:
  // construct/copy/destruct
  timed_generator();
  template<typename T> timed_generator(const T &);
  ~timed_generator();

  // public member functions
  void enable(double, unsigned = 0) ;
  void disable() ;
  void join() ;
  void wait_until_completed() ;
  boost::mutex & completion_mutex() ;
  boost::condition & completion_condition() ;
  bool completed() ;

  // private member functions
  void thread_function() ;
};

Description

timed_generator public construct/copy/destruct

  1. timed_generator();
  2. template<typename T> timed_generator(const T & t);
  3. ~timed_generator();

timed_generator public member functions

  1. void enable(double interval, unsigned signal_count = 0) ;

    Parameters:
    interval

    Sets the time interval (in seconds) at which the signal is sent.

    signal_count

    The signal will be sent signal_count times, or indefinitelly if signal_count==0.

  2. void disable() ;
  3. void join() ;
  4. void wait_until_completed() ;

    If the timed_generator was enabled with a signal count, this function will wait until the specified number of signals was emitted.

  5. boost::mutex & completion_mutex() ;
  6. boost::condition & completion_condition() ;
  7. bool completed() ;

timed_generator private member functions

  1. void thread_function() ;