hashConduit.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 #ifndef HASHCONDUIT_H
00008 #define HASHCONDUIT_H
00009 
00010 #include <conduit.h>
00011 #include <map>
00012 
00013 // boost include
00014 #include <boost/multi_index_container.hpp>
00015 #include <boost/multi_index/hashed_index.hpp>
00016 #include <boost/multi_index/member.hpp>
00017 #include <boost/multi_index/ordered_index.hpp>
00018 #include <boost/tokenizer.hpp>
00019 
00020 using boost::multi_index_container;
00021 using namespace boost::multi_index;
00022 
00023 struct by_handle{};
00024 struct by_channelID{};
00025 struct by_pv{};
00026 struct by_pvAlias{};
00027 
00028 
00029 typedef multi_index_container<
00030         Conduit,
00031                 indexed_by<
00032                 ordered_unique<
00033                 tag<by_handle>,    BOOST_MULTI_INDEX_MEMBER(Conduit, unsigned int, handle)>,
00034                 ordered_non_unique<
00035                 tag<by_channelID>, BOOST_MULTI_INDEX_MEMBER(Conduit, chid, channelID)>,
00036                 ordered_non_unique<
00037                 tag<by_pv>,        BOOST_MULTI_INDEX_MEMBER(Conduit, std::string, pv)>,
00038                 ordered_non_unique<
00039                 tag<by_pvAlias>,   BOOST_MULTI_INDEX_MEMBER(Conduit, std::string, pvAlias)>,
00040                 //ordered_non_unique<
00041                 //tag<by_uniqueID>,  BOOST_MULTI_INDEX_MEMBER(Conduit, unsigned int, uniqueID)>,
00042                 hashed_unique<member<Conduit, unsigned int, &Conduit::handle> >
00043                 >
00044  > cafeConduit_set;
00045 
00046 
00047 typedef cafeConduit_set::index<by_channelID>::type cafeConduit_set_by_channelID;
00048 typedef cafeConduit_set::index<by_handle>::type cafeConduit_set_by_handle;
00049 typedef cafeConduit_set::index<by_pv>::type cafeConduit_set_by_pv;
00050 typedef cafeConduit_set::index<by_pvAlias>::type cafeConduit_set_by_pvAlias;
00051 
00052 
00053 #endif // HASHCONDUIT_H

Generated on 3 May 2017 for CAFE by  doxygen 1.6.1