QuantLib
A free/open-source library for quantitative finance
Fully annotated sources - version 1.22
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
ObservableSettings Class Reference

global repository for run-time library settings More...

#include <ql/patterns/observable.hpp>

+ Inheritance diagram for ObservableSettings:
+ Collaboration diagram for ObservableSettings:

Public Member Functions

void disableUpdates (bool deferred=false)
 
void enableUpdates ()
 
bool updatesEnabled () const
 
bool updatesDeferred () const
 

Private Types

typedef boost::unordered_set< Observer * > set_type
 
typedef set_type::iterator iterator
 

Private Member Functions

 ObservableSettings ()=default
 
void registerDeferredObservers (const boost::unordered_set< Observer * > &observers)
 
void unregisterDeferredObserver (Observer *)
 

Private Attributes

set_type deferredObservers_
 
bool updatesEnabled_ = true
 
bool updatesDeferred_ = false
 

Friends

class Singleton< ObservableSettings >
 
class Observable
 

Additional Inherited Members

- Static Public Member Functions inherited from Singleton< ObservableSettings >
static ObservableSettingsinstance ()
 access to the unique instance More...
 
- Protected Member Functions inherited from Singleton< ObservableSettings >
 Singleton ()=default
 

Detailed Description

global repository for run-time library settings

Definition at line 48 of file observable.hpp.

Member Typedef Documentation

◆ set_type

typedef boost::unordered_set<Observer*> set_type
private

Definition at line 70 of file observable.hpp.

◆ iterator

typedef set_type::iterator iterator
private

Definition at line 71 of file observable.hpp.

Constructor & Destructor Documentation

◆ ObservableSettings()

ObservableSettings ( )
privatedefault

Member Function Documentation

◆ disableUpdates()

void disableUpdates ( bool  deferred = false)

Definition at line 52 of file observable.hpp.

◆ enableUpdates()

void enableUpdates ( )

Definition at line 28 of file observable.cpp.

◆ updatesEnabled()

bool updatesEnabled ( ) const

Definition at line 58 of file observable.hpp.

+ Here is the caller graph for this function:

◆ updatesDeferred()

bool updatesDeferred ( ) const

Definition at line 59 of file observable.hpp.

+ Here is the caller graph for this function:

◆ registerDeferredObservers()

void registerDeferredObservers ( const boost::unordered_set< Observer * > &  observers)
private

Definition at line 143 of file observable.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unregisterDeferredObserver()

void unregisterDeferredObserver ( Observer o)
private

Definition at line 150 of file observable.hpp.

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ Singleton< ObservableSettings >

friend class Singleton< ObservableSettings >
friend

Definition at line 241 of file observable.hpp.

◆ Observable

friend class Observable
friend

Definition at line 50 of file observable.hpp.

Member Data Documentation

◆ deferredObservers_

set_type deferredObservers_
private

Definition at line 72 of file observable.hpp.

◆ updatesEnabled_

bool updatesEnabled_ = true
private

Definition at line 74 of file observable.hpp.

◆ updatesDeferred_

bool updatesDeferred_ = false
private

Definition at line 74 of file observable.hpp.