iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | List of all members
imstk::SharedObjectRegistrar< T, U, Args > Class Template Reference

Templated class that can add to the object factory with objects that will be generated via std::make_shared More...

#include <imstkFactory.h>

Public Member Functions

 SharedObjectRegistrar (std::string name)
 The constructor can automatically register the given class in the Factory For example it can be used in global scope in an implementation file. More...
 

Detailed Description

template<typename T, typename U, typename ... Args>
class imstk::SharedObjectRegistrar< T, U, Args >

Templated class that can add to the object factory with objects that will be generated via std::make_shared

As most objects in iMSTK are passed via std::shared_ptr this can be used as a default way to create a construction function

Template Parameters
TThe base class type (see ObjectFactory)
UThe class that should be generated here (needs to be a subclass of T)
Argsconstructor parameter types, these can then be pass in ObjectFactory::create

Definition at line 87 of file imstkFactory.h.

Constructor & Destructor Documentation

◆ SharedObjectRegistrar()

template<typename T, typename U, typename ... Args>
imstk::SharedObjectRegistrar< T, U, Args >::SharedObjectRegistrar ( std::string  name)
inline

The constructor can automatically register the given class in the Factory For example it can be used in global scope in an implementation file.

Parameters
nameis the name that will be used in the factory for this class

Definition at line 93 of file imstkFactory.h.

Here is the call graph for this function:

The documentation for this class was generated from the following file: