ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
Subject Class Reference

#include <ObsPattern_Sub.h>

Inheritance diagram for Subject:
Inheritance graph
[legend]
Collaboration diagram for Subject:
Collaboration graph
[legend]

Public Member Functions

virtual ~Subject ()
 
virtual void attach (Observer *obs)
 function for subject to register More...
 
virtual void detach (Observer *obs)
 function to detach, unregister, not used More...
 

Protected Member Functions

 Subject ()
 constructor is protected More...
 
void notify ()
 notify a message to all registered observer More...
 
void notify (std::vector< std::string > &message)
 notify with one parameters More...
 

Private Member Functions

 Subject (const Subject &)
 make empty copy contructor More...
 
Subjectoperator= (const Subject &)
 

Private Attributes

std::vector< Observer * > vec_observer
 vector of registered observer More...
 

Detailed Description

Definition at line 30 of file ObsPattern_Sub.h.

Constructor & Destructor Documentation

virtual Subject::~Subject ( )
inlinevirtual

Definition at line 33 of file ObsPattern_Sub.h.

Subject::Subject ( )
inlineprotected

constructor is protected

Definition at line 47 of file ObsPattern_Sub.h.

Subject::Subject ( const Subject )
private

make empty copy contructor

Member Function Documentation

virtual void Subject::attach ( Observer obs)
inlinevirtual

function for subject to register

Definition at line 36 of file ObsPattern_Sub.h.

References vec_observer.

Referenced by GUIMainController::GUIMainController().

Here is the caller graph for this function:

virtual void Subject::detach ( Observer obs)
inlinevirtual

function to detach, unregister, not used

Definition at line 40 of file ObsPattern_Sub.h.

References vec_observer.

void Subject::notify ( )
protected

notify a message to all registered observer

Definition at line 12 of file ObsPattern_Sub.cpp.

References vec_observer.

Referenced by SMSubject::Updated().

Here is the caller graph for this function:

void Subject::notify ( std::vector< std::string > &  message)
protected

notify with one parameters

Definition at line 24 of file ObsPattern_Sub.cpp.

References vec_observer.

Subject& Subject::operator= ( const Subject )
private

Field Documentation

std::vector<Observer *> Subject::vec_observer
private

vector of registered observer

Definition at line 55 of file ObsPattern_Sub.h.

Referenced by attach(), detach(), and notify().


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