Hi,
Here is what I am trying to do
typedef DWORD DSIid;
enum DSType
{
DSTypeNone = 0,
DSTypeBegin,
DSTypeRoot
}
struct SDSIOwnedByKey
{
SDSIOwnedByKey(DSType DSTypeOwned, DSIid DSIidOwned,
DSType DSTypeOwner, DSIid DSIidOwner)
: m_DSTypeOwned(DSTypeOwned),
m_DSIidOwned(DSIidOwned), m_DSTypeOwner(DSTypeOwner),
m_DSIidOwner(DSIidOwner)
{
}
bool operator == (const SDSIOwnedByKey &rcComp) const
{
return m_DSTypeOwned ==
rcComp.m_DSTypeOwned &&
m_DSIidOwned ==
rcComp.m_DSIidOwned &&
m_DSTypeOwner ==
rcComp.m_DSTypeOwner &&
m_DSIidOwner ==
rcComp.m_DSIidOwner;
}
DSType m_DSTypeOwned;
DSIid m_DSIidOwned;
DSType m_DSTypeOwner;
DSIid m_DSIidOwner;
};
class DataStore
{
typedef boost::multi_index_container<
SDSIOwnedByKey,
boost::multi_index::indexed_by<
boost::multi_index::ordered_unique
TOwnedBySort;
typedef typename
TOwnedBySort::index<ByOwnedTypeOwnerTypeOwnerIdOwnedId>::type
OwnedBySort_ByOwnedTypeOwnerTypeOwnerId;
TOwnedBySort m_oOwnedBySort;
};
Instead of
>,
boost::multi_index::composite_key_compare