Changeset 9694 for source/ariba/communication/messages
- Timestamp:
- Mar 23, 2011, 12:06:05 PM (14 years ago)
- Location:
- source/ariba/communication/messages
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/communication/messages/AribaBaseMsg.cpp
r9684 r9694 44 44 vsznDefault(AribaBaseMsg); 45 45 46 AribaBaseMsg::AribaBaseMsg( type_ _type, LinkID link ) : 47 type((uint8_t)_type), link(link){ 46 AribaBaseMsg::AribaBaseMsg( type_ _type, 47 const LinkID& localLink, const LinkID& remoteLink ) : 48 type((uint8_t)_type), 49 localLink(localLink),remoteLink(remoteLink) { 48 50 } 49 51 -
source/ariba/communication/messages/AribaBaseMsg.h
r9684 r9694 41 41 42 42 #include <string> 43 #include <stdint.h> 44 43 #include <boost/cstdint.hpp> 45 44 #include "ariba/utility/messages.h" 46 45 #include "ariba/utility/serialization.h" 47 48 46 #include "ariba/utility/types/LinkID.h" 49 47 #include "ariba/utility/types/Address.h" … … 74 72 }; 75 73 76 AribaBaseMsg( type_ type = typeData, LinkID link = LinkID::UNSPECIFIED ); 74 AribaBaseMsg( type_ type = typeData, 75 const LinkID& localLink = LinkID::UNSPECIFIED, 76 const LinkID& remoteLink = LinkID::UNSPECIFIED ); 77 77 78 virtual ~AribaBaseMsg(); 78 79 … … 83 84 } 84 85 85 const LinkID& getLink() const { 86 return link; 86 const LinkID& getLocalLink() const { 87 return localLink; 88 } 89 90 const LinkID& getRemoteLink() const { 91 return remoteLink; 87 92 } 88 93 … … 96 101 97 102 private: 98 // link message type 99 uint8_t type; 103 uint8_t type; // the link message type 100 104 101 // link identifier 102 LinkID link; 105 // remote and local link ids 106 LinkID localLink; // the local link id 107 LinkID remoteLink; // the remote link id 103 108 104 // remote and local endpoint descriptors (link reply/request only)109 // remote and local endpoint descriptors 105 110 EndpointDescriptor localDescriptor; 106 111 EndpointDescriptor remoteDescriptor; … … 110 115 111 116 sznBeginDefault( ariba::communication::AribaBaseMsg, X ) { 112 X && type && link;113 if (type == typeLinkReply || type == typeLinkRequest) {117 X && type && &localLink && &remoteLink; 118 if (type == typeLinkReply || type == typeLinkRequest) 114 119 X && localDescriptor && remoteDescriptor; 115 }116 120 X && Payload(); 117 121 } sznEnd();
Note:
See TracChangeset
for help on using the changeset viewer.