
12 Oct
2006
12 Oct
'06
1:18 a.m.
One pattern that seems to come up pretty often is the relationship table. Suppose I have 2 classes, Employee and Skill. An Employee can have any number of Skills, and a Skill can be possessed by any number of Employees. But an Employee can have a given Skill only once. The user would need to be able to search for which Skills a given Employee has, and which Employees have a given Skill. What is the best way of using a multi_index_container to model this use case? Suppose, in addition, that every Employee who has a Skill has a numerical rating at that Skill. How would you do a multi_index_container in that case? Joe Gottman