#include "CMTStationList.h"#include "../Station Parser/StationLexer.hpp"#include "../Station Parser/StationParser.hpp"#include "CFatalException.h"#include "convert.h"#include "stringcompare.h"#include <fstream>#include <iostream>#include <utility>#include <gsl/gsl_math.h>#include <boost/bind.hpp>Include dependency graph for CMTStationList.cpp:

Go to the source code of this file.
Namespaces | |
| namespace | antlr |
Classes | |
| class | HasSameName |
| returns if station a and b have the same name More... | |
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. | |
| 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