3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
propertysystemmacros.hh File Reference

Provides the magic behind the DuMuX property system. More...

#include <cstddef>
#include <dumux/common/properties/propertysystem.hh>

Go to the source code of this file.

Description

Provides the magic behind the DuMuX property system.

Properties allow to associate arbitrary data types to identifiers. A property is always defined on a pair (TypeTag, PropertyTag) where TypeTag is the identifier for the object the property is defined for and PropertyTag is an unique identifier of the property.

Type tags are hierarchic and inherit properties defined on their ancesters. At each level, properties defined on lower levels can be overwritten or even made undefined. It is also possible to define defaults for properties if it makes sense.

Properties may make use other properties for the respective type tag and these properties can also be defined on an arbitrary level of the hierarchy.

Classes

struct  Dumux::Properties::ReverseTupleImpl< Tuple, std::index_sequence< I... > >
struct  Dumux::Properties::Detail::GetTypeTagInheritance< std::tuple< OneTypeTag > >
struct  Dumux::Properties::Detail::GetTypeTagInheritance< std::tuple< FirstTypeTag, OtherTypeTags... > >

Namespaces

namespace  Dumux
namespace  Dumux::Properties
namespace  Dumux::Properties::TTag
 Type tag for numeric models.
namespace  Dumux::Properties::Detail
 implementation details for template meta programming

Macros

#define TTAG(TypeTagName)
 Makes a type out of a type tag name.
#define PTAG_(PropTagName)
 Makes a type out of a property tag name.
#define DUMUX_GET_HEAD_(Arg1, ...)
 Define a new type tag.
#define NEW_TYPE_TAG(...)
#define INHERITS_FROM(...)
 Syntactic sugar for NEW_TYPE_TAG.
#define NEW_PROP_TAG(PTagName)
 Define a property tag.
#define SET_PROP(EffTypeTagName, PropTagName)
 Set a property for a specific type tag.
#define SET_INT_PROP(EffTypeTagName, PropTagName, ...)
 Set a property to a simple constant integer value.
#define SET_BOOL_PROP(EffTypeTagName, PropTagName, ...)
 Set a property to a simple constant boolean value.
#define SET_TYPE_PROP(EffTypeTagName, PropTagName, ...)
 Set a property which defines a type.
#define SET_SCALAR_PROP(EffTypeTagName, PropTagName, ...)
 Set a property to a simple constant scalar value.
#define SET_STRING_PROP(EffTypeTagName, PropTagName, ...)
 Set a property to a simple constant string value.
#define GET_PROP(TypeTag, PropTagName)
#define GET_PROP_VALUE(TypeTag, PropTagName)
#define GET_PROP_TYPE(TypeTag, PropTagName)

Typedefs

template<class Tuple>
using Dumux::Properties::ReverseTuple = typename ReverseTupleImpl<Tuple, std::make_index_sequence<std::tuple_size<Tuple>::value>>::type

Macro Definition Documentation

◆ GET_PROP

#define GET_PROP ( TypeTag,
PropTagName )
Value:
::Dumux::Properties::Detail::GetPropImpl<TypeTag, PTAG_(PropTagName)>::type
#define PTAG_(PropTagName)
Makes a type out of a property tag name.
Definition propertysystemmacros.hh:70
helper struct to extract get the Property specilization given a TypeTag, asserts that the property is...
Definition propertysystem.hh:130

◆ GET_PROP_TYPE

#define GET_PROP_TYPE ( TypeTag,
PropTagName )
Value:
::Dumux::Properties::Detail::GetPropImpl<TypeTag, PTAG_(PropTagName)>::type::type

◆ GET_PROP_VALUE

#define GET_PROP_VALUE ( TypeTag,
PropTagName )
Value:
::Dumux::Properties::Detail::GetPropImpl<TypeTag, PTAG_(PropTagName)>::type::value

◆ NEW_TYPE_TAG

#define NEW_TYPE_TAG ( ...)
Value:
namespace TTag { \
struct DUMUX_GET_HEAD_(__VA_ARGS__) \
{ using InheritsFrom = Detail::GetTypeTagInheritance<std::tuple<__VA_ARGS__>>::type; }; \
} extern int semicolonHack_

◆ PTAG_

#define PTAG_ ( PropTagName)
Value:
::Dumux::Properties::PropTagName

Makes a type out of a property tag name.

Makes a type out of a property tag name

◆ TTAG

#define TTAG ( TypeTagName)
Value:
::Dumux::Properties::TTag::TypeTagName

Makes a type out of a type tag name.