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.
|
The registry item to be stored by Registry class. It is the base class for some more specific ones. More...
#include <registry_item.h>
Classes | |
class | KeyReturnConstIterator |
Custom iterator with key as return type to be used in the Python export. More... | |
Public Member Functions | |
Life Cycle | |
RegistryItem ()=delete | |
Default constructor deleted. More... | |
RegistryItem (const std::string &rName) | |
Constructor with the name. More... | |
template<typename TItemType , typename... TArgs> | |
RegistryItem (const std::string &rName, const std::function< std::shared_ptr< TItemType >(TArgs...)> &rValue) | |
Constructor with the name and lambda. More... | |
template<class TItemType > | |
RegistryItem (const std::string &rName, const TItemType &rValue) | |
Constructor with the name and value. More... | |
template<class TItemType > | |
RegistryItem (const std::string &rName, const shared_ptr< TItemType > &pValue) | |
Constructor with the name and shared ptr. More... | |
RegistryItem (RegistryItem const &rOther)=delete | |
~RegistryItem ()=default | |
Destructor. More... | |
RegistryItem & | operator= (RegistryItem &rOther)=delete |
Assignment operator deleted. More... | |
Items | |
template<typename TItemType , class... TArgumentsList> | |
RegistryItem & | AddItem (std::string const &ItemName, TArgumentsList &&... Arguments) |
Access | |
SubRegistryItemType::iterator | begin () |
SubRegistryItemType::const_iterator | cbegin () const |
SubRegistryItemType::iterator | end () |
SubRegistryItemType::const_iterator | cend () const |
KeyReturnConstIterator | KeyConstBegin () const |
KeyReturnConstIterator | KeyConstEnd () const |
const std::string & | Name () const |
RegistryItem const & | GetItem (std::string const &rItemName) const |
RegistryItem & | GetItem (std::string const &rItemName) |
template<typename TDataType > | |
TDataType const & | GetValue () const |
template<typename TDataType , typename TCastType > | |
TCastType const & | GetValueAs () const |
void | RemoveItem (std::string const &rItemName) |
Inquiry | |
std::size_t | size () |
bool | HasValue () const |
bool | HasItems () const |
bool | HasItem (std::string const &rItemName) const |
Input and output | |
std::string | Info () const |
Turn back information as a string. More... | |
void | PrintInfo (std::ostream &rOStream) const |
Print information about this object. More... | |
void | PrintData (std::ostream &rOStream) const |
Print object's data. More... | |
std::string | ToJson (std::string const &rTabSpacing="", const std::size_t Level=0) const |
Type Definitions | |
using | SubRegistryItemType = std::unordered_map< std::string, Kratos::shared_ptr< RegistryItem > > |
Subregistry item type definition. More... | |
using | SubRegistryItemPointerType = Kratos::shared_ptr< SubRegistryItemType > |
Pointer definition of SubRegistryItemType. More... | |
KRATOS_CLASS_POINTER_DEFINITION (RegistryItem) | |
Pointer definition of RegistryItem. More... | |
The registry item to be stored by Registry class. It is the base class for some more specific ones.
RegistryItem has a tree node structure and stores its name, an optional value, and an unorder_set of its sub data. This structure let us to have registry of the elements and then different registries for each elements inside it. Please note that RegistryItem stores a shared pointer to the value.
Pointer definition of SubRegistryItemType.
using Kratos::RegistryItem::SubRegistryItemType = std::unordered_map<std::string, Kratos::shared_ptr<RegistryItem> > |
Subregistry item type definition.
|
delete |
Default constructor deleted.
|
inline |
Constructor with the name.
|
inline |
Constructor with the name and lambda.
|
inline |
Constructor with the name and value.
|
inline |
Constructor with the name and shared ptr.
|
delete |
|
default |
Destructor.
|
inline |
RegistryItem::SubRegistryItemType::iterator Kratos::RegistryItem::begin | ( | ) |
RegistryItem::SubRegistryItemType::const_iterator Kratos::RegistryItem::cbegin | ( | ) | const |
RegistryItem::SubRegistryItemType::const_iterator Kratos::RegistryItem::cend | ( | ) | const |
RegistryItem::SubRegistryItemType::iterator Kratos::RegistryItem::end | ( | ) |
RegistryItem & Kratos::RegistryItem::GetItem | ( | std::string const & | rItemName | ) |
RegistryItem const & Kratos::RegistryItem::GetItem | ( | std::string const & | rItemName | ) | const |
|
inline |
|
inline |
bool Kratos::RegistryItem::HasItem | ( | std::string const & | rItemName | ) | const |
bool Kratos::RegistryItem::HasItems | ( | ) | const |
bool Kratos::RegistryItem::HasValue | ( | ) | const |
std::string Kratos::RegistryItem::Info | ( | ) | const |
Turn back information as a string.
RegistryItem::KeyReturnConstIterator Kratos::RegistryItem::KeyConstBegin | ( | ) | const |
RegistryItem::KeyReturnConstIterator Kratos::RegistryItem::KeyConstEnd | ( | ) | const |
Kratos::RegistryItem::KRATOS_CLASS_POINTER_DEFINITION | ( | RegistryItem | ) |
Pointer definition of RegistryItem.
|
inline |
|
delete |
Assignment operator deleted.
void Kratos::RegistryItem::PrintData | ( | std::ostream & | rOStream | ) | const |
Print object's data.
void Kratos::RegistryItem::PrintInfo | ( | std::ostream & | rOStream | ) | const |
Print information about this object.
void Kratos::RegistryItem::RemoveItem | ( | std::string const & | rItemName | ) |
std::size_t Kratos::RegistryItem::size | ( | ) |
std::string Kratos::RegistryItem::ToJson | ( | std::string const & | rTabSpacing = "" , |
const std::size_t | Level = 0 |
||
) | const |