Commit ba989240 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[properties] remove the macros SET_PROP_DEFAULT and

PROP_INFO_DEPRECATED_.

The macro SET_PROP_DEFAULT has been deprecated more than three years ago
and practically unused in stable and devel. The macro
PROP_INFO_DEPRECATED_ was a corresponding helper macro that is of no use
anymore.

Reviewed by gruenich.



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@14128 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent c8fc7510
......@@ -85,28 +85,6 @@ namespace Properties
int PropertyInfo<TTAG(EffTypeTagName), PTAG_(PropTagName)>::foo = \
PropertyInfo<TTAG(EffTypeTagName), PTAG_(PropTagName)>::init();
#define PROP_INFO_DEPRECATED_(DeprecationMsg, EffTypeTagName, PropKind, PropTagName, ...) \
template <> \
struct PropertyInfo<TTAG(EffTypeTagName), PTAG_(PropTagName)> \
{ \
static int init() { \
PropertyRegistryKey key( \
/*effTypeTagName=*/ Dune::className<TTAG(EffTypeTagName)>(), \
/*kind=*/PropKind, \
/*name=*/#PropTagName, \
/*value=*/#__VA_ARGS__, \
/*file=*/__FILE__, \
/*line=*/__LINE__); \
PropertyRegistry::addKey(key); \
int blubb = foo; /* <- trigger deprecation message */ \
blubb = blubb; \
return 0; \
}; \
static DUNE_DEPRECATED_MSG(DeprecationMsg) int foo; \
}; \
int PropertyInfo<TTAG(EffTypeTagName), PTAG_(PropTagName)>::foo = \
PropertyInfo<TTAG(EffTypeTagName), PTAG_(PropTagName)>::init();
//! Internal macro which is only required if the property introspection is enabled
#define TTAG_INFO_(...) \
template <> \
......@@ -197,34 +175,6 @@ namespace Properties
namespace PTag { \
struct PTagName; } extern int semicolonHack_
/*!
* \brief Set the default for a property.
*
* SET_PROP_DEFAULT works exactly like SET_PROP, except that it does
* not require an effective type tag. Defaults are used whenever a
* property was not explicitly set or explicitly unset for a type tag.
*
* Example:
*
* \code
* // set a default for the blabbPropTag property tag
* SET_PROP_DEFAULT(blabbPropTag)
* {
* static const int value = 3;
* };
* \endcode
*/
#define SET_PROP_DEFAULT(PropTagName) \
template <class TypeTag> \
struct DefaultProperty<TypeTag, PTAG_(PropTagName)>; \
PROP_INFO_DEPRECATED_("Default properties are deprecated and will be removed in the future", \
__Default, \
/*kind=*/"<opaque>", \
PropTagName, \
/*value=*/"<opaque>") \
template <class TypeTag> \
struct DefaultProperty<TypeTag, PTAG_(PropTagName) >
//! Internal macro
#define SET_PROP_(EffTypeTagName, PropKind, PropTagName, ...) \
template <class TypeTag> \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment