Choreonoid  1.8
Public Types | Public Member Functions | Friends | List of all members
cnoid::LazyCaller Class Reference

#include <LazyCaller.h>

Inheritance diagram for cnoid::LazyCaller:
cnoid::LazySignalBase cnoid::LazySignal< SignalType > cnoid::LazySignal< cnoid::Signal< void()> >

Public Types

enum  Priority {
  HighPriority = 0, NormalPriority, LowPriority, MinimumPriority,
  PRIORITY_HIGH = HighPriority, PRIORITY_NORMAL = NormalPriority, PRIORITY_LOW = LowPriority
}
 
typedef void result_type
 

Public Member Functions

 LazyCaller ()
 
 LazyCaller (const std::function< void(void)> &function, int priority=HighPriority)
 
 LazyCaller (const LazyCaller &org)
 
virtual ~LazyCaller ()
 
void setFunction (const std::function< void(void)> &function)
 
void setPriority (int priority)
 
void setConservative (bool on)
 
bool isPending () const
 
void flush ()
 
void operator() ()
 
void cancel ()
 

Friends

class LazyCallerImpl
 

Detailed Description

Note
This is not thread safe

Member Typedef Documentation

◆ result_type

Member Enumeration Documentation

◆ Priority

Enumerator
HighPriority 
NormalPriority 
LowPriority 
MinimumPriority 
PRIORITY_HIGH 
PRIORITY_NORMAL 
PRIORITY_LOW 

Constructor & Destructor Documentation

◆ LazyCaller() [1/3]

LazyCaller::LazyCaller ( )

◆ LazyCaller() [2/3]

LazyCaller::LazyCaller ( const std::function< void(void)> &  function,
int  priority = HighPriority 
)

◆ LazyCaller() [3/3]

LazyCaller::LazyCaller ( const LazyCaller org)

◆ ~LazyCaller()

LazyCaller::~LazyCaller ( )
virtual

Member Function Documentation

◆ cancel()

void LazyCaller::cancel ( )

◆ flush()

void LazyCaller::flush ( )

◆ isPending()

bool cnoid::LazyCaller::isPending ( ) const
inline

◆ operator()()

void cnoid::LazyCaller::operator() ( )
inline

Multiple requests before the actual function call is summarized into a single call

◆ setConservative()

void LazyCaller::setConservative ( bool  on)

The function is called once even if the lazy call is requested many times before the function is actually called. If the conservative mode is on, a function call request is ignored if the function previously requested to call is being executing.

◆ setFunction()

void LazyCaller::setFunction ( const std::function< void(void)> &  function)

◆ setPriority()

void LazyCaller::setPriority ( int  priority)

Friends And Related Function Documentation

◆ LazyCallerImpl

friend class LazyCallerImpl
friend

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