- Timestamp:
- 05/12/20 11:52:13 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/object_template_impl.hpp
r1869 r1875 216 216 217 217 template<typename T> 218 void CObjectTemplate<T>::sendAllAttributesToServer(CContextClient* client )218 void CObjectTemplate<T>::sendAllAttributesToServer(CContextClient* client, const string& objectId) 219 219 { 220 220 CAttributeMap& attrMap = *this; … … 222 222 for (; it != itE; ++it) 223 223 { 224 if (it->second->doSend() && !(it->second)->isEmpty()) sendAttributToServer(*(it->second), client );224 if (it->second->doSend() && !(it->second)->isEmpty()) sendAttributToServer(*(it->second), client, objectId); 225 225 } 226 226 } 227 227 228 228 template <class T> 229 void CObjectTemplate<T>::sendAttributToServer(const string& id, CContextClient* client )229 void CObjectTemplate<T>::sendAttributToServer(const string& id, CContextClient* client, const string& objectId ) 230 230 { 231 231 CAttributeMap & attrMap = *this; … … 235 235 236 236 template <class T> 237 void CObjectTemplate<T>::sendAttributToServer(CAttribute& attr, CContextClient* client )237 void CObjectTemplate<T>::sendAttributToServer(CAttribute& attr, CContextClient* client, const string& objectId) 238 238 { 239 239 CEventClient event(getType(),EVENT_ID_SEND_ATTRIBUTE); … … 241 241 { 242 242 CMessage msg; 243 msg<<this->getId(); 243 if (objectId.empty()) msg << this->getId(); 244 else msg << objectId; 244 245 msg << attr.getName(); 245 246 msg << attr; … … 254 255 /* specialisation for context, because context Id on client is not the same on server, and no need to transfer context Id */ 255 256 template <> 256 void CObjectTemplate<CContext>::sendAttributToServer(CAttribute& attr, CContextClient* client )257 void CObjectTemplate<CContext>::sendAttributToServer(CAttribute& attr, CContextClient* client, const string& objectId) 257 258 { 258 259 CEventClient event(getType(),EVENT_ID_SEND_ATTRIBUTE); … … 278 279 279 280 template<class T> 280 void CObjectTemplate<T>::sendAddItem(const StdString& id, int itemType, CContextClient* client )281 void CObjectTemplate<T>::sendAddItem(const StdString& id, int itemType, CContextClient* client, const string& objectId) 281 282 { 282 283 typedef typename T::EEventId ItemType; … … 285 286 { 286 287 CMessage msg; 287 msg << this->getId(); 288 if (objectId.empty()) msg << this->getId(); 289 else msg << objectId; 288 290 msg << id; 289 291 const std::list<int>& ranks = client->getRanksServerLeader();
Note: See TracChangeset
for help on using the changeset viewer.