propertysystem.hh File Reference

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

#include <opm/material/common/ClassName.hpp>
#include <opm/common/ErrorMacros.hpp>
#include <opm/common/Exceptions.hpp>
#include <type_traits>
#include <map>
#include <set>
#include <list>
#include <string>
#include <iostream>
#include <sstream>
#include <cstring>
#include <tuple>
Include dependency graph for propertysystem.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TTAG(TypeTagName)   Ewoms::Properties::TTag::TypeTagName
 Convert a type tag name to a type. More...
 
#define PTAG(PropTagName)   Ewoms::Properties::PTag::PropTagName
 Makes a type out of a property tag name. More...
 
#define NEW_TYPE_TAG(...)
 Define a new type tag. More...
 
#define SET_SPLICES(TypeTagName,...)
 Define splices for a given type tag. More...
 
#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 UNSET_PROP(EffTypeTagName, PropTagName)
 Explicitly unset a property for a 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 SET_TAG_PROP(EffTypeTagName, PropTagName, ValueTypeTagName)
 Define a property containing a type tag. More...
 
#define GET_PROP(TypeTag, PropTagName)   ::Ewoms::Properties::GetProperty<TypeTag, PTAG(PropTagName)>::p
 Retrieve a property for a type tag. More...
 
#define GET_PROP_VALUE(TypeTag, PropTagName)   ::Ewoms::Properties::GetProperty<TypeTag, PTAG(PropTagName)>::p::value
 Access the value attribute of a property for a type tag. More...
 
#define GET_PROP_TYPE(TypeTag, PropTagName)   ::Ewoms::Properties::GetProperty<TypeTag, PTAG(PropTagName)>::p::type
 Access the type attribute of a property for a type tag. More...
 
#define PROP_DIAGNOSTIC(TypeTag, PropTagName)   ::Ewoms::Properties::getDiagnostic<TypeTag>(#PropTagName)
 Return a human readable diagnostic message how exactly a property was defined. More...
 

Detailed Description

Provides the magic behind the eWoms 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.

Properties may use other properties for the respective type tag and these properties can also be defined on an arbitrary level of the hierarchy. The only restriction on this is that cycles are not allowed when defining properties.