Changeset 214 for XMLIO_V2/dev/dev_rv/src/xmlio/client.cpp
- Timestamp:
- 06/14/11 16:20:27 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/xmlio/client.cpp
r199 r214 19 19 } 20 20 21 ///-------------------------------------------------------------- 22 23 boost::shared_ptr<CClient> CClient::Client; 24 25 ///-------------------------------------------------------------- 26 27 boost::shared_ptr<CClient> CClient::CreateClient(MPIComm comm_client_server) 28 { 29 if (CClient::Client.get() != NULL) 30 CClient::Client = boost::shared_ptr<CClient>(new CClient(comm_client_server)); 31 return (CClient::GetClient()); 32 } 33 34 ///-------------------------------------------------------------- 35 36 boost::shared_ptr<CClient> CClient::GetClient(void) 37 { 38 return (CClient::Client); 39 } 40 21 41 ///-------------------------------------------------------------- 22 42 … … 71 91 this->bpair.getCurrentBuffer().appendInt(timestep); 72 92 } 93 94 //--------------------------------------------------------------- 95 96 void CClient::setTimestep(const date::CDuration & duration) 97 { 98 StdString durationstr = duration.toString(); 99 this->bpair.prepareRequest(1, 2, &durationstr, 100 CLinearBuffer::NULL_ARG, 101 CLinearBuffer::NULL_ARG, 102 CLinearBuffer::NULL_ARG); 103 this->bpair.getCurrentBuffer().appendString(durationstr); 104 } 73 105 74 106 //--------------------------------------------------------------- 75 107 76 void CClient::sendData(const StdString & fieldId, const ARRAY(float, 1) dataArray) 108 void CClient::sendData 109 (const StdString & fieldId, const StdString & fileId, const ARRAY(float, 1) dataArray) 77 110 { 78 this->bpair.prepareRequest(2, 0, &fieldId, &dataArray, 79 CLinearBuffer::NULL_ARG, 111 this->bpair.prepareRequest(2, 0, &fieldId, &fileId, &dataArray, 80 112 CLinearBuffer::NULL_ARG); 81 113 this->bpair.getCurrentBuffer().appendString(fieldId); 114 this->bpair.getCurrentBuffer().appendString(fileId); 82 115 this->bpair.getCurrentBuffer().appendFloatArray(dataArray); 83 116 } … … 85 118 //--------------------------------------------------------------- 86 119 87 void CClient::sendData(const StdString & fieldId, const ARRAY(double, 1) dataArray) 120 void CClient::sendData 121 (const StdString & fieldId, const StdString & fileId, const ARRAY(double, 1) dataArray) 88 122 { 89 this->bpair.prepareRequest(2, 1, &fieldId, &dataArray, 90 CLinearBuffer::NULL_ARG, 123 this->bpair.prepareRequest(2, 1, &fieldId, &fileId, &dataArray, 91 124 CLinearBuffer::NULL_ARG); 92 125 this->bpair.getCurrentBuffer().appendString(fieldId); 126 this->bpair.getCurrentBuffer().appendString(fileId); 93 127 this->bpair.getCurrentBuffer().appendDoubleArray(dataArray); 94 128 }
Note: See TracChangeset
for help on using the changeset viewer.