42 #ifndef EWOMS_PROPERTIES_HH 43 #define EWOMS_PROPERTIES_HH 45 #include <dune/common/classname.hh> 46 #include <opm/common/ErrorMacros.hpp> 47 #include <opm/common/Exceptions.hpp> 48 #include <opm/common/Unused.hpp> 50 #include <type_traits> 64 namespace Properties {
66 #define EWOMS_GET_HEAD_(Arg1, ...) Arg1 68 #if !defined NO_PROPERTY_INTROSPECTION 71 #define PROP_INFO_(EffTypeTagName, PropKind, PropTagName, ...) \ 73 struct PropertyInfo<TTAG(EffTypeTagName), PTAG(PropTagName)> \ 76 PropertyRegistryKey key( \ 77 Dune::className<TTAG(EffTypeTagName)>(), \ 83 PropertyRegistry::addKey(key); \ 86 static std::string propertyName() { return #PropTagName; } \ 88 namespace fooPropInfo_ ## EffTypeTagName { \ 89 static const int foo_ ## PropTagName OPM_UNUSED = \ 90 PropertyInfo<TTAG(EffTypeTagName), PTAG(PropTagName)>::init(); \ 95 #define TTAG_INFO_(TagName, ...) \ 97 struct TypeTagInfo<TTAG(TagName)> \ 100 TypeTagRegistry::addAllChildren<TTAG(TagName), __VA_ARGS__>(); \ 104 static const int fooTypeTagInfo_ ## TagName OPM_UNUSED = \ 105 TypeTagInfo<TagName>::init(); 108 #define SPLICE_INFO_(SpliceName, ...) \ 110 struct SpliceInfo<TTAG(SpliceName)> \ 112 static int init() { \ 113 TypeTagRegistry::addAllSplices<TTAG(SpliceName), __VA_ARGS__>(); \ 117 static const int fooSpliceInfo_ ## SpliceName OPM_UNUSED = \ 118 SpliceInfo<TTAG(SpliceName)>::init(); 121 #define PROP_INFO_(EffTypeTagName, PropKind, PropTagName, ...) 123 #define TTAG_INFO_(EffTypeTagName, ...) 124 #define SPLICE_INFO_(EffTypeTagName, ...) 138 #define TTAG(TypeTagName) Ewoms::Properties::TTag::TypeTagName 147 #define PTAG(PropTagName) Ewoms::Properties::PTag::PropTagName 169 #define NEW_TYPE_TAG(...) \ 171 struct EWOMS_GET_HEAD_(__VA_ARGS__, dontcare) \ 172 : public TypeTag<__VA_ARGS__> \ 174 TTAG_INFO_(__VA_ARGS__, void) \ 176 extern int semicolonHack_ 213 #define SET_SPLICES(TypeTagName, ...) \ 216 struct Splices<TTAG(TypeTagName)> \ 218 typedef RevertedTuple<__VA_ARGS__>::type tuple; \ 220 SPLICE_INFO_(TypeTagName, __VA_ARGS__) \ 222 extern int semicolonHack_ 230 #define INHERITS_FROM(...) __VA_ARGS__ 247 #define NEW_PROP_TAG(PTagName) \ 249 struct PTagName; } extern int semicolonHack_ 252 #define SET_PROP_(EffTypeTagName, PropKind, PropTagName, ...) \ 253 template <class TypeTag> \ 254 struct Property<TypeTag, \ 255 TTAG(EffTypeTagName), \ 256 PTAG(PropTagName)>; \ 257 PROP_INFO_(EffTypeTagName, \ 261 template <class TypeTag> \ 262 struct Property<TypeTag, \ 263 TTAG(EffTypeTagName), \ 297 #define SET_PROP(EffTypeTagName, PropTagName) \ 298 template <class TypeTag> \ 299 struct Property<TypeTag, \ 300 TTAG(EffTypeTagName), \ 301 PTAG(PropTagName)>; \ 302 PROP_INFO_(EffTypeTagName, \ 306 template <class TypeTag> \ 307 struct Property<TypeTag, \ 308 TTAG(EffTypeTagName), \ 325 #define UNSET_PROP(EffTypeTagName, PropTagName) \ 327 struct PropertyUnset<TTAG(EffTypeTagName), \ 328 PTAG(PropTagName) >; \ 329 PROP_INFO_(EffTypeTagName, \ 334 struct PropertyUnset<TTAG(EffTypeTagName), \ 335 PTAG(PropTagName) > \ 336 : public PropertyExplicitlyUnset \ 345 #define SET_INT_PROP(EffTypeTagName, PropTagName, ...) \ 346 SET_PROP_(EffTypeTagName, \ 352 static const int value = __VA_ARGS__; \ 361 #define SET_BOOL_PROP(EffTypeTagName, PropTagName, ...) \ 362 SET_PROP_(EffTypeTagName, \ 368 static const bool value = __VA_ARGS__; \ 377 #define SET_TYPE_PROP(EffTypeTagName, PropTagName, ...) \ 378 SET_PROP_(EffTypeTagName, \ 383 typedef __VA_ARGS__ type; \ 394 #define SET_SCALAR_PROP(EffTypeTagName, PropTagName, ...) \ 395 SET_PROP_(EffTypeTagName, \ 400 typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; \ 402 typedef Scalar type; \ 403 static const Scalar value; \ 405 template <class TypeTag> \ 406 const typename Property<TypeTag, TTAG(EffTypeTagName), PTAG(PropTagName)>::type \ 407 Property<TypeTag, TTAG(EffTypeTagName), PTAG(PropTagName)>::value(__VA_ARGS__) 416 #define SET_STRING_PROP(EffTypeTagName, PropTagName, ...) \ 417 SET_PROP_(EffTypeTagName, \ 423 typedef std::string type; \ 424 static const std::string value; \ 426 template <class TypeTag> \ 427 const typename Property<TypeTag, TTAG(EffTypeTagName), PTAG(PropTagName)>::type \ 428 Property<TypeTag, TTAG(EffTypeTagName), PTAG(PropTagName)>::value(__VA_ARGS__) 436 #define SET_TAG_PROP(EffTypeTagName, PropTagName, ValueTypeTagName) \ 437 SET_PROP_(EffTypeTagName, \ 440 TTAG(ValueTypeTagName)) \ 442 typedef TTAG(ValueTypeTagName) type; \ 454 #define GET_PROP(TypeTag, PropTagName) \ 455 ::Ewoms::Properties::GetProperty<TypeTag, PTAG(PropTagName)>::p 456 #define GET_PROP_(TypeTag, PropTag) \ 458 ::Ewoms::Properties::GetProperty<TypeTag, PropTag>::p 469 #define GET_PROP_VALUE(TypeTag, PropTagName) \ 470 ::Ewoms::Properties::GetProperty<TypeTag, PTAG(PropTagName)>::p::value 471 #define GET_PROP_VALUE_(TypeTag, PropTag) \ 473 ::Ewoms::Properties::GetProperty<TypeTag, PropTag>::p::value 486 #define GET_PROP_TYPE(TypeTag, PropTagName) \ 487 ::Ewoms::Properties::GetProperty<TypeTag, PTAG(PropTagName)>::p::type 488 #define GET_PROP_TYPE_(TypeTag, PropTag) \ 490 ::Ewoms::Properties::GetProperty<TypeTag, PropTag>::p::type 493 #if !defined NO_PROPERTY_INTROSPECTION 511 #define PROP_DIAGNOSTIC(TypeTag, PropTagName) \ 512 ::Ewoms::Properties::getDiagnostic<TypeTag>(#PropTagName) 515 #define PROP_DIAGNOSTIC(TypeTag, PropTagName) "Property introspection disabled by macro NO_PROPERTY_INTROSPECTION." 528 #if !defined NO_PROPERTY_INTROSPECTION 532 template <
class EffTypeTag>
539 template <
class EffTypeTagName>
544 template <
class EffTypeTagName,
class PropTagName>
548 class PropertyRegistryKey
551 PropertyRegistryKey()
554 PropertyRegistryKey(
const std::string& effTypeTagName,
555 const std::string& propertyKind,
556 const std::string& propertyName,
557 const std::string& propertyValue,
558 const std::string& fileDefined,
560 : effTypeTagName_(effTypeTagName)
561 , propertyKind_(propertyKind)
562 , propertyName_(propertyName)
563 , propertyValue_(propertyValue)
564 , fileDefined_(fileDefined)
565 , lineDefined_(lineDefined)
569 PropertyRegistryKey(
const PropertyRegistryKey&) =
default;
570 PropertyRegistryKey& operator=(
const PropertyRegistryKey&) =
default;
572 const std::string& effTypeTagName()
const 573 {
return effTypeTagName_; }
574 const std::string& propertyKind()
const 575 {
return propertyKind_; }
576 const std::string& propertyName()
const 577 {
return propertyName_; }
578 const std::string& propertyValue()
const 579 {
return propertyValue_; }
580 const std::string& fileDefined()
const 581 {
return fileDefined_; }
582 int lineDefined()
const 583 {
return lineDefined_; }
586 std::string effTypeTagName_;
587 std::string propertyKind_;
588 std::string propertyName_;
589 std::string propertyValue_;
590 std::string fileDefined_;
595 template <
class TypeTag,
class PropertyTag>
598 class TypeTagRegistry
601 struct SpliceRegistryEntry {
602 SpliceRegistryEntry(
const std::string& name)
605 std::string propertyName()
const 612 typedef std::list<std::unique_ptr<SpliceRegistryEntry> > SpliceList;
613 typedef std::map<std::string, SpliceList> SpliceListMap;
615 typedef std::list<std::string> ChildrenList;
616 typedef std::map<std::string, ChildrenList> ChildrenListMap;
620 template <
class TypeTag,
typename ... Children>
621 static void addAllChildren()
623 std::string typeTagName = Dune::className<TypeTag>();
625 if (children_().find(typeTagName) == children_().end())
626 addChildren<TypeTag, Children...>();
632 template <
class TypeTag,
class DummyChild>
633 static void addChildren()
638 template <
class TypeTag,
class Child1,
class Child2,
typename ... RemainingChildren>
639 static void addChildren()
641 std::string typeTagName = Dune::className<TypeTag>();
643 children_()[typeTagName].emplace_front(Dune::className<Child1>());
645 addChildren<TypeTag, Child2, RemainingChildren...>();
650 template <
class TypeTag,
typename ... Splices>
651 static void addAllSplices()
653 std::string typeTagName = Dune::className<TypeTag>();
655 if (splices_().find(typeTagName) == splices_().end())
656 addSplices<TypeTag, Splices...>();
662 template <
class TypeTag>
663 static void addSplices()
668 template <
class TypeTag,
class Splice1,
typename ... RemainingSplices>
669 static void addSplices()
671 const std::string& typeTagName = Dune::className<TypeTag>();
672 const std::string& propName =
673 PropertyInfo<typename GetProperty<TypeTag, Splice1>::template GetEffectiveTypeTag_<TypeTag>::type, Splice1>::propertyName();
675 splices_()[typeTagName].emplace_front(
new SpliceRegistryEntry(propName));
677 addSplices<TypeTag, RemainingSplices...>();
680 static const SpliceList& splices(
const std::string& typeTagName)
681 {
return splices_()[typeTagName]; }
683 static const ChildrenList& children(
const std::string& typeTagName)
684 {
return children_()[typeTagName]; }
687 static SpliceListMap& splices_()
689 static SpliceListMap data;
692 static ChildrenListMap& children_()
694 static ChildrenListMap data;
699 class PropertyRegistry
701 typedef Ewoms::Properties::TypeTagRegistry TypeTagRegistry;
704 typedef std::map<std::string, PropertyRegistryKey> KeyList;
705 typedef std::map<std::string, KeyList> KeyListMap;
707 static void addKey(
const PropertyRegistryKey& key)
709 keys_()[key.effTypeTagName()][key.propertyName()] = key;
712 static const std::string& getSpliceTypeTagName(
const std::string& typeTagName,
713 const std::string& propertyName)
715 const auto& keyIt = keys_().find(typeTagName);
716 const auto& keyEndIt = keys_().end();
717 if (keyIt == keyEndIt)
718 OPM_THROW(std::runtime_error,
719 "Unknown type tag key '" << typeTagName <<
"'");
723 const auto& propIt = keyIt->second.find(propertyName);
724 const auto& propEndIt = keyIt->second.end();
725 if (propIt != propEndIt)
726 return propIt->second.propertyValue();
729 typedef typename TypeTagRegistry::SpliceList SpliceList;
730 const SpliceList& splices = TypeTagRegistry::splices(typeTagName);
731 SpliceList::const_iterator spliceIt = splices.begin();
732 for (; spliceIt != splices.end(); ++spliceIt) {
733 const auto& spliceTypeTagName =
734 PropertyRegistry::getSpliceTypeTagName(typeTagName,
735 (*spliceIt)->propertyName());
737 if (spliceTypeTagName ==
"")
740 const auto& tmp = getSpliceTypeTagName(spliceTypeTagName, propertyName);
746 typedef TypeTagRegistry::ChildrenList ChildrenList;
747 const ChildrenList& children = TypeTagRegistry::children(typeTagName);
748 ChildrenList::const_iterator ttagIt = children.begin();
749 for (; ttagIt != children.end(); ++ttagIt) {
750 const auto& tmp = getSpliceTypeTagName(*ttagIt, propertyName);
757 static std::string tmp(
"");
761 static const PropertyRegistryKey& getKey(
const std::string& effTypeTagName,
762 const std::string& propertyName)
763 {
return keys_()[effTypeTagName][propertyName]; }
765 static const KeyList& getKeys(
const std::string& effTypeTagName)
766 {
return keys_()[effTypeTagName]; }
769 static KeyListMap& keys_()
771 static KeyListMap data;
776 #endif // !defined NO_PROPERTY_INTROSPECTION 778 struct PropertyUndefined { };
779 class PropertyExplicitlyUnset {};
781 template <
class RealTypeTag,
782 class EffectiveTypeTag,
784 struct Property :
public PropertyUndefined
787 template <
class EffectiveTypeTag,
789 struct PropertyUnset :
public PropertyUndefined
792 template <
class Tree,
class PropertyTag>
793 struct propertyExplicitlyUnset
795 const static bool value =
796 std::is_base_of<PropertyExplicitlyUnset,
797 PropertyUnset<
typename Tree::SelfType,
802 template <
class Tree,
class PropertyTag>
803 class propertyExplicitlyUnsetOnTree
805 static const bool explicitlyUnset = propertyExplicitlyUnset<Tree, PropertyTag>::value;
807 template <
class ChildTuple>
808 struct unsetOnAllChildren
809 {
static const bool value =
true; };
811 template <
class Child,
class ... RemainingChildren>
812 struct unsetOnAllChildren<std::tuple<Child, RemainingChildren...> >
813 {
static const bool value =
814 propertyExplicitlyUnsetOnTree<Child, PropertyTag>::value
815 && unsetOnAllChildren<std::tuple<RemainingChildren...> >::value; };
818 static const bool value =
819 (explicitlyUnset || (!Tree::isLeaf && unsetOnAllChildren<typename Tree::ChildrenTuple>::value));
822 template <
class PropertyTag>
823 struct propertyExplicitlyUnsetOnTree<void, PropertyTag>
825 const static bool value = std::true_type::value;
828 template <
class RealTypeTag,
class Tree,
class PropertyTag>
829 struct propertyDefinedOnSelf
831 const static bool value =
832 ! std::is_base_of<PropertyUndefined,
833 Property<RealTypeTag,
834 typename Tree::SelfType,
835 PropertyTag> >::value;
841 template<
typename... Args>
845 template<
unsigned int N,
typename... All>
846 struct RevertedTupleOuter
848 template<
typename Head,
typename... Tail>
849 struct RevertedTupleInner: RevertedTupleOuter<N-1, Head, All...>::template RevertedTupleInner<Tail...> { };
852 template<
typename... All>
853 struct RevertedTupleOuter<0, All...>
855 template<
typename... Tail>
856 struct RevertedTupleInner {
857 typedef std::tuple<All...> type;
862 typedef typename RevertedTupleOuter<
sizeof...(Args)>::
template RevertedTupleInner<Args...>::type type;
865 template <
class SelfT,
866 typename ... Children>
870 typedef SelfT SelfType;
872 typedef typename RevertedTuple<Children...>::type ChildrenTuple;
873 static const bool isLeaf = std::is_same<ChildrenTuple, std::tuple<> >::value;
879 template <
class TypeTag>
882 typedef typename std::tuple<> tuple;
886 template <
class TypeTag,
class PropertyTag>
890 template <
class CurTree,
bool directlyDefined =
891 propertyDefinedOnSelf<TypeTag,
894 struct GetEffectiveTypeTag_
895 {
typedef typename CurTree::SelfType type; };
897 template <
class ...Elements>
898 struct SearchTypeTagList_;
900 template <
class EffectiveTypeTag,
class ...Elements>
901 struct SearchTypeTagList_FirstThenRemaining_;
903 template <
class ...SpliceList>
904 struct SearchSpliceList_;
906 template <
class EffectiveTypeTag,
class ...Splices>
907 struct SearchSpliceList_FirstThenRemaining_;
911 template <
class TypeTagTuple>
912 struct SearchTypeTagTuple_
913 {
typedef void type; };
915 template <
class ...TypeTagList>
916 struct SearchTypeTagTuple_<std::tuple<TypeTagList...> >
917 {
typedef typename SearchTypeTagList_<TypeTagList...>::type type; };
919 template <
class ...Elements>
920 struct SearchTypeTagList_
921 {
typedef void type; };
923 template <
class FirstElement,
class ...RemainingElements>
924 struct SearchTypeTagList_<FirstElement, RemainingElements...>
926 typedef typename SearchTypeTagList_FirstThenRemaining_<
927 typename GetEffectiveTypeTag_<FirstElement>::type,
928 RemainingElements...>::type type;
931 template <
class EffectiveTypeTag,
class ...Elements>
932 struct SearchTypeTagList_FirstThenRemaining_
933 {
typedef EffectiveTypeTag type; };
935 template <
class ...RemainingElements>
936 struct SearchTypeTagList_FirstThenRemaining_<void, RemainingElements...>
937 {
typedef typename SearchTypeTagList_<RemainingElements...>::type type; };
941 template <
class SpliceTuple>
942 struct SearchSpliceTuple_
943 {
typedef void type; };
945 template <
class ...SpliceList>
946 struct SearchSpliceTuple_<std::tuple<SpliceList...> >
947 {
typedef typename SearchSpliceList_<SpliceList...>::type type; };
949 template <
class ...SpliceList>
950 struct SearchSpliceList_
951 {
typedef void type; };
953 template <
class FirstSplice,
class ...RemainingSplices>
954 struct SearchSpliceList_<FirstSplice, RemainingSplices...>
956 typedef typename SearchSpliceList_FirstThenRemaining_<
957 typename GetEffectiveTypeTag_<typename GetProperty<TypeTag, FirstSplice>::p::type>::type,
958 RemainingSplices...>::type type;
961 template <
class EffectiveTypeTag,
class ...Splices>
962 struct SearchSpliceList_FirstThenRemaining_
963 {
typedef EffectiveTypeTag type; };
965 template <
class ...RemainingSplices>
966 struct SearchSpliceList_FirstThenRemaining_<void, RemainingSplices...>
967 {
typedef typename SearchSpliceList_<RemainingSplices...>::type type; };
970 template <
class CurTree,
971 class SpliceTypeTag =
typename SearchSpliceTuple_< typename PTag::Splices<CurTree>::tuple >::type >
972 struct SearchSplicesThenChildren_
973 {
typedef SpliceTypeTag type; };
975 template <
class CurTree>
976 struct SearchSplicesThenChildren_<CurTree, void>
977 {
typedef typename SearchTypeTagTuple_<typename CurTree::ChildrenTuple>::type type; };
979 template <
class CurTree>
980 struct GetEffectiveTypeTag_<CurTree, false>
981 {
typedef typename SearchSplicesThenChildren_<CurTree>::type type; };
984 typedef Property<TypeTag, typename GetEffectiveTypeTag_<TypeTag>::type, PropertyTag> p;
987 #if !defined NO_PROPERTY_INTROSPECTION 988 inline int myReplaceAll_(std::string& s,
989 const std::string& pattern,
990 const std::string& replacement);
991 inline int myReplaceAll_(std::string& s,
992 const std::string& pattern,
993 const std::string& replacement)
997 while ( (pos = s.find(pattern)) != s.npos) {
998 s.replace(pos, pattern.size(), replacement);
1004 inline std::string canonicalTypeTagNameToName_(
const std::string& canonicalName);
1005 inline std::string canonicalTypeTagNameToName_(
const std::string& canonicalName)
1007 std::string result(canonicalName);
1008 myReplaceAll_(result,
"Ewoms::Properties::TTag::",
"TTAG(");
1009 myReplaceAll_(result,
"::",
"");
1014 inline bool getDiagnostic_(
const std::string& typeTagName,
1015 const std::string& propTagName,
1016 std::string& result,
1017 const std::string indent)
1019 const PropertyRegistryKey *key = 0;
1021 const typename PropertyRegistry::KeyList& keys =
1022 PropertyRegistry::getKeys(typeTagName);
1023 typename PropertyRegistry::KeyList::const_iterator it = keys.begin();
1024 for (; it != keys.end(); ++it) {
1025 if (it->second.propertyName() == propTagName) {
1032 std::ostringstream oss;
1034 << key->propertyKind() <<
" " 1035 << key->propertyName() <<
" defined on '" 1036 << canonicalTypeTagNameToName_(key->effTypeTagName()) <<
"' at " 1037 << key->fileDefined() <<
":" << key->lineDefined() <<
"\n";
1043 typedef typename TypeTagRegistry::ChildrenList ChildrenList;
1044 const ChildrenList& children = TypeTagRegistry::children(typeTagName);
1045 ChildrenList::const_iterator ttagIt = children.begin();
1046 std::string newIndent = indent +
" ";
1047 for (; ttagIt != children.end(); ++ttagIt) {
1048 if (getDiagnostic_(*ttagIt, propTagName, result, newIndent)) {
1049 result.insert(0, indent +
"Inherited from " + canonicalTypeTagNameToName_(typeTagName) +
"\n");
1057 template <
class TypeTag>
1058 const std::string getDiagnostic(std::string propTagName)
1062 std::string TypeTagName(Dune::className<TypeTag>());
1064 propTagName.replace(0, strlen(
"PTag("),
"");
1065 auto n = propTagName.length();
1066 propTagName.replace(n - 1, 1,
"");
1072 inline void print_(
const std::string& rootTypeTagName,
1073 const std::string& curTypeTagName,
1074 const std::string& splicePropName,
1076 const std::string indent,
1077 std::set<std::string>& printedProperties)
1080 os << indent <<
"###########\n";
1081 os << indent <<
"# Properties\n";
1082 os << indent <<
"###########\n";
1083 os << indent <<
"Properties for " << canonicalTypeTagNameToName_(curTypeTagName) <<
":";
1085 else if (splicePropName !=
"")
1086 os << indent <<
"Inherited from splice " << splicePropName <<
" (set to " << canonicalTypeTagNameToName_(curTypeTagName) <<
"):";
1088 os << indent <<
"Inherited from " << canonicalTypeTagNameToName_(curTypeTagName) <<
":";
1089 const typename PropertyRegistry::KeyList& keys =
1090 PropertyRegistry::getKeys(curTypeTagName);
1091 typename PropertyRegistry::KeyList::const_iterator it = keys.begin();
1092 bool somethingPrinted =
false;
1093 for (; it != keys.end(); ++it) {
1094 const PropertyRegistryKey& key = it->second;
1095 if (printedProperties.count(key.propertyName()) > 0)
1097 if (!somethingPrinted) {
1099 somethingPrinted =
true;
1102 << key.propertyKind() <<
" " << key.propertyName();
1103 if (key.propertyKind() !=
"opaque") {
1104 std::string s(key.propertyValue());
1105 myReplaceAll_(s,
"typename ",
"");
1106 if (myReplaceAll_(s,
"::Ewoms::Properties::TTag::",
"TTAG("))
1108 myReplaceAll_(s,
"::Ewoms::Properties::PTag::",
"");
1109 myReplaceAll_(s,
"::Ewoms::Properties::GetProperty<",
"GET_PROP(");
1110 myReplaceAll_(s,
">::p::",
")::");
1111 myReplaceAll_(s,
"GET_PROP(TypeTag, Scalar)::type",
"Scalar");
1113 os <<
" = '" << s <<
"'";
1115 os <<
" defined at " << key.fileDefined()
1116 <<
":" << key.lineDefined()
1118 printedProperties.insert(key.propertyName());
1120 if (!somethingPrinted)
1123 std::string newIndent = indent +
" ";
1126 typedef TypeTagRegistry::SpliceList SpliceList;
1127 const SpliceList& splices = TypeTagRegistry::splices(curTypeTagName);
1128 SpliceList::const_iterator spliceIt = splices.begin();
1129 for (; spliceIt != splices.end(); ++ spliceIt) {
1130 const auto& spliceTypeTagName = PropertyRegistry::getSpliceTypeTagName(rootTypeTagName,
1131 (*spliceIt)->propertyName());
1132 print_(rootTypeTagName, spliceTypeTagName, (*spliceIt)->propertyName(), os, newIndent, printedProperties);
1136 typedef typename TypeTagRegistry::ChildrenList ChildrenList;
1137 const ChildrenList& children = TypeTagRegistry::children(curTypeTagName);
1138 ChildrenList::const_iterator ttagIt = children.begin();
1139 for (; ttagIt != children.end(); ++ttagIt) {
1140 print_(rootTypeTagName, *ttagIt,
"", os, newIndent, printedProperties);
1144 template <
class TypeTag>
1147 std::set<std::string> printedProps;
1148 print_(Dune::className<TypeTag>(), Dune::className<TypeTag>(),
"", os,
"", printedProps);
1150 #else // !defined NO_PROPERTY_INTROSPECTION 1151 template <
class TypeTag>
1155 "The eWoms property system was compiled with the macro\n" 1156 "NO_PROPERTY_INTROSPECTION defined.\n" 1157 "No diagnostic messages this time, sorry.\n";
1160 template <
class TypeTag>
1161 const std::string getDiagnostic(std::string propTagName)
1165 "The eWoms property system was compiled with the macro\n" 1166 "NO_PROPERTY_INTROSPECTION defined.\n" 1167 "No diagnostic messages this time, sorry.\n";
1171 #endif // !defined NO_PROPERTY_INTROSPECTION Definition: baseauxiliarymodule.hh:37
void printValues(std::ostream &os=std::cout)
Print values of the run-time parameters.
Definition: parametersystem.hh:547