00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef Channel_h
00027 #define Channel_h
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 class ChannelAddress;
00043 class Message;
00044 class MovableObject;
00045 class Matrix;
00046 class Vector;
00047 class ID;
00048 class FEM_ObjectBroker;
00049
00050 class Channel
00051 {
00052 public:
00053 Channel ();
00054 virtual ~Channel();
00055
00056
00057 virtual char *addToProgram(void) =0;
00058 virtual int setUpConnection(void) =0;
00059 virtual int setNextAddress(const ChannelAddress &theAddress) =0;
00060 virtual ChannelAddress *getLastSendersAddress(void) =0;
00061
00062 virtual int isDatastore(void);
00063 virtual int getDbTag(void);
00064 int getTag(void);
00065
00066
00067 virtual int sendObj(int commitTag,
00068 MovableObject &theObject,
00069 ChannelAddress *theAddress =0) =0;
00070
00071 virtual int recvObj(int commitTag,
00072 MovableObject &theObject,
00073 FEM_ObjectBroker &theBroker,
00074 ChannelAddress *theAddress =0) =0;
00075
00076 virtual int sendMsg(int dbTag, int commitTag,
00077 const Message &theMessage,
00078 ChannelAddress *theAddress =0) =0;
00079
00080 virtual int recvMsg(int dbTag, int commitTag,
00081 Message &theMessage,
00082 ChannelAddress *theAddress =0) =0;
00083
00084 virtual int sendMatrix(int dbTag, int commitTag,
00085 const Matrix &theMatrix,
00086 ChannelAddress *theAddress =0) =0;
00087
00088 virtual int recvMatrix(int dbTag, int commitTag,
00089 Matrix &theMatrix,
00090 ChannelAddress *theAddress =0) =0;
00091
00092 virtual int sendVector(int dbTag, int commitTag,
00093 const Vector &theVector,
00094 ChannelAddress *theAddress =0) =0;
00095
00096 virtual int recvVector(int dbTag, int commitTag,
00097 Vector &theVector,
00098 ChannelAddress *theAddress =0) =0;
00099
00100 virtual int sendID(int dbTag, int commitTag,
00101 const ID &theID,
00102 ChannelAddress *theAddress =0) =0;
00103
00104 virtual int recvID(int dbTag, int commitTag,
00105 ID &theID,
00106 ChannelAddress *theAddress =0) =0;
00107
00108 protected:
00109
00110 private:
00111 static int numChannel;
00112 int tag;
00113 };
00114
00115 #endif