#include <observable.h>

Observable Class that allows to add subscribers to observables.
| DELEGATE | Delegate of the observable class defined in the MAXON_OBSERVABLE macro. Usually "Delegate" is appended to the observable name, e.g. ObservableMachineStateChangedDelegate. | 
Public Member Functions | |
| template<typename FN > | |
| Result< FunctionBaseRef > | AddObserver (ObserverObjectInterface *observer, FN &&fn) const | 
| template<typename FN > | |
| Result< FunctionBaseRef > | AddObserver (ObserverObjectInterface *observer, FN &&fn, const JobQueueRef &queue) const | 
| template<typename FN > | |
| Result< FunctionBaseRef > | AddObserver (FN &&fn) const | 
| template<typename FN , typename = typename std::enable_if<!std::is_convertible<typename std::decay<FN>::type, ObserverObjectInterface*>::value>::type> | |
| Result< FunctionBaseRef > | AddObserver (FN &&fn, const JobQueueRef &queue) const | 
Static Public Member Functions | |
| static ObservableRef< DELEGATE > | NullValue () | 
| Result<FunctionBaseRef> AddObserver | ( | ObserverObjectInterface * | observer, | 
| FN && | fn | ||
| ) | const | 
Adds a notification lambda as a subscriber to a observable.
| [in] | observer | Object to connect with the observable. This can be nullptr. | 
| [in] | fn | Lambda function (or object with Handle* method) that should be called when the observable is fired. | 
| Result<FunctionBaseRef> AddObserver | ( | ObserverObjectInterface * | observer, | 
| FN && | fn, | ||
| const JobQueueRef & | queue | ||
| ) | const | 
Adds a notification lambda as a subscriber to a observable.
| [in] | observer | Object to connect with the observable. This can be nullptr. | 
| [in] | fn | Lambda function (or object with Handle* method) that should be called when the observable is fired. | 
| [in] | queue | Queue in which the notification should be send. queuing is only possible if the observable has no return value. | 
| Result<FunctionBaseRef> AddObserver | ( | FN && | fn | ) | const | 
Adds a notification lambda as a subscriber to a observable.
| [in] | fn | Lambda function (or object with Handle* method) that should be called when the observable is fired. | 
| Result<FunctionBaseRef> AddObserver | ( | FN && | fn, | 
| const JobQueueRef & | queue | ||
| ) | const | 
Adds a notification lambda as a subscriber to a observable.
| [in] | fn | Lambda function (or object with Handle* method) that should be called when the observable is fired. | 
| [in] | queue | Queue in which the notification should be send. queuing is only possible if the observable has no return value. | 
      
  | 
  static | 
Helper function for data type registration.