Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_StandardDependencies.hpp
Go to the documentation of this file.
1// @HEADER
2// ***********************************************************************
3//
4// Teuchos: Common Tools Package
5// Copyright (2004) Sandia Corporation
6//
7// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8// license for use of this work by or on behalf of the U.S. Government.
9//
10// Redistribution and use in source and binary forms, with or without
11// modification, are permitted provided that the following conditions are
12// met:
13//
14// 1. Redistributions of source code must retain the above copyright
15// notice, this list of conditions and the following disclaimer.
16//
17// 2. Redistributions in binary form must reproduce the above copyright
18// notice, this list of conditions and the following disclaimer in the
19// documentation and/or other materials provided with the distribution.
20//
21// 3. Neither the name of the Corporation nor the names of the
22// contributors may be used to endorse or promote products derived from
23// this software without specific prior written permission.
24//
25// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36//
37// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38//
39// ***********************************************************************
40// @HEADER
41
42
43
44#ifndef TEUCHOS_STANDARDDEPENDCIES_HPP_
45#define TEUCHOS_STANDARDDEPENDCIES_HPP_
46
51#include "Teuchos_Dependency.hpp"
52#include "Teuchos_StandardParameterEntryValidators.hpp"
54#include "Teuchos_StandardFunctionObjects.hpp"
57
58
59namespace Teuchos{
60
61
72class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT VisualDependency : public Dependency{
73
74public:
75
77 static const bool& getShowIfDefaultValue(){
78 static const bool SHOW_IF_DEFAULT_VALUE = true;
80 }
81
82
85
97 bool showIf=getShowIfDefaultValue());
98
110 bool showIf=getShowIfDefaultValue());
111
123 bool showIf=getShowIfDefaultValue());
124
136 bool showIf=getShowIfDefaultValue());
137
139
141
142
149 virtual bool getDependeeState() const = 0;
150
154 bool isDependentVisible() const;
155
157 bool getShowIf() const;
158
160
163
165 void evaluate();
166
168
169private:
170
173
177 bool dependentVisible_;
178
183 bool showIf_;
184
186
187};
188
192class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT ValidatorDependency : public Dependency{
193
194public:
195
198
208
218
220
223
225 virtual void evaluate() = 0;
226
228
229};
230
244class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT StringVisualDependency : public VisualDependency{
245
246public:
247
250
255
257
260
277 std::string value,
278 bool showIf=true);
279
296 const ValueList& values,
297 bool showIf=true);
298
315 const std::string& value,
316 bool showIf=true);
317
335 const ValueList& values,
336 bool showIf=true);
337
339
342
344 const ValueList& getValues() const;
345
347
350
352 bool getDependeeState() const;
353
355
358
360 std::string getTypeAttributeValue() const;
361
363
364protected:
365
368
370 void validateDep() const;
371
373
374private:
375
378
382 const ValueList values_;
383
385
386};
387
388
394template<>
395class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT DummyObjectGetter<StringVisualDependency>{
396
397public:
398
401
405 static RCP<StringVisualDependency> getDummyObject();
406
408
409};
410
411
425class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT BoolVisualDependency : public VisualDependency{
426
427public:
428
431
444 bool showIf=true);
445
458 bool showIf=true);
459
461
464
466 bool getDependeeState() const;
467
469
472
474 std::string getTypeAttributeValue() const;
475
477
478protected:
479
482
484 void validateDep() const;
485
487
488};
489
490
496template<>
497class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT DummyObjectGetter<BoolVisualDependency>{
498
499public:
500
503
507 static RCP<BoolVisualDependency> getDummyObject();
508
510
511};
512
529class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT ConditionVisualDependency : public VisualDependency{
530
531public:
532
535
550 bool showIf=true);
551
565 bool showIf=true);
566
568
571
573 RCP<const Condition> getCondition() const;
574
577
579 bool getDependeeState() const;
580
582
585
587 std::string getTypeAttributeValue() const;
588
590
591protected:
592
595
597 void validateDep() const {}
598
600
601
602private:
603
606
610 RCP<const Condition> condition_;
611
613
614};
615
616
622template<>
623class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT DummyObjectGetter<ConditionVisualDependency>{
624
625public:
626
629
632 static RCP<ConditionVisualDependency> getDummyObject();
633
635
636};
637
638
659template <class T>
661
662public:
663
666
690 bool showIf=true,
692
716 bool showIf=true,
718
720
723
724 bool getDependeeState() const;
725
727
730
732 std::string getTypeAttributeValue() const;
733
735
738
741
743
744protected:
745
748
750 void validateDep() const;
751
753
754private:
755
758
764
766 //
767};
768
769template<class T>
780
781template<class T>
792
793template<class T>
795 T value = getFirstDependeeValue<T>();
796 if(!func_.is_null()){
797 value = func_->runFunction(value);
798 }
799 return value > ScalarTraits<T>::zero() ? true : false;
800}
801
802template<class T>
804 return "NumberVisualDependency(" + TypeNameTraits<T>::name() + ")";
805}
806
807template<class T>
810{
811 return func_.getConst();
812}
813
814template<class T>
816 RCP<const ParameterEntry> dependee = getFirstDependee();
818 !dependee->isType<T>(),
820 "The dependee of a " <<
821 "Number Visual Dependency must the same type as the dependency's " <<
822 "template type!" << std::endl <<
823 "Type Encountered: " << dependee->getAny().typeName() << std::endl <<
824 "Template Type: " << TypeNameTraits<T>::name() << std::endl <<
825 std::endl);
826}
827
828
834template<class T>
836
837public:
838
841
846
848
849};
850
851template<class T>
859
864template<class DependeeType, class DependentType>
866public:
867
870
882
894
896
899
908 {
909 return func_;
910 }
911
913
916
918 virtual void evaluate();
919
920protected:
921
923 virtual void validateDep() const;
924
926
929
937 virtual void modifyArray(
940
948 virtual std::string getBadDependentValueErrorMessage() const=0;
949
951private:
952
955
960
961 //}
962};
963
964template<class DependeeType, class DependentType>
972
973template<class DependeeType, class DependentType>
981
982template<class DependeeType, class DependentType>
985 typeid(DependeeType) != getFirstDependee()->getAny().type(),
987 "Ay no! The dependee parameter types don't match." << std::endl <<
988 "Dependee Template Type: " << TypeNameTraits<DependeeType>::name() <<
989 std::endl <<
990 "Dependee Parameter Type: " << getFirstDependee()->getAny().typeName()
991 << std::endl << std::endl);
992}
993
994template<class DependeeType, class DependentType>
996 DependeeType newAmount = Dependency::getFirstDependeeValue<DependeeType>();
997 if(!this->getFunctionObject().is_null()){
998 newAmount = this->getFunctionObject()->runFunction(newAmount);
999 }
1000
1003 getBadDependentValueErrorMessage());
1004
1005 for(
1006 Dependency::ParameterEntryList::iterator it = this->getDependents().begin();
1007 it != this->getDependents().end();
1008 ++it)
1009 {
1010 modifyArray(newAmount, *it);
1011 }
1012}
1013
1014
1037template<class DependeeType, class DependentType>
1039 public ArrayModifierDependency<DependeeType, DependentType>
1040{
1041
1042public:
1043
1046
1059
1072
1074
1077
1079 std::string getTypeAttributeValue() const;
1080
1082
1083protected:
1084
1087
1088 virtual void validateDep() const;
1089
1091 void modifyArray(
1093
1095 std::string getBadDependentValueErrorMessage() const;
1096
1098
1099};
1100
1101template<class DependeeType, class DependentType>
1110
1111template<class DependeeType, class DependentType>
1120
1121
1122template<class DependeeType, class DependentType>
1123std::string
1131
1132template <class DependeeType, class DependentType>
1133void
1152
1153template<class DependeeType, class DependentType>
1154std::string
1156 std::ostringstream os;
1157 os <<
1158 "Ruh Roh Shaggy! Looks like a dependency tried to set the length "
1159 "of the Array(s) to a negative number. Silly. You can't have "
1160 "an Array with a negative length!" << std::endl << std::endl <<
1161 "Error:" << std::endl <<
1162 "An attempt was made to set the length of an Array to a negative "
1163 "number by a NumberArrayLengthDependency" << std::endl << std::endl;
1164 return os.str();
1165}
1166
1167template<class DependeeType, class DependentType>
1168void
1170 const
1171{
1173 for(
1174 Dependency::ConstParameterEntryList::const_iterator it =
1175 this->getDependents().begin();
1176 it != this->getDependents().end();
1177 ++it)
1178 {
1180 typeid(Teuchos::Array<DependentType>) != (*it)->getAny().type(),
1182 "Ay no! The dependent parameter types don't match." << std::endl <<
1183 "Dependent Template Type: " <<
1184 TypeNameTraits<DependentType>::name() << std::endl <<
1185 "Dependent Parameter Type: " <<
1186 (*it)->getAny().typeName() << std::endl << std::endl);
1187 }
1188}
1189
1195template<class DependeeType, class DependentType>
1212
1213template<class DependeeType, class DependentType>
1222
1247class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT StringValidatorDependency : public ValidatorDependency{
1248
1249public:
1250
1253
1257 typedef std::map<std::string, RCP<const ParameterEntryValidator> >
1259
1263 typedef std::pair<std::string, RCP<const ParameterEntryValidator> >
1265
1267
1270
1289
1308
1310
1313
1316 const ValueToValidatorMap& getValuesAndValidators() const;
1317
1319 RCP<const ParameterEntryValidator> getDefaultValidator() const;
1320
1322
1325
1327 void evaluate();
1328
1330
1333
1335 std::string getTypeAttributeValue() const;
1336
1338
1339protected:
1340
1343
1344 void validateDep() const;
1345
1347
1348private:
1349
1352
1357 ValueToValidatorMap valuesAndValidators_;
1358
1364 RCP<ParameterEntryValidator> defaultValidator_;
1365
1367
1368};
1369
1370
1376template<>
1377class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT DummyObjectGetter<StringValidatorDependency>{
1378
1379public:
1380
1383
1386 static RCP<StringValidatorDependency > getDummyObject();
1387
1389
1390};
1391
1407class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT BoolValidatorDependency : public ValidatorDependency{
1408
1409public:
1410
1413
1429
1445
1447
1450
1451 void evaluate();
1452
1454
1457
1459 RCP<const ParameterEntryValidator> getTrueValidator() const;
1460
1462 RCP<const ParameterEntryValidator> getFalseValidator() const;
1463
1465
1468
1470 std::string getTypeAttributeValue() const;
1471
1473
1474protected:
1475
1478
1479 void validateDep() const;
1480
1482
1483private:
1484
1487
1492 RCP<const ParameterEntryValidator> trueValidator_, falseValidator_;
1493
1495
1496};
1497
1503template<>
1504class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT DummyObjectGetter<BoolValidatorDependency>{
1505
1506public:
1507
1510
1512 static RCP<BoolValidatorDependency > getDummyObject();
1513
1515
1516};
1517
1547template<class T>
1549
1550public:
1551
1554
1558 typedef std::pair<T,T> Range;
1559
1563 typedef std::map<Range, RCP<const ParameterEntryValidator> >
1565
1569 typedef std::pair<Range, RCP<const ParameterEntryValidator> >
1571
1573
1576
1595
1614
1616
1619
1622 return rangesAndValidators_;
1623 }
1624
1627 return defaultValidator_;
1628 }
1629
1631
1634
1636 void evaluate();
1637
1639
1642
1644 std::string getTypeAttributeValue() const;
1645
1647
1648protected:
1649
1652
1654 void validateDep() const;
1655
1657
1658
1659private:
1660
1663
1667 RangeToValidatorMap rangesAndValidators_;
1668
1669 void setDependentsToValidator(RCP<const ParameterEntryValidator> toSet);
1670
1671 RCP<const ParameterEntryValidator> defaultValidator_;
1672
1674
1675};
1676
1677template<class T>
1689
1690template<class T>
1702
1703template<class T>
1705{
1706 return "RangeValidatorDependency(" + TypeNameTraits<T>::name() + ")";
1707}
1708
1709
1710template<class T>
1712 typename RangeToValidatorMap::const_iterator it;
1714 for(
1715 it = rangesAndValidators_.begin();
1716 it != rangesAndValidators_.end();
1717 ++it)
1718 {
1719 T min = it->first.first;
1720 T max = it->first.second;
1721 if(dependeeValue >= min && dependeeValue <max){
1722 setDependentsToValidator(it->second);
1723 return;
1724 }
1725 }
1726 setDependentsToValidator(defaultValidator_);
1727}
1728
1729template<class T>
1731 RCP<const ParameterEntry> dependee = getFirstDependee();
1732 TEUCHOS_TEST_FOR_EXCEPTION(dependee->getAny().type() != typeid(T),
1734 "The dependee of a RangeValidatorDependency must be the same type as " <<
1735 "The RangeValidatorDependency template type!" << std::endl <<
1736 "Dependee Type: " << dependee->getAny().typeName() << std::endl <<
1737 "Templated Type: " << TypeNameTraits<T>::name() << std::endl << std::endl);
1738
1740 rangesAndValidators_.size() < 1,
1742 "The rangesAndValidators map RangeValidatorDependency "
1743 "must have at least one entry!" << std::endl << std::endl);
1744
1745 typename RangeToValidatorMap::const_iterator it =
1746 rangesAndValidators_.begin();
1748 // getting the raw pointer avoids a Clang warning about side effects in typeid
1750 ++it;
1751 for(; it!=rangesAndValidators_.end(); ++it){
1752 TEUCHOS_TEST_FOR_EXCEPTION( typeid(*rawValidatorPtr) != typeid(*(it->second)),
1754 "Ay no! All of the validators in a RangeValidatorDependency "
1755 "must have the same type.");
1757 it->first.first > it->first.second,
1759 "The Range " << it->first.first << " to " << it->first.second <<
1760 " is invalid. The min can't be greater than the max, you silly goose!"
1761 );
1762 }
1763
1765 nonnull(defaultValidator_)
1766 &&
1767 typeid(*rawValidatorPtr) != typeid(*defaultValidator_),
1769 "Ay no! The default validator of a RangeValidatorDependency "
1770 "must have the same type as the validators in rangesAndValidators map."
1771 );
1772
1773}
1774
1775template<class T>
1778{
1779 typename ParameterEntryList::const_iterator it;
1780 for(
1781 it = getDependents().begin();
1782 it != getDependents().end();
1783 ++it)
1784 {
1785 (*it)->setValidator(toSet);
1786 }
1787}
1788
1794template<class T>
1796
1797public:
1798
1801
1806
1808
1809};
1810
1811template<class T>
1827
1832template<class DependeeType, class DependentType>
1834 public ArrayModifierDependency<DependeeType, DependentType>
1835{
1836
1837public:
1838
1841
1859
1860
1878
1880
1881protected:
1882
1885
1886 virtual void validateDep() const;
1887
1889
1890};
1891
1892template<class DependeeType, class DependentType>
1893void
1895 const
1896{
1898 for(
1899 Dependency::ConstParameterEntryList::const_iterator it =
1900 this->getDependents().begin();
1901 it != this->getDependents().end();
1902 ++it)
1903 {
1905 typeid(Teuchos::TwoDArray<DependentType>) != (*it)->getAny().type(),
1907 "Ay no! The dependent parameter types don't match." << std::endl <<
1908 "Dependent Template Type: " <<
1909 TypeNameTraits<DependentType>::name() << std::endl <<
1910 "Dependent Parameter Type: " <<
1911 (*it)->getAny().typeName() << std::endl << std::endl);
1912 }
1913}
1914
1915
1923template<class DependeeType, class DependentType>
1925 public TwoDArrayModifierDependency<DependeeType, DependentType>
1926{
1927
1928public:
1929
1932
1945
1946
1959
1961
1964
1966 std::string getTypeAttributeValue() const;
1967
1969
1970protected:
1971
1974
1976 void modifyArray(
1978
1980 std::string getBadDependentValueErrorMessage() const;
1982
1983};
1984
1985template<class DependeeType, class DependentType>
1995
1996template<class DependeeType, class DependentType>
2006
2007
2008template<class DependeeType, class DependentType>
2009std::string
2017
2018template <class DependeeType, class DependentType>
2019void
2030
2031template<class DependeeType, class DependentType>
2032std::string
2034 std::ostringstream os;
2035 os <<
2036 "Ruh Roh Shaggy! Looks like a dependency tried to set the number of "
2037 "rows in TwoDArray(s) to a negative number. Silly. You can't have "
2038 "a TwoDArray with a negative number of rows!" << std::endl << std::endl <<
2039 "Error:" << std::endl <<
2040 "An attempt was made to set the number of rows of a TwoDArray to a negative "
2041 "number by a TwoDRowDependency" << std::endl << std::endl;
2042 return os.str();
2043}
2044
2050template<class DependeeType, class DependentType>
2067
2068template<class DependeeType, class DependentType>
2077
2078
2086template<class DependeeType, class DependentType>
2088 public TwoDArrayModifierDependency<DependeeType, DependentType>
2089{
2090
2091public:
2092
2095
2108
2109
2122
2124
2127
2129 std::string getTypeAttributeValue() const;
2130
2132
2133protected:
2134
2137
2139 void modifyArray(
2141
2143 std::string getBadDependentValueErrorMessage() const;
2145
2146};
2147
2148template<class DependeeType, class DependentType>
2158
2159template<class DependeeType, class DependentType>
2169
2170
2171template<class DependeeType, class DependentType>
2172std::string
2180
2181template <class DependeeType, class DependentType>
2182void
2193
2194template<class DependeeType, class DependentType>
2195std::string
2197 std::ostringstream os;
2198 os <<
2199 "Ruh Roh Shaggy! Looks like a dependency tried to set the number of "
2200 "cols in TwoDArray(s) to a negative number. Silly. You can't have "
2201 "a TwoDArray with a negative number of cols!" << std::endl << std::endl <<
2202 "Error:" << std::endl <<
2203 "An attempt was made to set the number of columns of a TwoDArrayArray to a negative "
2204 "number by a TwoDColDependency" << std::endl << std::endl;
2205 return os.str();
2206}
2207
2213template<class DependeeType, class DependentType>
2230
2231template<class DependeeType, class DependentType>
2240
2241
2242
2243} //namespace Teuchos
2244#endif //TEUCHOS_STANDARDDEPENDCIES_HPP_
Defines basic traits for the ordinal field type.
Defines basic traits for the scalar field type.
Standard Conditions to be used.
An abstract base class for all dependencies which modify the dimensional attributes of an Array param...
ArrayModifierDependency(RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent, RCP< const SimpleFunctionObject< DependeeType > > func=null)
Constructs an ArrayModifierDependency.
virtual void modifyArray(DependeeType newAmount, RCP< ParameterEntry > dependentToModify)=0
Modifies a particular attribute of the array according to the specific semantics of the dependency.
virtual std::string getBadDependentValueErrorMessage() const =0
Returns the error message that should be displayed if the dependent has taken on a value that,...
RCP< const SimpleFunctionObject< DependeeType > > getFunctionObject() const
Retrieves the function being used to calculate the amount by which an arrays dimensional attribute sh...
A BoolValidatorDependency says the following about the relationship between two parameters: Dependeni...
A bool visual dependency says the following about the relationship between two elements in a Paramete...
A condition visual dependency says the following about the relationship between elements in a Paramet...
This class represents a depndency between elements in a Parameter List.
std::set< RCP< ParameterEntry >, RCPComp > ParameterEntryList
A list of Dependees.
std::set< RCP< const ParameterEntry >, RCPConstComp > ConstParameterEntryList
A list of dependents.
Class for retrieving a dummy object of type T.
static RCP< T > getDummyObject()
Retrieves a dummy object of type T.
A NumberArrayLengthDependency says the following about the relationship between two parameters: The l...
NumberArrayLengthDependency(RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent, RCP< const SimpleFunctionObject< DependeeType > > func=null)
Constructs a NumberArrayLengthDependency.
void modifyArray(DependeeType newAmount, RCP< ParameterEntry > dependentToModify)
.
A number visual dependency says the following about the relationship between two elements in a Parame...
bool getDependeeState() const
Get the state of the dependee in order to evaluate the dependency.
NumberVisualDependency(RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent, bool showIf=true, RCP< SimpleFunctionObject< T > > func=null)
Constructs a NumberVisualDependency.
RCP< const SimpleFunctionObject< T > > getFunctionObject() const
Const version of function getter.
Abstract interface for an object that can validate a ParameterEntry's value.
This object is held as the "value" in the Teuchos::ParameterList std::map.
Smart reference counting pointer class for automatic garbage collection.
RCP< const T > getConst() const
Return an RCP<const T> version of *this.
RCP(ENull null_arg=null)
Initialize RCP<T> to NULL.
bool is_null() const
Returns true if the underlying pointer is null.
bool nonnull(const RCP< T > &p)
Returns true if p.get()!=NULL.
T * get() const
Get the raw C++ pointer to the underlying object.
A RangeValidatorDependency says the following about the relationship between two parameters: Dependen...
std::pair< Range, RCP< const ParameterEntryValidator > > RangeValidatorPair
Convenience typedef.
const RangeToValidatorMap & getRangeToValidatorMap() const
RangeValidatorDependency(RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent, RangeToValidatorMap rangesAndValidators, RCP< const ParameterEntryValidator > defaultValidator=null)
Constructs a RangeValidatorDependency.
RCP< const ParameterEntryValidator > getDefaultValidator() const
std::map< Range, RCP< const ParameterEntryValidator > > RangeToValidatorMap
Convenience typedef.
std::pair< T, T > Range
Convenience typedef.
A StringValidatorDependency says the following about the relationship between two parameters: Depende...
std::pair< std::string, RCP< const ParameterEntryValidator > > ValueToValidatorPair
Conveniece typedef.
std::map< std::string, RCP< const ParameterEntryValidator > > ValueToValidatorMap
Conveniece typedef.
A string visual depdencies says the following about the relationship between two elements in a Parame...
A dependency in which some attribute of a TwoDArray in a parameter depends on the value of another pa...
TwoDArrayModifierDependency(RCP< const ParameterEntry > dependee, Dependency::ParameterEntryList dependents, RCP< const SimpleFunctionObject< DependeeType > > func=null)
Constructs a TwoDArrayModifierDependency.
TwoDArrayModifierDependency(RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent, RCP< const SimpleFunctionObject< DependeeType > > func=null)
Constructs a TwoDArrayModifierDependency.
A dependency in which the number of rows in a parameter with a TwoDArray depends on the value of anot...
TwoDColDependency(RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent, RCP< const SimpleFunctionObject< DependeeType > > func=null)
Constructs a TwoDColDependency.
void modifyArray(DependeeType newAmount, RCP< ParameterEntry > dependentToModify)
A dependency in which the number of rows in a parameter with a TwoDArray depends on the value of anot...
void modifyArray(DependeeType newAmount, RCP< ParameterEntry > dependentToModify)
TwoDRowDependency(RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent, RCP< const SimpleFunctionObject< DependeeType > > func=null)
Constructs a TwoDRowDependency.
Default traits class that just returns typeid(T).name().
An abstract base class for all validator dependencies.
An abstract parent class for all visual dependencies.
virtual bool getDependeeState() const =0
Get the state of the dependee in order to evaluate the dependency.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
std::string typeName(const T &t)
Template function for returning the concrete type name of a passed-in object.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
This structure defines some basic traits for the ordinal field type.
This structure defines some basic traits for a scalar field type.
static T zero()
Returns representation of zero for this scalar type.