30 #ifndef MovableContainer_h 31 #define MovableContainer_h 33 #include "utility/actor/actor/MovableObject.h" 45 typedef typename C::iterator iterator;
46 typedef typename C::const_iterator const_iterator;
47 typedef typename C::reference reference;
48 typedef typename C::const_reference const_reference;
82 const size_t sz= contenedor.size();
91 for(const_iterator i= contenedor.begin();i!=contenedor.end();i++)
95 std::cerr <<
"MovableContainer::sendSelf() - failed to send ID.\n";
105 contenedor.resize(sz);
111 for(iterator i= contenedor.begin();i!=contenedor.end();i++)
112 res+= this->receiveItem(*i,cp,dbTags,
CommMetaData(loc++));
127 std::cerr <<
"MovableContainer::sendSelf() - failed to send data\n";
140 std::cerr <<
"MovableContainer::recvSelf - failed to receive ids.\n";
145 std::cerr <<
"MovableContainer::recvSelf - failed to receive data.\n";
virtual int sendSelf(CommParameters &)
Sends deque through the channel being passed as parameter.
Definition: MovableContainer.h:118
void setDbTag(int dbTag)
Asigna el tag para la database.
Definition: MovableObject.cpp:104
int send(DbTagData &, CommParameters &, const CommMetaData &) const
Sends the object.
Definition: DbTagData.cc:102
void setDbTagDataPos(const size_t &i, const int &v)
Sets the integer in the position being passed as parameter.
Definition: DbTagData.cc:77
int getDbTag(void) const
Returns the tag para la database.
Definition: MovableObject.cpp:92
int sendData(CommParameters &)
Send data through the channel being passed as parameter.
Definition: MovableContainer.h:80
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
virtual int recvSelf(const CommParameters &)
Recibe el deque through the channel being passed as parameter.
Definition: MovableContainer.h:133
int receiveIdData(DbTagData &, const int &) const
Recibe el miembro data through the channel being passed as parameter.
Definition: CommParameters.cc:396
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: MovableContainer.h:72
int sendIdData(const DbTagData &, const int &)
Sends miembro data through the channel being passed as parameter.
Definition: CommParameters.cc:392
Object that can move between processes.
Definition: MovableObject.h:91
const int & getDbTagDataPos(const size_t &i) const
Returns the integer in the position being passed as parameter.
Definition: DbTagData.cc:58
Container that can move between processes.
Definition: MovableContainer.h:42
MovableContainer(C &)
Constructor.
Definition: MovableContainer.h:65
int receive(DbTagData &, const CommParameters &, const CommMetaData &)
Recibe el objeto.
Definition: DbTagData.cc:106
void inicComm(const int &dataSize) const
Initializes communication.
Definition: DistributedBase.cc:57
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
int recvData(const CommParameters &)
Receive data through the channel being passed as parameter.
Definition: MovableContainer.h:101