Skip to content

Commit

Permalink
asdfsdf
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Parisi committed Mar 23, 2013
1 parent b3cb498 commit c2cddb4
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/interconnect/scanrequest/ScanIdentifier.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#ifndef SCAN_IDENT_H_
#define SCAN_IDENT_H_


#include <iostream>
#include <map>

using namespace std;

struct CopyKey
{
template <typename T>
typename T::first_type operator()(T keyValuePair) const
{
return keyValuePair.first;
}
};

template<typename M, typename V>
class ScanIdentifier
{
protected:
map<M,vector<V> > globalIdentifierMapping;

public:
public ScanIdentifier()
{

}


vector<V> getIdentifiers(M m)
{
return globalIdentifierMapping[ m ];
}


vector<M> getGlobalMapping()
{
vector<M> keys;
transform(globalIdentifierMapping.begin(), globalIdentifierMapping.end(), back_inserter(keys), CopyKey());
return keys;
}
};

#endif

0 comments on commit c2cddb4

Please sign in to comment.