1
2
3
4
5
6 #include <cmajor/binder/ConceptRepository.hpp>
7
8 namespace cmajor { namespace binder {
9
10 BoundConcept* ConceptRepository::GetBoundConcept(const BoundConceptKey& key) const
11 {
12 auto it = boundConceptMap.find(key);
13 if (it != boundConceptMap.cend())
14 {
15 return it->second;
16 }
17 else
18 {
19 return nullptr;
20 }
21 }
22
23 void ConceptRepository::AddBoundConcept(const BoundConceptKey& key, std::std::unique_ptr<BoundConcept>&&boundConcept)
24 {
25 boundConceptMap[key] = boundConcept.get();
26 boundConcepts.push_back(std::move(boundConcept));
27 }
28
29 } }