Go to the documentation of this file.
16 #ifndef SURGSIM_PHYSICS_CONSTRAINTIMPLEMENTATIONFACTORY_H
17 #define SURGSIM_PHYSICS_CONSTRAINTIMPLEMENTATIONFACTORY_H
22 #include <unordered_map>
32 class ConstraintImplementation;
54 std::type_index representationType,
60 void addImplementation(std::type_index typeIndex, std::shared_ptr<ConstraintImplementation> implementation);
65 std::unordered_map<std::type_index,
Definition: CompoundShapeToGraphics.cpp:29
std::shared_ptr< ConstraintImplementation > getImplementation(std::type_index representationType, ConstraintType constraintType)
Get the instance of a ConstraintImplementation for a specific representation and constraint type.
Definition: ConstraintImplementationFactory.cpp:87
~ConstraintImplementationFactory()
Destructor.
Definition: ConstraintImplementationFactory.cpp:83
ConstraintType
Definition: ConstraintType.h:24
ConstraintImplementationFactory()
Constructor.
Definition: ConstraintImplementationFactory.cpp:46
std::unordered_map< std::type_index, std::array< std::shared_ptr< ConstraintImplementation >, NUM_CONSTRAINT_TYPES > > m_implementations
Lookup table for constraint implementations.
Definition: ConstraintImplementationFactory.h:67
void addImplementation(std::type_index typeIndex, std::shared_ptr< ConstraintImplementation > implementation)
Add an implementation to the internal directory.
Definition: ConstraintImplementationFactory.cpp:101
This class manages ConstraintImplementations, and can be used to look up the correct implementation b...
Definition: ConstraintImplementationFactory.h:38
Definition: ConstraintType.h:33