KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::Factory< TClass > Class Template Reference

Here we add the functions needed for the registration of class. More...

#include <factory.h>

Inheritance diagram for Kratos::Factory< TClass >:
Collaboration diagram for Kratos::Factory< TClass >:

Public Member Functions

Life Cycle
 Factory ()
 
virtual ~Factory ()=default
 
Operations
bool Has (const std::string &rClassName) const override
 This method checks if the linear class is registered. More...
 
template<typename... TArgumentsType>
ClassType::Pointer Create (TArgumentsType &&... Arguments) const
 This method creates a new class. More...
 
Input and output
std::string Info () const override
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const override
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const override
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::FactoryBase
 KRATOS_CLASS_POINTER_DEFINITION (FactoryBase)
 Pointer definition of FactoryBase. More...
 
 FactoryBase ()
 
virtual ~FactoryBase ()
 

Type Definitions

typedef TClass ClassType
 The definition of the class. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (Factory)
 Pointer definition of Factory. More...
 

Detailed Description

template<typename TClass>
class Kratos::Factory< TClass >

Here we add the functions needed for the registration of class.

Defines the base class factory

Author
Vicente Mataix Ferrandiz
Template Parameters
TClassThe class to create the factory

Member Typedef Documentation

◆ ClassType

template<typename TClass >
typedef TClass Kratos::Factory< TClass >::ClassType

The definition of the class.

Constructor & Destructor Documentation

◆ Factory()

template<typename TClass >
Kratos::Factory< TClass >::Factory ( )
inlineexplicit

Constructor.

◆ ~Factory()

template<typename TClass >
virtual Kratos::Factory< TClass >::~Factory ( )
virtualdefault

Destructor.

Member Function Documentation

◆ Create()

template<typename TClass >
template<typename... TArgumentsType>
ClassType::Pointer Kratos::Factory< TClass >::Create ( TArgumentsType &&...  Arguments) const
inline

This method creates a new class.

Parameters
ArgumentsThe arguments of the method
Returns
The pointer to the class of interest
Template Parameters
TArgumentsTypeVariadic template arguments

◆ Has()

template<typename TClass >
bool Kratos::Factory< TClass >::Has ( const std::string &  rClassName) const
inlineoverridevirtual

This method checks if the linear class is registered.

Parameters
rClassNameThe nanme of the class
Returns
True if registered, false otherwise

Reimplemented from Kratos::FactoryBase.

◆ Info()

template<typename TClass >
std::string Kratos::Factory< TClass >::Info ( ) const
inlineoverridevirtual

Turn back information as a string.

Reimplemented from Kratos::FactoryBase.

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<typename TClass >
Kratos::Factory< TClass >::KRATOS_CLASS_POINTER_DEFINITION ( Factory< TClass >  )

Pointer definition of Factory.

◆ PrintData()

template<typename TClass >
virtual void Kratos::Factory< TClass >::PrintData ( std::ostream &  rOStream) const
inlineoverridevirtual

Print object's data.

Reimplemented from Kratos::FactoryBase.

◆ PrintInfo()

template<typename TClass >
void Kratos::Factory< TClass >::PrintInfo ( std::ostream &  rOStream) const
inlineoverridevirtual

Print information about this object.

Reimplemented from Kratos::FactoryBase.


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