#include <string>#include "CMTStation.h"#include <vector>#include <utility>Include dependency graph for CMTStationList.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| class | CMTStationList |
| CMTStationList holds a number of MTSites, usually associated with a single project, line, etc. More... | |
Typedefs | |
| typedef std::vector< CMTStation > | tStationList |
| typedef std::vector< std::pair< CMTStation *, CMTStation * > > | tStatSyncPair |
Functions | |
| tStatSyncPair | FindCorrespondingSites (tStationList &MasterList, tStationList &SlaveList) |
| Take two different site Lists of arguments and return a vector of pairs that point to the sites that correspond to each other. | |
| typedef std::vector<CMTStation> tStationList |
Definition at line 9 of file CMTStationList.h.
| typedef std::vector<std::pair<CMTStation*,CMTStation*> > tStatSyncPair |
Definition at line 40 of file CMTStationList.h.
| tStatSyncPair FindCorrespondingSites | ( | tStationList & | MasterList, | |
| tStationList & | SlaveList | |||
| ) |
Take two different site Lists of arguments and return a vector of pairs that point to the sites that correspond to each other.
Definition at line 145 of file CMTStationList.cpp.
Referenced by main().
00146 { 00147 std::vector<std::pair<CMTStation*,CMTStation*> > CorrespondingSites; 00148 for (size_t i = 0; i < MasterList.size(); ++i) 00149 { 00150 tStationList::iterator slaveit = find_if(SlaveList.begin(),SlaveList.end(), 00151 boost::bind(HasSameName(),MasterList.at(i),_1)); //find site with same name in SlaveList 00152 if (slaveit != SlaveList.end()) 00153 CorrespondingSites.push_back(std::make_pair(&MasterList.at(i),&*slaveit)); 00154 else 00155 std::cerr << "Not found: " << MasterList.at(i).GetName() << std::endl; 00156 } 00157 return CorrespondingSites; 00158 }
1.5.1