Changeset 14876 for trunk/FACT++/src
- Timestamp:
- 02/06/13 12:56:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DimState.cc
r14234 r14876 69 69 for (auto it=tok.begin(); it!=tok.end(); it++) 70 70 { 71 if (it->at(0)=='-') 71 string str = *it; 72 73 if (str[0]=='-') 72 74 continue; 73 75 76 if (str[0]=='+') 77 str = str.substr(1); 78 79 const size_t last_pipe = str.find_last_of('|'); 80 74 81 // Get the type and compare it with fType 75 const string type = it->substr(it->find_last_of('|')+1);82 const string type = str.substr(last_pipe+1); 76 83 if (type=="RPC") 77 84 continue; … … 81 88 // continue; 82 89 83 const size_t first_pipe = it->find_first_of('|'); 84 const size_t first_slash = it->find_first_of('/'); 85 const size_t last_pipe = it->find_last_of('|'); 90 const size_t first_pipe = str.find_first_of('|'); 91 const size_t first_slash = str.find_first_of('/'); 86 92 87 93 // Get format, name and command name 88 94 Service service; 89 service.server = it->substr(0, first_slash);90 service.name = it->substr(0, first_pipe);91 service.service = it->substr(first_slash+1, first_pipe-first_slash-1);92 service.format = it->substr(first_pipe +1, last_pipe -first_pipe -1);95 service.server = str.substr(0, first_slash); 96 service.name = str.substr(0, first_pipe); 97 service.service = str.substr(first_slash+1, first_pipe-first_slash-1); 98 service.format = str.substr(first_pipe +1, last_pipe -first_pipe -1); 93 99 service.iscmd = type=="CMD"; 94 95 //if (it->at(0)=='+')96 //{97 // // Check if this server is not found in the list.98 // // This should never happen if Dim works reliable99 // const TypeList::iterator v = list.find(name);100 // if (v!=list.end())101 // {102 // stringstream err;103 // err << "DimServiceInfoList: Service '" << server << "/" << name << "' already in list not as it ought to be.";104 // throw runtime_error(err.str());105 // }106 //107 // list[name] = make_pair(fmt, iscmd);108 // fList->AddService(server, name, fmt, iscmd);109 //}110 100 111 101 const auto v = find(fServiceList.begin(), fServiceList.end(), service.name);
Note:
See TracChangeset
for help on using the changeset viewer.