CollectProxyVectorSequence Class Reference

List of all members.

Public Member Functions

 CollectProxyVectorSequence (int nc)
CollectVectorVarMsgsubmitData (CollectVectorVarMsg *msg)

Public Attributes

ResizeArray
< CollectProxyVectorInstance * > 
data

Detailed Description

Definition at line 119 of file ParallelIOMgr.C.


Constructor & Destructor Documentation

CollectProxyVectorSequence::CollectProxyVectorSequence ( int  nc  )  [inline]

Definition at line 121 of file ParallelIOMgr.C.

00121 : numClients(nc) { ; }


Member Function Documentation

CollectVectorVarMsg* CollectProxyVectorSequence::submitData ( CollectVectorVarMsg msg  )  [inline]

Definition at line 123 of file ParallelIOMgr.C.

References ResizeArray< Elem >::add(), ResizeArray< Elem >::begin(), data, ResizeArray< Elem >::end(), CollectProxyVectorInstance::notfree(), CollectVectorVarMsg::seq, CollectProxyVectorInstance::seq, and CollectVectorVarMsg::status.

Referenced by ParallelIOMgr::receiveForces(), ParallelIOMgr::receivePositions(), and ParallelIOMgr::receiveVelocities().

00123                                                               {
00124       CollectProxyVectorInstance **c = data.begin();
00125       CollectProxyVectorInstance **c_e = data.end();
00126       for( ; c != c_e && (*c)->seq != msg->seq; ++c );
00127       if ( c == c_e ) {
00128         c = data.begin();
00129         for( ; c != c_e && (*c)->notfree(); ++c );
00130         if ( c == c_e ) {
00131           data.add(new CollectProxyVectorInstance);
00132           c = data.end() - 1;
00133         }
00134         (*c)->reset(msg->seq,msg->status,numClients);
00135       }
00136       if ( (*c)->append(msg) ) {
00137         CollectVectorVarMsg *newmsg = (*c)->buildMsg();
00138         return newmsg;
00139       } else {
00140         return 0;
00141       }
00142     }


Member Data Documentation

Definition at line 144 of file ParallelIOMgr.C.

Referenced by submitData().


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

Generated on 11 Nov 2019 for NAMD by  doxygen 1.6.1