SimpleBroadcastObject< T > Class Template Reference

#include <BroadcastObject.h>

Inheritance diagram for SimpleBroadcastObject< T >:

BroadcastClient List of all members.

Public Member Functions

 SimpleBroadcastObject (int id, const LDObjHandle *h=0)
 ~SimpleBroadcastObject ()
get (int tag)
void publish (int tag, const T &t)

Public Attributes

const LDObjHandle * ldObjPtr

Detailed Description

template<class T>
class SimpleBroadcastObject< T >

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 21 of file BroadcastObject.h.


Constructor & Destructor Documentation

template<class T>
SimpleBroadcastObject< T >::SimpleBroadcastObject ( int  id,
const LDObjHandle *  h = 0 
) [inline]

Definition at line 27 of file BroadcastObject.h.

00027                                                             : BroadcastClient(id), ldObjPtr(h) {
00028       if ( sizeof(T) > BCASTMSGSIZE ) {
00029         NAMD_bug("SimpleBroadcastObject instantiated on class larger than BCASTMSGSIZE");
00030       }
00031     }

template<class T>
SimpleBroadcastObject< T >::~SimpleBroadcastObject (  )  [inline]

Definition at line 32 of file BroadcastObject.h.

00032 { }


Member Function Documentation

template<class T>
T SimpleBroadcastObject< T >::get ( int  tag  )  [inline]

Definition at line 34 of file BroadcastObject.h.

Referenced by Sequencer::algorithm(), Controller::algorithm(), Sequencer::berendsenPressure(), Sequencer::correctMomentum(), Sequencer::langevinPiston(), Sequencer::multigratorPressure(), Sequencer::rescaleaccelMD(), and Sequencer::traceBarrier().

00034                    {
00035       T tmp;
00036       if ( ldObjPtr ) LdbCoordinator::Object()->pauseWork(*ldObjPtr);
00037       while ( BroadcastMgr::Object()->getbuf(*this, tag, (void*)(&tmp)) < 0 ) {
00038         suspendFor(tag);
00039       }
00040       if ( ldObjPtr ) LdbCoordinator::Object()->startWork(*ldObjPtr);
00041       return tmp;
00042     }

template<class T>
void SimpleBroadcastObject< T >::publish ( int  tag,
const T &  t 
) [inline]

Definition at line 44 of file BroadcastObject.h.

Referenced by Controller::berendsenPressure(), Controller::correctMomentum(), Controller::langevinPiston1(), Controller::multigratorPressure(), Controller::rescaleaccelMD(), and Controller::resumeAfterTraceBarrier().

00044                                       {
00045       BroadcastMgr::Object()->send(*this, tag, (void*)(&t), sizeof(T));
00046     }


Member Data Documentation

template<class T>
const LDObjHandle* SimpleBroadcastObject< T >::ldObjPtr

Definition at line 25 of file BroadcastObject.h.

Referenced by SimpleBroadcastObject< Tensor >::get().


The documentation for this class was generated from the following file:
Generated on Sat Sep 23 01:17:21 2017 for NAMD by  doxygen 1.4.7