59 typedef unsigned short int ushort;
60 typedef unsigned int uint;
61 typedef unsigned long int ulong;
63 typedef long long int llint;
64 typedef unsigned long long int ullint;
66 #define BASIC_DEPENDENCY_TEST( \
67 DEPENDENCY, DEPTYPE, NUM_DEPENDEES, NUM_DEPENDENTS) \
68 std::string depXMLTag##DEPENDENCY = \
69 DummyObjectGetter< DEPTYPE >::getDummyObject()->getTypeAttributeValue(); \
71 TEST_ASSERT(DEPENDENCY->getTypeAttributeValue() == depXMLTag##DEPENDENCY ); \
72 TEST_ASSERT(DEPENDENCY->getDependents().size() == NUM_DEPENDENTS); \
73 TEST_ASSERT(DEPENDENCY->getDependees().size() == NUM_DEPENDEES); \
75 #define VERIFY_DEPENDENT(DEPENDENCY, DEPENDENT) \
77 DEPENDENCY->getDependents().find(DEPENDENT) \
79 DEPENDENCY->getDependents().end() \
82 #define VERIFY_DEPENDEE(DEPENDENCY, DEPENDEE) \
84 DEPENDENCY->getDependees().find(DEPENDEE) \
86 DEPENDENCY->getDependees().end()); \
88 #define CREATE_DEPENDEE(POSTFIX, VALUE) \
89 RCP<ParameterEntry> dependeeParam##POSTFIX = rcp( \
90 new ParameterEntry( VALUE ));
92 #define CREATE_DEPENDENT(POSTFIX, VALUE) \
93 RCP<ParameterEntry> dependentParam##POSTFIX = \
94 rcp(new ParameterEntry( VALUE )); \
96 #define EXCEPTION_TEST_BOILERPLATE(DEPENDEE_VAL, DEPENDENT_VAL) \
97 CREATE_DEPENDEE(1, DEPENDEE_VAL); \
98 CREATE_DEPENDEE(Extra, DEPENDEE_VAL); \
99 CREATE_DEPENDENT(1, DEPENDENT_VAL); \
101 XMLParameterListWriter::EntryIDsMap writerEntryMap; \
102 writerEntryMap[dependeeParam1] = 1; \
103 writerEntryMap[dependentParam1] = 2; \
104 writerEntryMap[dependeeParamExtra] = 3; \
105 ValidatortoIDMap writerValiMap; \
107 XMLParameterListReader::EntryIDsMap readerEntryMap; \
108 readerEntryMap[1] = dependeeParam1; \
109 readerEntryMap[2] = dependentParam1; \
110 readerEntryMap[3] = dependeeParamExtra; \
111 IDtoValidatorMap readerValiMap; \
113 #define CONVERT_DEP_TO_XML(DEPENDENCY) \
114 XMLObject DEPENDENCY##XML = DependencyXMLConverterDB::convertDependency( \
115 DEPENDENCY , writerEntryMap, writerValiMap); \
117 #define TOO_MANY_DEPENDEE_TEST(DEPENDENCY) \
118 XMLObject extraDependee(DependencyXMLConverter::getDependeeTagName()); \
119 extraDependee.addAttribute<ParameterEntry::ParameterEntryID>( \
120 DependencyXMLConverter::getParameterIdAttributeName(), \
121 writerEntryMap[dependeeParamExtra]); \
122 XMLObject tooManyTempXML = DEPENDENCY##XML.deepCopy(); \
123 tooManyTempXML.addChild(extraDependee); \
126 DependencyXMLConverterDB::convertXML( \
127 tooManyTempXML , readerEntryMap, readerValiMap), \
128 TooManyDependeesException); \
130 #define COPY_DEPTAG_WITHOUT_CHILD(TAG, CHILDTAG, NEWTAG) \
131 XMLObject NEWTAG(TAG.getTag()); \
132 NEWTAG.addAttribute( \
133 DependencyXMLConverter::getTypeAttributeName(), \
134 TAG.getAttribute(DependencyXMLConverter::getTypeAttributeName())); \
135 for(int i =0; i< TAG.numChildren(); i++){ \
136 if(TAG.getChild(i).getTag() != CHILDTAG) \
138 NEWTAG.addChild(TAG.getChild(i).deepCopy()); \
143 #define INSERT_VALIDATOR_TO_MAPS(VALIDATOR) \
144 writerValiMap.insert( VALIDATOR ); \
145 readerValiMap.insert( \
146 IDtoValidatorMap::IDValidatorPair( \
147 writerValiMap.find( VALIDATOR )->second, VALIDATOR )); \
160 dependentList.insert(dependent1);
161 dependentList.insert(dependent2);
179 std::string dependee1 =
"string param";
180 std::string dependee2 =
"string param2";
181 std::string dependent1 =
"dependent param1";
182 std::string dependent2 =
"dependent param2";
185 myDepList.
set(dependee1,
"val1");
186 myDepList.
set(dependee2,
"val2");
187 myDepList.
set(dependent1, 1.0);
188 myDepList.
set(dependent2, 1.0);
199 dependentList.insert(myDepList.
getEntryRCP(dependent1));
200 dependentList.insert(myDepList.
getEntryRCP(dependent2));
202 tuple<std::string>(
"val1",
"val2");
249 castedDep1->
getValues(), basicStringVisDep->getValues());
251 castedDep2->getValues(), complexStringVisDep->getValues());
254 TEST_EQUALITY(castedDep2->getShowIf(), complexStringVisDep->getShowIf());
258 std::string dependee1 =
"bool param";
259 std::string dependee2 =
"bool param2";
260 std::string dependent1 =
"dependent param1";
261 std::string dependent2 =
"dependent param2";
264 myDepList.
set(dependee1,
true);
265 myDepList.
set(dependee2,
true);
266 myDepList.
set(dependent1, 1.0);
267 myDepList.
set(dependent2, 1.0);
275 dependentList.insert(myDepList.
getEntryRCP(dependent1));
276 dependentList.insert(myDepList.
getEntryRCP(dependent2));
327 Teuchos_Dependencies,
328 NumberVisualDepSerialization,
331 std::string dependee1 =
"num param";
332 std::string dependee2 =
"num param2";
333 std::string dependent1 =
"dependent param1";
334 std::string dependent2 =
"dependent param2";
339 myDepList.
set(dependent1,
true);
340 myDepList.
set(dependent2,
"vale");
348 dependentList.insert(myDepList.
getEntryRCP(dependent1));
349 dependentList.insert(myDepList.
getEntryRCP(dependent2));
398 TEST_EQUALITY(castedDep1->getShowIf(), simpleNumVisDep->getShowIf());
399 TEST_EQUALITY(castedDep2->getShowIf(), complexNumVisDep->getShowIf());
402 castedDep2->getFunctionObject();
408 castedFunction->getModifiyingOperand(),
409 subFunction->getModifiyingOperand());
412 #define NUMBER_VIS_TEST(T) \
413 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
414 Teuchos_Dependencies, NumberVisualDepSerialization, T)
422 std::string dependee1 =
"string param";
423 std::string dependee2 =
"bool param";
424 std::string dependee3 =
"int param";
425 std::string dependent1 =
"dependent param1";
426 std::string dependent2 =
"dependent param2";
427 std::string dependent3 =
"dependent param3";
430 myDepList.
set(dependee1,
"val1");
431 myDepList.
set(dependee2,
true);
432 myDepList.
set(dependee3, 1);
433 myDepList.
set(dependent1, 1.0);
434 myDepList.
set(dependent2, 1.0);
435 myDepList.
set(dependent3, (
float)1.0);
438 tuple<std::string>(
"steve",
"blah",
"your face");
450 tuple<RCP<const Condition> >(boolCon, numberCon);
460 dependentList.insert(myDepList.
getEntryRCP(dependent2));
461 dependentList.insert(myDepList.
getEntryRCP(dependent3));
518 simpleConVisDep->
getCondition()->getTypeAttributeValue());
519 TEST_EQUALITY(castedDep2->getCondition()->getTypeAttributeValue(),
520 complexConVisDep->
getCondition()->getTypeAttributeValue());
523 #define ArrayModifierTest(DEPENDENCYTYPE, ARRAY_TYPE) \
524 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( \
525 Teuchos_Dependencies, \
526 DEPENDENCYTYPE##_serialization_tests, \
530 std::string dependee1 = "dependee param"; \
531 std::string dependee2 = "dependee param2"; \
532 std::string dependent1 = "dependent param1"; \
533 std::string dependent2 = "dependent param2"; \
534 ParameterList myDepList("Array modifier dep list"); \
535 RCP<DependencySheet> myDepSheet = rcp(new DependencySheet); \
536 myDepList.set(dependee1, ScalarTraits<DependeeType>::one()); \
537 myDepList.set(dependee2, ScalarTraits<DependeeType>::one()); \
538 myDepList.set(dependent1, ARRAY_TYPE<DependentType>()); \
539 myDepList.set(dependent2, ARRAY_TYPE<DependentType>()); \
542 RCP<DEPENDENCYTYPE<DependeeType, DependentType> > basicArrayDep = \
543 rcp(new DEPENDENCYTYPE<DependeeType, DependentType>( \
544 myDepList.getEntryRCP(dependee1), \
545 myDepList.getEntryRCP(dependent1))); \
547 DependeeType one = ScalarTraits< DependeeType >::one(); \
548 RCP<AdditionFunction< DependeeType > > functionTester = \
549 rcp(new AdditionFunction<DependeeType>(one)); \
551 RCP<DEPENDENCYTYPE<DependeeType, DependentType> > funcArrayDep = \
552 rcp(new DEPENDENCYTYPE<DependeeType, DependentType>( \
553 myDepList.getEntryRCP(dependee2), \
554 myDepList.getEntryRCP(dependent2), \
558 myDepSheet->addDependency(basicArrayDep); \
559 myDepSheet->addDependency(funcArrayDep); \
561 RCP<DependencySheet> readInDepSheet = rcp(new DependencySheet); \
563 XMLParameterListWriter plWriter; \
564 XMLObject xmlOut = plWriter.toXML(myDepList, myDepSheet); \
565 out << xmlOut.toString(); \
567 RCP<ParameterList> readInList = \
568 writeThenReadPL(myDepList, myDepSheet, readInDepSheet); \
570 RCP<ParameterEntry> readinDependee1 = readInList->getEntryRCP(dependee1); \
571 RCP<ParameterEntry> readinDependent1 = readInList->getEntryRCP(dependent1); \
572 RCP<ParameterEntry> readinDependee2 = readInList->getEntryRCP(dependee2); \
573 RCP<ParameterEntry> readinDependent2 = readInList->getEntryRCP(dependent2); \
575 RCP<Dependency> readinDep1 = \
576 *(readInDepSheet->getDependenciesForParameter(readinDependee1)->begin()); \
577 RCP<Dependency> readinDep2 = \
578 *(readInDepSheet->getDependenciesForParameter(readinDependee2)->begin()); \
580 typedef DEPENDENCYTYPE<DependeeType, DependentType> deptype; \
581 BASIC_DEPENDENCY_TEST(readinDep1, deptype, 1, 1); \
582 VERIFY_DEPENDEE(readinDep1, readinDependee1); \
583 VERIFY_DEPENDENT(readinDep1, readinDependent1); \
585 BASIC_DEPENDENCY_TEST(readinDep2, deptype, 1, 1); \
586 VERIFY_DEPENDEE(readinDep2, readinDependee2); \
587 VERIFY_DEPENDENT(readinDep2, readinDependent2); \
589 RCP<DEPENDENCYTYPE<DependeeType, DependentType> > castedDep1 = \
590 rcp_dynamic_cast<DEPENDENCYTYPE<DependeeType, DependentType> >( \
592 TEST_ASSERT(castedDep1 != null); \
594 RCP<DEPENDENCYTYPE<DependeeType, DependentType> > castedDep2 = \
595 rcp_dynamic_cast<DEPENDENCYTYPE<DependeeType, DependentType> >( \
597 TEST_ASSERT(castedDep2 != null); \
599 RCP<const SimpleFunctionObject< DependeeType > > readInFunc = \
600 castedDep2->getFunctionObject(); \
601 TEST_ASSERT(readInFunc != null); \
603 RCP<const AdditionFunction< DependeeType > > castedFunc = \
604 rcp_dynamic_cast<const AdditionFunction< DependeeType > >(readInFunc); \
605 TEST_ASSERT(castedFunc != null); \
607 castedFunc->getModifiyingOperand(), \
608 functionTester->getModifiyingOperand()); \
613 #define NUM_ARRAY_LENGTH_TEST(DependeeType, DependentType) \
614 TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( \
615 Teuchos_Dependencies, \
616 NumberArrayLengthDependency_serialization_tests, \
624 #define NUM_ARRAY_LENGTH_TEST_GROUP(DependeeType) \
625 NUM_ARRAY_LENGTH_TEST(DependeeType, int) \
626 NUM_ARRAY_LENGTH_TEST(DependeeType, float) \
627 NUM_ARRAY_LENGTH_TEST(DependeeType, double) \
628 NUM_ARRAY_LENGTH_TEST(DependeeType, llint)
635 #define TWODROW_TEST(DependeeType, DependentType) \
636 TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( \
637 Teuchos_Dependencies, \
638 TwoDRowDependency_serialization_tests, \
646 #define TWODROW_TEST_GROUP(DependeeType) \
647 TWODROW_TEST(DependeeType, int) \
648 TWODROW_TEST(DependeeType, float) \
649 TWODROW_TEST(DependeeType, double) \
650 TWODROW_TEST(DependeeType, llint)
657 #define TWODCOL_TEST(DependeeType, DependentType) \
658 TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( \
659 Teuchos_Dependencies, \
660 TwoDColDependency_serialization_tests, \
668 #define TWODCOL_TEST_GROUP(DependeeType) \
669 TWODCOL_TEST(DependeeType, int) \
670 TWODCOL_TEST(DependeeType, float) \
671 TWODCOL_TEST(DependeeType, double) \
672 TWODCOL_TEST(DependeeType, llint)
678 std::string dependee1 =
"string param";
679 std::string dependee2 =
"string param2";
680 std::string dependent1 =
"dependent param1";
681 std::string dependent2 =
"dependent param2";
684 myDepList.
set(dependee1,
"val1");
685 myDepList.
set(dependee2,
"val2");
686 myDepList.
set(dependent1, 2.0);
687 myDepList.
set(dependent2, 3.0);
699 valuesAndValidators[
"val1"] = double1Vali;
700 valuesAndValidators[
"val2"] = double2Vali;
706 valuesAndValidators));
709 dependentList.insert(myDepList.
getEntryRCP(dependent1));
710 dependentList.insert(myDepList.
getEntryRCP(dependent2));
758 TEST_ASSERT(castedDep2->getValuesAndValidators().size() == 2);
765 double1Vali->getMax());
768 castedDep2->getValuesAndValidators().find(
"val1")->second,
true)->getMax(),
769 double1Vali->getMax());
774 double2Vali->getMax());
777 castedDep2->getValuesAndValidators().find(
"val2")->second,
true)->getMax(),
778 double2Vali->getMax());
782 castedDep2->getDefaultValidator(),
true)->getMax(),
783 defaultVali->getMax());
788 std::string dependee1 =
"bool param";
789 std::string dependee2 =
"bool param2";
790 std::string dependent1 =
"dependent param1";
791 std::string dependent2 =
"dependent param2";
794 myDepList.
set(dependee1,
true);
795 myDepList.
set(dependee2,
false);
796 myDepList.
set(dependent1, 2.0);
797 myDepList.
set(dependent2, 3.0);
817 dependentList.insert(myDepList.
getEntryRCP(dependent1));
818 dependentList.insert(myDepList.
getEntryRCP(dependent2));
867 TEST_ASSERT(castedDep2->getFalseValidator().is_null());
871 true1Vali->getMax());
875 false1Vali->getMax());
878 castedDep2->getTrueValidator(),
true)->getMax(),
879 true2Vali->getMax());
885 Teuchos_Dependencies, RangeValidatorDepSerialization, T)
887 std::string dependee1 =
"dependee param";
888 std::string dependee2 =
"dependee param2";
889 std::string dependent1 =
"dependent param1";
890 std::string dependent2 =
"dependent param2";
895 myDepList.
set(dependent1, 2.0);
896 myDepList.
set(dependent2, 3.0);
911 rangeValiMap[range1] = double1Vali;
912 rangeValiMap[range2] = double2Vali;
921 dependentList.insert(myDepList.
getEntryRCP(dependent1));
922 dependentList.insert(myDepList.
getEntryRCP(dependent2));
970 castedDep1->getRangeToValidatorMap();
982 readinMap1.find(range1)->second;
984 readinMap1.find(range2)->second;
987 range1Vali,
true)->getMax(),
988 double1Vali->getMax());
991 range2Vali,
true)->getMax(),
992 double2Vali->getMax());
995 castedDep2->getRangeToValidatorMap();
996 it = readinMap2.begin();
1005 readinMap2.find(range1)->second,
true)->getMax(),
1006 double1Vali->getMax());
1009 readinMap2.find(range2)->second,
true)->getMax(),
1010 double2Vali->getMax());
1014 castedDep2->getDefaultValidator());
1015 TEST_EQUALITY( defaultReadInVali->getMax(), defaultValidator->getMax());
1016 TEST_EQUALITY( defaultReadInVali->getMin(), defaultValidator->getMin());
1020 #define RANGE_VALIDATOR_TEST(T) \
1021 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
1022 Teuchos_Dependencies, RangeValidatorDepSerialization, T)
1035 getParametersFromXmlFile(
"MissingDependeeTag.xml", depSheet),
1038 getParametersFromXmlFile(
"MissingDependentTag.xml", depSheet),
1041 getParametersFromXmlFile(
"MissingDependee.xml", depSheet),
1044 getParametersFromXmlFile(
"MissingDependent.xml", depSheet),
1053 entryIDsMap[dependentParam] = 1;
1058 boolVisDep, entryIDsMap, validatorIDsMap),
1060 entryIDsMap.erase(dependentParam);
1061 entryIDsMap[dependeeParam] = 3;
1064 boolVisDep, entryIDsMap, validatorIDsMap),
1103 missingValuesXML, readerEntryMap, readerValiMap),
1109 Teuchos_Dependencies, ConditionVisualDepSerializationExceptions)
1123 missingConXML, readerEntryMap, readerValiMap),
1128 Teuchos_Dependencies, BoolValidatorDepSerializationExceptions)
1146 readerValiMap.erase(writerValiMap.find(trueVali)->second);
1150 boolValiDepXML, readerEntryMap, readerValiMap),
1154 writerValiMap.find(trueVali)->second, trueVali));
1155 readerValiMap.erase(writerValiMap.find(falseVali)->second);
1159 boolValiDepXML, readerEntryMap, readerValiMap),
1165 Teuchos_Dependencies, StringValidatorDepSerializationExceptions)
1173 valiMap[
"blah"] = scrapVali;
1179 dependeeParam1, dependentParam1, valiMap, scrapVali2));
1191 missingValuesXML, readerEntryMap, readerValiMap),
1194 readerValiMap.erase(writerValiMap.find(scrapVali)->second);
1198 stringValiDepXML, readerEntryMap, readerValiMap),
1202 writerValiMap.find(scrapVali)->second,scrapVali));
1203 readerValiMap.erase(writerValiMap.find(scrapVali2)->second);
1207 stringValiDepXML, readerEntryMap, readerValiMap),
1212 Teuchos_Dependencies, RangeValidatorDepSerializationExceptions)
1225 valiMap[scrapRange] = scrapVali;
1226 secondvaliMap[scrapRange] = otherScrapVali;
1227 writerValiMap.insert(scrapVali);
1228 writerValiMap.insert(otherScrapVali);
1229 writerValiMap.insert(defaultScrapVali);
1230 readerValiMap.insert(
1232 writerValiMap.find(scrapVali)->second,scrapVali));
1233 readerValiMap.insert(
1235 writerValiMap.find(otherScrapVali)->second,otherScrapVali));
1236 readerValiMap.insert(
1238 writerValiMap.find(defaultScrapVali)->second,defaultScrapVali));
1242 dependeeParam1, dependentParam1, valiMap));
1246 dependeeParam1, dependentParam1, secondvaliMap, defaultScrapVali));
1261 missingRangesXML, readerEntryMap, readerValiMap),
1264 readerValiMap.erase(writerValiMap.find(scrapVali)->second);
1268 rangeDepXML, readerEntryMap, readerValiMap),
1271 readerValiMap.erase(writerValiMap.find(defaultScrapVali)->second);
1274 rangeDefaultDepXML, readerEntryMap, readerValiMap),
1280 Teuchos_Dependencies, NumArrayLengthDepSerializationExceptions)
1285 dependeeParam1, dependentParam1));
1292 Teuchos_Dependencies, DepSheetTests)
1295 std::string dependee1 =
"dependee1";
1296 std::string dependent1 =
"dependent1";
1298 myDepList.
set(dependee1,
"val1");
1299 myDepList.
set(dependent1, 2.0);
#define COPY_DEPTAG_WITHOUT_CHILD(TAG, CHILDTAG, NEWTAG)
A Dependency sheet keeps track of dependencies between various ParameterEntries.
RCP< const ParameterEntryValidator > getDefaultValidator() const
Thrown when no dependes of a dependency can't be found when converting the dependency to or from XML...
XMLObject toXML(const ParameterList &p, RCP< const DependencySheet > depSheet=null) const
#define TEST_ASSERT(v1)
Assert the given statement is true.
static RCP< T > getDummyObject()
Retrieves a dummy object of type T.
A BoolValidatorDependency says the following about the relationship between two parameters: Dependeni...
#define INSERT_VALIDATOR_TO_MAPS(VALIDATOR)
Thrown when a StringVisualDependency is being converted from XML and no Values tag is found...
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
A database for DependencyXMLConverters.
A string visual depdencies says the following about the relationship between two elements in a Parame...
unsigned long long int ullint
A bool visual dependency says the following about the relationship between two elements in a Paramete...
An xml converter for BoolVisualDepenencies.
#define EXCEPTION_TEST_BOILERPLATE(DEPENDEE_VAL, DEPENDENT_VAL)
std::set< RCP< ParameterEntry >, RCPComp > ParameterEntryList
A list of Dependees.
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Set a parameter whose value has type T.
bool nonnull(const std::shared_ptr< T > &p)
Returns true if p.get()!=NULL.
This object is held as the "value" in the Teuchos::ParameterList std::map.
A Bool Logic Condition that returns the result or perfroming a logical AND on the conditions...
static const std::string & getXMLTagName()
#define RANGE_VALIDATOR_TEST(T)
#define TEST_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
#define TEST_THROW(code, ExceptType)
Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails)...
bool getShowIf() const
Get's the value of the showIf variable.
const ValueToValidatorMap & getValuesAndValidators() const
retrieve a const reference to the ValueToValidator map being used by this StringValidatorDependency ...
Thrown when a dependent of a dependency cant be found when converting the dependency to or from XML...
T * get() const
Get the raw C++ pointer to the underlying object.
static const std::string & getValuesAndValidatorsTag()
#define ArrayModifierTest(DEPENDENCYTYPE, ARRAY_TYPE)
#define VERIFY_DEPENDEE(DEPENDENCY, DEPENDEE)
An xml converter for RangeValidatorDependencies.
std::map< std::string, RCP< const ParameterEntryValidator > > ValueToValidatorMap
Conveniece typedef.
A Number Condition is a Parameter Condition that evaluates whether or not a number parameter is great...
#define NUMBER_VIS_TEST(T)
Simple helper functions that make it easy to read and write XML to and from a parameterlist.
This structure defines some basic traits for a scalar field type.
const ValueList & getValues() const
get the List of values the dependee will be checked against.
A RangeValidatorDependency says the following about the relationship between two parameters: Dependen...
RCP< const ParameterEntryValidator > getFalseValidator() const
Gets the false validator.
void addDependency(RCP< Dependency > dependency)
Adds a dependency to the sheet.
A simple function object that subtracts a specififed value from the given arguement in the runFunctio...
TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL(RCPNodeHandle, basicConstruct_owns_mem, T)
static const std::string & getStringValuesTagName()
Gets the StringValues Tag.
TEUCHOS_UNIT_TEST(ConstNonconstObjectContainer, create)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
Templated Parameter List class.
Thrown when no dependents of a dependency are specified when converting the dependency from XML...
const std::string & getName() const
Gets the name of the dependency sheet.
std::string toString() const
Represent this node and its children as a std::string.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
A collection of standard DependencyXMLConverters.
A String Condition is a Parameter Condition that evaluates whether or not a string parameter has take...
#define TWODROW_TEST_GROUP(DependeeType)
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
#define NUM_ARRAY_LENGTH_TEST_GROUP(DependeeType)
Thrown when the rangesAndValidators tag for the RangeValidatorDepencyConverter can't be found...
A NumberArrayLengthDependency says the following about the relationship between two parameters: The l...
A class for mapping validators to integers.
#define TWODCOL_TEST_GROUP(DependeeType)
RCP< const ParameterEntryValidator > getTrueValidator() const
Gets the true validator.
#define BASIC_DEPENDENCY_TEST(DEPENDENCY, DEPTYPE,NUM_DEPENDEES, NUM_DEPENDENTS)
A list of parameters of arbitrary type.
A collection of standard dependencies.
A Bool Condition is a Parameter Condition that evaluates whether or not a Boolean parameter is ture...
RCP< const Condition > getCondition() const
Gets the condition being used in this dependency.
#define TEST_COMPARE_ARRAYS(a1, a2)
Assert that a1.size()==a2.size() and a[i]==b[i], i=0....
DataStructure keeping track of dependencies.
XMLObject fromDependencytoXML(const RCP< const Dependency > dependency, const XMLParameterListWriter::EntryIDsMap &entryIDsMap, ValidatortoIDMap &validatorIDsMap) const
Converters a given ParameterEntryValidator to XML.
A StringValidatorDependency says the following about the relationship between two parameters: Depende...
std::pair< ParameterEntryValidator::ValidatorID, RCP< ParameterEntryValidator > > IDValidatorPair
Class uesd to validate a particular type of number.
Thrown when converting a StrinvValidatorDependcny from XML and no valuesAndValidators tag is found...
#define VERIFY_DEPENDENT(DEPENDENCY, DEPENDENT)
Smart reference counting pointer class for automatic garbage collection.
A condition visual dependency says the following about the relationship between elements in a Paramet...
#define CONVERT_DEP_TO_XML(DEPENDENCY)
Thrown when converting a dependency that has validaotrs to and from XML. This excetpion indicates tha...
std::pair< T, T > Range
Convenience typedef.
static RCP< Dependency > convertXML(const XMLObject &xmlObject, const XMLParameterListReader::EntryIDsMap &entryIDsMap, const IDtoValidatorMap &validatorIDsMap)
Given an XMLObject converts the XMLObject to a Dependency.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
Thrown when no condtion tag is found when converting a ConditionVisualDependency from XML...
A number visual dependency says the following about the relationship between two elements in a Parame...
static T one()
Returns representation of one for this scalar type.
std::map< Range, RCP< const ParameterEntryValidator > > RangeToValidatorMap
Convenience typedef.
Standard Conditions to be used.
#define TOO_MANY_DEPENDEE_TEST(DEPENDENCY)
Thrown when no dependess of a dependency are specified when converting the dependency from XML...
RCP< const DepSet > getDependenciesForParameter(RCP< const ParameterEntry > dependee) const
Returns a set of all the dependencies associated with a particular dependee. If no dependencies with ...
Writes a ParameterList to an XML object.