Base ObserverContainer and definition of Observers.
Synopsis
Declared in <folly/ObserverContainer.h>
template<
typename ObserverInterface,
typename Observed,
typename ContainerPolicy>
class ObserverContainerBase;
Types
Name |
Description |
Helper class for observers that attach to single object / container. |
|
Observer interface. |
|
Observer base interface. |
|
EventSet is used to keep track of the observer events that are enabled. |
Type Aliases
Name |
Description |
Enum of events that observers can subscribe to. |
|
Integer type underlying EventEnum. |
|
Observer interface type. |
|
Type of the observed object. |
|
Container policy type. |
Member Functions
Name |
Description |
|
Destroy the container base. |
Adds an observer to the container. |
|
Get a list of observers in the container of type T. |
|
|
Returns the object associated with the container (e.g., observed object). |
Get all observers. |
|
Returns if any observer in the container is subscribed to a given event. |
|
Get number of observers in container. |
|
Removes an observer from the container. |
Protected Member Functions
Name |
Description |
|
Return the underlying observer store. |
|
Return the underlying observer store, const overload. |
Invoke an interface method on each subscribed observer. |
Derived Classes
Name |
Description |
Policy‐based implementation of ObserverContainerBase. |
Created with MrDocs