68 #include "utility/kernel/CommandEntity.h" 78 class FEM_ObjectBroker;
95 static int numChannel;
97 std::set<int> usedDbTags;
103 inline virtual ~
Channel(
void) {}
112 virtual int setUpConnection(
void) =0;
140 template <
class inputIterator>
141 int sendObjs(
int commitTag,
const inputIterator &first,
const inputIterator &last,
ChannelAddress *theAddress=
nullptr);
142 template <
class inputIterator>
235 template <
class inputIterator>
239 for(inputIterator i= first;i!=last;i++)
241 retval=
sendObj(commitTag,*i,theAddress);
249 template <
class inputIterator>
253 for(inputIterator i= first;i!=last;i++)
255 retval=
recvObj(commitTag,*i,ob,theAddress);
virtual int sendID(int dbTag, int commitTag, const ID &theID, ChannelAddress *theAddress=nullptr)=0
Invoked to receive the data in the ID object theID to another Channel object.
Float vector abstraction.
Definition: Vector.h:94
virtual int recvMsg(int dbTag, int commitTag, Message &theMsg, ChannelAddress *theAddress=nullptr)=0
Invoked to send the data in the Message object theMsg to another Channel object.
virtual int recvMatrix(int dbTag, int commitTag, Matrix &theMatrix, ChannelAddress *theAddress=nullptr)=0
Invoked to receive the data in the Matrix object theMatrix to another Channel object.
virtual int recvVector(int dbTag, int commitTag, Vector &theVector, ChannelAddress *theAddress=nullptr)=0
Invoked to receive the data in the Vector object theVector to another Channel object.
int recvObjs(int commitTag, const inputIterator &first, const inputIterator &last, FEM_ObjectBroker &, ChannelAddress *theAddress=nullptr)
Receive an object sequence.
Definition: Channel.h:250
virtual int sendMsg(int dbTag, int commitTag, const Message &theMsg, ChannelAddress *theAddress=nullptr)=0
A method invoked to send the data in the Message object theMsg to another Channel object...
int getTag(void) const
Return the object tag.
Definition: Channel.cpp:126
Object that can move between processes.
Definition: MovableObject.h:100
void clearDbTags(void)
Reset used database tags set.
Definition: Channel.cpp:122
virtual int recvObj(int commitTag, MovableObject &theObj, FEM_ObjectBroker &theBroker, ChannelAddress *theAddress=nullptr)=0
To receive the object theObj with the commit tag commitTag from a remote Channel whose address is giv...
virtual int sendObj(int commitTag, MovableObject &theObj, ChannelAddress *theAddress=nullptr)=0
To send the object theObj and the commit tag commitTag to a remote Channel whose address is given by ...
FEM_ObjectBroker is is an object broker class for the finite element method.
Definition: FEM_ObjectBroker.h:151
Vector of integers.
Definition: ID.h:95
int sendMovable(int commitTag, MovableObject &)
Send theObject.
Definition: Channel.cpp:130
virtual int recvID(int dbTag, int commitTag, ID &theID, ChannelAddress *theAddress=nullptr)=0
Invoked to receive the data in the ID object theID to another Channel object.
const ID & getUsedTags(void) const
Return the list of dbTags already used.
Definition: Channel.cpp:95
bool checkDbTag(const int &dbTag)
Check if a dbTag is already used.
Definition: Channel.cpp:107
virtual int sendMatrix(int dbTag, int commitTag, const Matrix &theMatrix, ChannelAddress *theAddress=nullptr)=0
Invoked to receive the data in the Matrix object theMatrix to another Channel object.
virtual int setNextAddress(const ChannelAddress &theAddress)=0
A method invoked to set specify the next address that the next messages to be sent if {sendMessage()}...
int receiveMovable(int commitTag, MovableObject &, FEM_ObjectBroker &)
Receive theObject.
Definition: Channel.cpp:137
Objet that can execute python scripts.
Definition: CommandEntity.h:40
Channel is an abstract base class which defines the channel interface.
Definition: Channel.h:92
int sendObjs(int commitTag, const inputIterator &first, const inputIterator &last, ChannelAddress *theAddress=nullptr)
Send the objects on interval [first,last).
Definition: Channel.h:236
Message between processes.
Definition: Message.h:77
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
virtual int sendVector(int dbTag, int commitTag, const Vector &theVector, ChannelAddress *theAddress=nullptr)=0
Invoked to receive the data in the Vector object theVector to another Channel object.
Base class for classes that encapsulate channel addresses.
Definition: ChannelAddress.h:78
Matrix of floats.
Definition: Matrix.h:111
virtual int getDbTag(void) const
Return next available database tag.
Definition: Channel.cpp:91
virtual bool isDatastore(void) const
Return true if channel is a data store.
Definition: Channel.cpp:81
Channel(CommandEntity *owr=nullptr)
Constructor.
Definition: Channel.cpp:73
virtual std::string addToProgram(void)=0
When creating remote actors the channels created in the actor space need to know how to contact the s...