Changeset 10811 for trunk/FACT++
- Timestamp:
- 05/24/11 20:04:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fadctrl.cc
r10798 r10811 31 31 32 32 using namespace std; 33 34 #undef FAKE35 33 36 34 // ------------------------------------------------------------------------ … … 338 336 { 339 337 SetLogStream(&imp); 340 341 #ifdef FAKE 342 for (int i=0; i<7; i++) 343 fake[i] = new Connection(ioservice, imp()); 344 #endif 345 } 346 #ifdef FAKE 347 Connection *fake[7]; 348 349 ~ConnectionFAD() 350 { 351 // WORKAROUND 352 for (int i=0; i<7; i++) 353 delete fake[i]; 354 } 355 void StartConnect() 356 { 357 // WORKAROUND 358 Connection::StartConnect(); 359 for (int i=0; i<7; i++) 360 fake[i]->StartConnect(); 361 } 362 void SetEndpoint(const string &addr) 363 { 364 // WORKAROUND 365 Connection::SetEndpoint(addr); 366 for (int i=0; i<7; i++) 367 { 368 const size_t p0 = addr.find_first_of(':'); 369 370 ostringstream p; 371 p << addr.substr(0, p0+1) << atoi(addr.substr(p0+1).c_str())+i+1; 372 fake[i]->SetEndpoint(p.str()); 373 } 374 // ==========================================WORKAROUND 375 } 376 #endif 338 } 377 339 378 340 void Cmd(Enable_t cmd, bool on=true)
Note:
See TracChangeset
for help on using the changeset viewer.