47 #ifndef _MIRA_CHANNELCONTENTCHANGE_H_ 48 #define _MIRA_CHANNELCONTENTCHANGE_H_ 94 const std::string& channelID,
104 template<
typename Class>
106 const std::string& channelID,
109 return subscribe(authority, channelID, boost::bind(f, obj, _1));
115 if (!mLast || *mLast == value->value())
117 mLast = value->value();
121 boost::function<void (ChannelRead<T>)> mFunction;
122 boost::optional<T> mLast;
An exception that occurs whenever a channel has no data.
Definition: Channel.h:88
Class that can be registered as a filter when subscribing to channels to only get a callback when the...
Definition: ChannelContentChange.h:83
void callback(ChannelRead< T > value)
Called when channel has new data.
Definition: ChannelContentChange.h:113
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Class object which supports some kind of class reflection.
Definition: Class.h:97
An object that allows read access to data of a channel.
Definition: ChannelReadWrite.h:494
Classes for automatic locking/unlocking when reading and writing to channels.
Authorities act as a facade to the framework.
Definition: Authority.h:94
Channel< T > subscribe(Authority &authority, const std::string &channelID, boost::function< void(ChannelRead< T >)> fn)
Call this instead of Authority::subscribe()
Definition: ChannelContentChange.h:93
Channel< T > subscribe(Authority &authority, const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj)
Same as above but with a function and object pointer.
Definition: ChannelContentChange.h:105
The framework that holds all manager classes and provides startup and shutdown of all framework relat...
Channel< T > subscribe(const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
Subscribes authority to a given channel.