ACE_RMCast::Simulator Class Reference

#include <Simulator.h>

Inheritance diagram for ACE_RMCast::Simulator:

Inheritance graph
[legend]
Collaboration diagram for ACE_RMCast::Simulator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Simulator ()
virtual void send (Message_ptr m)

Private Attributes

Message_ptr hold_
Mutex mutex_

Detailed Description

Definition at line 14 of file Simulator.h.


Constructor & Destructor Documentation

ACE_RMCast::Simulator::Simulator (  ) 

Definition at line 10 of file Simulator.cpp.

References ACE_OS::srand(), and ACE_OS::time().

00011   {
00012     ACE_OS::srand ((unsigned int)ACE_OS::time (0));
00013   }


Member Function Documentation

void ACE_RMCast::Simulator::send ( Message_ptr  m  )  [virtual]

Reimplemented from ACE_RMCast::Out_Element.

Definition at line 15 of file Simulator.cpp.

References ACE_RMCast::Out_Element::out_, and ACE_RMCast::Out_Element::send().

00016   {
00017     // Note: Simulator may work in unpredictable ways mainly due
00018     // to the "reliable loopback" mechanism.
00019     //
00020     out_->send (m);
00021     return;
00022 
00023     /*int r (rand ());
00024 
00025     if ((r % 3) == 0) return;
00026 
00027     Lock l (mutex_);
00028 
00029     if (hold_.get ())
00030     {
00031       out_->send (m);
00032       out_->send (hold_);
00033     }
00034     else
00035     {
00036       hold_ = m;
00037     }*/
00038   }


Member Data Documentation

Message_ptr ACE_RMCast::Simulator::hold_ [private]

Definition at line 24 of file Simulator.h.

Mutex ACE_RMCast::Simulator::mutex_ [private]

Definition at line 25 of file Simulator.h.


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:36:30 2010 for ACE_RMCast by  doxygen 1.4.7