LibMusicXML 3.22
bimap< T1, T2 > Class Template Reference

implements a bijective map More...

#include <bimap.h>

Public Member Functions

 bimap (const T1 tbl1[], const T2 tbl2[], int n)
const T2 operator[] (const T1 key)
 returns the second type value indexed by the first type
const T1 operator[] (const T2 key)
 returns the first type value indexed by the second type
long size ()
 returns the map size
bimapadd (const T1 &v1, const T2 &v2)
 adds a pair of values

Detailed Description

template<typename T1, typename T2>
class bimap< T1, T2 >

A bijective map is a map where values and keys are interchangeable. To operate correctly, typenames T1 and T2 must be different.