www.cemf.ir
subscriber Class Reference
+ Inheritance diagram for subscriber:

Public Member Functions

 subscriber (const word &name)
 
 subscriber (const subscriber &)
 Copy constructor, only copies the name, not the list. More...
 
 subscriber (subscriber &&)
 Move constructor, moves the name and the list, also change the subriber of the object in the list
More...
 
subscriberoperator= (const subscriber &)
 Copy assignemnt, only assign the name, do not assign the list. More...
 
subscriberoperator= (subscriber &&)
 Move assignment, move assign name and list, also change the subcriber of the object in the list
More...
 
virtual ~subscriber ()
 
virtual bool subscribe (message msg, observer *obsevr) const
 
virtual bool unsubscribe (observer *obsevr) const
 
bool notify (uint32 iter, real t, real dt, const message msg, const anyList &varList)
 
bool notify (const timeInfo &ti, const message msg, const anyList &varList)
 
const wordsubscriberName () const
 

Private Attributes

std::array< List< observer * >, message::numEvents()> observerList_
 
word subName_
 

Detailed Description

Definition at line 37 of file subscriber.hpp.

Constructor & Destructor Documentation

◆ subscriber() [1/3]

subscriber ( const word name)
inline

Definition at line 48 of file subscriber.hpp.

◆ subscriber() [2/3]

subscriber ( const subscriber src)

Copy constructor, only copies the name, not the list.

Definition at line 27 of file subscriber.cpp.

◆ subscriber() [3/3]

subscriber ( subscriber &&  src)

Move constructor, moves the name and the list, also change the subriber of the object in the list

Definition at line 33 of file subscriber.cpp.

References subscriber::observerList_.

◆ ~subscriber()

~subscriber ( )
virtual

Definition at line 70 of file subscriber.cpp.

Member Function Documentation

◆ operator=() [1/2]

pFlow::subscriber & operator= ( const subscriber rhs)

Copy assignemnt, only assign the name, do not assign the list.

Definition at line 48 of file subscriber.cpp.

References subscriber::subName_.

◆ operator=() [2/2]

pFlow::subscriber & operator= ( subscriber &&  rhs)

Move assignment, move assign name and list, also change the subcriber of the object in the list

Definition at line 54 of file subscriber.cpp.

◆ subscribe()

bool subscribe ( message  msg,
observer obsevr 
) const
virtual

Definition at line 85 of file subscriber.cpp.

References message::equivalentTo(), and message::size().

Referenced by observer::addToSubscriber().

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

◆ unsubscribe()

bool unsubscribe ( observer obsevr) const
virtual

Definition at line 107 of file subscriber.cpp.

References pFlow::find().

+ Here is the call graph for this function:

◆ notify() [1/2]

bool notify ( uint32  iter,
real  t,
real  dt,
const message  msg,
const anyList varList 
)

Definition at line 126 of file subscriber.cpp.

References message::equivalentTo(), and message::size().

+ Here is the call graph for this function:

◆ notify() [2/2]

bool notify ( const timeInfo ti,
const message  msg,
const anyList varList 
)

Definition at line 156 of file subscriber.cpp.

References timeInfo::dt(), timeInfo::iter(), and timeInfo::t().

+ Here is the call graph for this function:

◆ subscriberName()

const word& subscriberName ( ) const
inline

Definition at line 85 of file subscriber.hpp.

References subscriber::subName_.

Member Data Documentation

◆ observerList_

std::array<List<observer*>,message::numEvents()> observerList_
mutableprivate

Definition at line 42 of file subscriber.hpp.

Referenced by subscriber::subscriber().

◆ subName_

word subName_
private

Definition at line 44 of file subscriber.hpp.

Referenced by subscriber::operator=(), and subscriber::subscriberName().


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