3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Classes | Namespaces | Macros | Typedefs
propertysystemmacros.hh File Reference

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

#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
 make the local view function available whenever we use the grid geometry
 
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)   ::Dumux::Properties::TTag::TypeTagName
 Makes a type out of a type tag name. More...
 
#define PTAG_(PropTagName)   ::Dumux::Properties::PropTagName
 Makes a type out of a property tag name. More...
 
#define DUMUX_GET_HEAD_(Arg1, ...)   Arg1
 Define a new type tag. More...
 
#define NEW_TYPE_TAG(...)
 
#define INHERITS_FROM(...)   __VA_ARGS__
 Syntactic sugar for NEW_TYPE_TAG. More...
 
#define NEW_PROP_TAG(PTagName)
 Define a property tag. More...
 
#define SET_PROP(EffTypeTagName, PropTagName)
 Set a property for a specific type tag. More...
 
#define SET_INT_PROP(EffTypeTagName, PropTagName, ...)
 Set a property to a simple constant integer value. More...
 
#define SET_BOOL_PROP(EffTypeTagName, PropTagName, ...)
 Set a property to a simple constant boolean value. More...
 
#define SET_TYPE_PROP(EffTypeTagName, PropTagName, ...)
 Set a property which defines a type. More...
 
#define SET_SCALAR_PROP(EffTypeTagName, PropTagName, ...)
 Set a property to a simple constant scalar value. More...
 
#define SET_STRING_PROP(EffTypeTagName, PropTagName, ...)
 Set a property to a simple constant string value. More...
 
#define GET_PROP(TypeTag, PropTagName)   ::Dumux::Properties::Detail::GetPropImpl<TypeTag, PTAG_(PropTagName)>::type
 
#define GET_PROP_VALUE(TypeTag, PropTagName)   ::Dumux::Properties::Detail::GetPropImpl<TypeTag, PTAG_(PropTagName)>::type::value
 
#define GET_PROP_TYPE(TypeTag, PropTagName)   ::Dumux::Properties::Detail::GetPropImpl<TypeTag, PTAG_(PropTagName)>::type::type
 

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 
)    ::Dumux::Properties::Detail::GetPropImpl<TypeTag, PTAG_(PropTagName)>::type

◆ GET_PROP_TYPE

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

◆ GET_PROP_VALUE

#define GET_PROP_VALUE (   TypeTag,
  PropTagName 
)    ::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_
#define DUMUX_GET_HEAD_(Arg1,...)
Define a new type tag.
Definition: propertysystemmacros.hh:128

◆ PTAG_

#define PTAG_ (   PropTagName)    ::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)    ::Dumux::Properties::TTag::TypeTagName

Makes a type out of a type tag name.

Include dependency graph for propertysystemmacros.hh: