27 typedef unsigned short int ushort;
28 typedef unsigned int uint;
29 typedef unsigned long int ulong;
31 typedef long long int llint;
32 typedef unsigned long long int ullint;
34 #define BASIC_DEPENDENCY_TEST( \
35 DEPENDENCY, DEPTYPE, NUM_DEPENDEES, NUM_DEPENDENTS) \
36 std::string depXMLTag##DEPENDENCY = \
37 DummyObjectGetter< DEPTYPE >::getDummyObject()->getTypeAttributeValue(); \
39 TEST_ASSERT(DEPENDENCY->getTypeAttributeValue() == depXMLTag##DEPENDENCY ); \
40 TEST_ASSERT(DEPENDENCY->getDependents().size() == NUM_DEPENDENTS); \
41 TEST_ASSERT(DEPENDENCY->getDependees().size() == NUM_DEPENDEES); \
43 #define VERIFY_DEPENDENT(DEPENDENCY, DEPENDENT) \
45 DEPENDENCY->getDependents().find(DEPENDENT) \
47 DEPENDENCY->getDependents().end() \
50 #define VERIFY_DEPENDEE(DEPENDENCY, DEPENDEE) \
52 DEPENDENCY->getDependees().find(DEPENDEE) \
54 DEPENDENCY->getDependees().end()); \
56 #define CREATE_DEPENDEE(POSTFIX, VALUE) \
57 RCP<ParameterEntry> dependeeParam##POSTFIX = rcp( \
58 new ParameterEntry( VALUE ));
60 #define CREATE_DEPENDENT(POSTFIX, VALUE) \
61 RCP<ParameterEntry> dependentParam##POSTFIX = \
62 rcp(new ParameterEntry( VALUE )); \
64 #define EXCEPTION_TEST_BOILERPLATE(DEPENDEE_VAL, DEPENDENT_VAL) \
65 CREATE_DEPENDEE(1, DEPENDEE_VAL); \
66 CREATE_DEPENDEE(Extra, DEPENDEE_VAL); \
67 CREATE_DEPENDENT(1, DEPENDENT_VAL); \
69 XMLParameterListWriter::EntryIDsMap writerEntryMap; \
70 writerEntryMap[dependeeParam1] = 1; \
71 writerEntryMap[dependentParam1] = 2; \
72 writerEntryMap[dependeeParamExtra] = 3; \
73 ValidatortoIDMap writerValiMap; \
75 XMLParameterListReader::EntryIDsMap readerEntryMap; \
76 readerEntryMap[1] = dependeeParam1; \
77 readerEntryMap[2] = dependentParam1; \
78 readerEntryMap[3] = dependeeParamExtra; \
79 IDtoValidatorMap readerValiMap; \
81 #define CONVERT_DEP_TO_XML(DEPENDENCY) \
82 XMLObject DEPENDENCY##XML = DependencyXMLConverterDB::convertDependency( \
83 DEPENDENCY , writerEntryMap, writerValiMap); \
85 #define TOO_MANY_DEPENDEE_TEST(DEPENDENCY) \
86 XMLObject extraDependee(DependencyXMLConverter::getDependeeTagName()); \
87 extraDependee.addAttribute<ParameterEntry::ParameterEntryID>( \
88 DependencyXMLConverter::getParameterIdAttributeName(), \
89 writerEntryMap[dependeeParamExtra]); \
90 XMLObject tooManyTempXML = DEPENDENCY##XML.deepCopy(); \
91 tooManyTempXML.addChild(extraDependee); \
94 DependencyXMLConverterDB::convertXML( \
95 tooManyTempXML , readerEntryMap, readerValiMap), \
96 TooManyDependeesException); \
98 #define COPY_DEPTAG_WITHOUT_CHILD(TAG, CHILDTAG, NEWTAG) \
99 XMLObject NEWTAG(TAG.getTag()); \
100 NEWTAG.addAttribute( \
101 DependencyXMLConverter::getTypeAttributeName(), \
102 TAG.getAttribute(DependencyXMLConverter::getTypeAttributeName())); \
103 for(int i =0; i< TAG.numChildren(); i++){ \
104 if(TAG.getChild(i).getTag() != CHILDTAG) \
106 NEWTAG.addChild(TAG.getChild(i).deepCopy()); \
111 #define INSERT_VALIDATOR_TO_MAPS(VALIDATOR) \
112 writerValiMap.insert( VALIDATOR ); \
113 readerValiMap.insert( \
114 IDtoValidatorMap::IDValidatorPair( \
115 writerValiMap.find( VALIDATOR )->second, VALIDATOR )); \
128 dependentList.insert(dependent1);
129 dependentList.insert(dependent2);
147 std::string dependee1 =
"string param";
148 std::string dependee2 =
"string param2";
149 std::string dependent1 =
"dependent param1";
150 std::string dependent2 =
"dependent param2";
153 myDepList.
set(dependee1,
"val1");
154 myDepList.
set(dependee2,
"val2");
155 myDepList.
set(dependent1, 1.0);
156 myDepList.
set(dependent2, 1.0);
167 dependentList.insert(myDepList.
getEntryRCP(dependent1));
168 dependentList.insert(myDepList.
getEntryRCP(dependent2));
170 tuple<std::string>(
"val1",
"val2");
217 castedDep1->
getValues(), basicStringVisDep->getValues());
219 castedDep2->getValues(), complexStringVisDep->getValues());
222 TEST_EQUALITY(castedDep2->getShowIf(), complexStringVisDep->getShowIf());
226 std::string dependee1 =
"bool param";
227 std::string dependee2 =
"bool param2";
228 std::string dependent1 =
"dependent param1";
229 std::string dependent2 =
"dependent param2";
232 myDepList.
set(dependee1,
true);
233 myDepList.
set(dependee2,
true);
234 myDepList.
set(dependent1, 1.0);
235 myDepList.
set(dependent2, 1.0);
243 dependentList.insert(myDepList.
getEntryRCP(dependent1));
244 dependentList.insert(myDepList.
getEntryRCP(dependent2));
295 Teuchos_Dependencies,
296 NumberVisualDepSerialization,
299 std::string dependee1 =
"num param";
300 std::string dependee2 =
"num param2";
301 std::string dependent1 =
"dependent param1";
302 std::string dependent2 =
"dependent param2";
307 myDepList.
set(dependent1,
true);
308 myDepList.
set(dependent2,
"vale");
316 dependentList.insert(myDepList.
getEntryRCP(dependent1));
317 dependentList.insert(myDepList.
getEntryRCP(dependent2));
366 TEST_EQUALITY(castedDep1->getShowIf(), simpleNumVisDep->getShowIf());
367 TEST_EQUALITY(castedDep2->getShowIf(), complexNumVisDep->getShowIf());
370 castedDep2->getFunctionObject();
376 castedFunction->getModifiyingOperand(),
377 subFunction->getModifiyingOperand());
380 #define NUMBER_VIS_TEST(T) \
381 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
382 Teuchos_Dependencies, NumberVisualDepSerialization, T)
390 std::string dependee1 =
"string param";
391 std::string dependee2 =
"bool param";
392 std::string dependee3 =
"int param";
393 std::string dependent1 =
"dependent param1";
394 std::string dependent2 =
"dependent param2";
395 std::string dependent3 =
"dependent param3";
398 myDepList.
set(dependee1,
"val1");
399 myDepList.
set(dependee2,
true);
400 myDepList.
set(dependee3, 1);
401 myDepList.
set(dependent1, 1.0);
402 myDepList.
set(dependent2, 1.0);
403 myDepList.
set(dependent3, (
float)1.0);
406 tuple<std::string>(
"steve",
"blah",
"your face");
418 tuple<RCP<const Condition> >(boolCon, numberCon);
428 dependentList.insert(myDepList.
getEntryRCP(dependent2));
429 dependentList.insert(myDepList.
getEntryRCP(dependent3));
486 simpleConVisDep->
getCondition()->getTypeAttributeValue());
487 TEST_EQUALITY(castedDep2->getCondition()->getTypeAttributeValue(),
488 complexConVisDep->
getCondition()->getTypeAttributeValue());
491 #define ArrayModifierTest(DEPENDENCYTYPE, ARRAY_TYPE) \
492 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( \
493 Teuchos_Dependencies, \
494 DEPENDENCYTYPE##_serialization_tests, \
498 std::string dependee1 = "dependee param"; \
499 std::string dependee2 = "dependee param2"; \
500 std::string dependent1 = "dependent param1"; \
501 std::string dependent2 = "dependent param2"; \
502 ParameterList myDepList("Array modifier dep list"); \
503 RCP<DependencySheet> myDepSheet = rcp(new DependencySheet); \
504 myDepList.set(dependee1, ScalarTraits<DependeeType>::one()); \
505 myDepList.set(dependee2, ScalarTraits<DependeeType>::one()); \
506 myDepList.set(dependent1, ARRAY_TYPE<DependentType>()); \
507 myDepList.set(dependent2, ARRAY_TYPE<DependentType>()); \
510 RCP<DEPENDENCYTYPE<DependeeType, DependentType> > basicArrayDep = \
511 rcp(new DEPENDENCYTYPE<DependeeType, DependentType>( \
512 myDepList.getEntryRCP(dependee1), \
513 myDepList.getEntryRCP(dependent1))); \
515 DependeeType one = ScalarTraits< DependeeType >::one(); \
516 RCP<AdditionFunction< DependeeType > > functionTester = \
517 rcp(new AdditionFunction<DependeeType>(one)); \
519 RCP<DEPENDENCYTYPE<DependeeType, DependentType> > funcArrayDep = \
520 rcp(new DEPENDENCYTYPE<DependeeType, DependentType>( \
521 myDepList.getEntryRCP(dependee2), \
522 myDepList.getEntryRCP(dependent2), \
526 myDepSheet->addDependency(basicArrayDep); \
527 myDepSheet->addDependency(funcArrayDep); \
529 RCP<DependencySheet> readInDepSheet = rcp(new DependencySheet); \
531 XMLParameterListWriter plWriter; \
532 XMLObject xmlOut = plWriter.toXML(myDepList, myDepSheet); \
533 out << xmlOut.toString(); \
535 RCP<ParameterList> readInList = \
536 writeThenReadPL(myDepList, myDepSheet, readInDepSheet); \
538 RCP<ParameterEntry> readinDependee1 = readInList->getEntryRCP(dependee1); \
539 RCP<ParameterEntry> readinDependent1 = readInList->getEntryRCP(dependent1); \
540 RCP<ParameterEntry> readinDependee2 = readInList->getEntryRCP(dependee2); \
541 RCP<ParameterEntry> readinDependent2 = readInList->getEntryRCP(dependent2); \
543 RCP<Dependency> readinDep1 = \
544 *(readInDepSheet->getDependenciesForParameter(readinDependee1)->begin()); \
545 RCP<Dependency> readinDep2 = \
546 *(readInDepSheet->getDependenciesForParameter(readinDependee2)->begin()); \
548 typedef DEPENDENCYTYPE<DependeeType, DependentType> deptype; \
549 BASIC_DEPENDENCY_TEST(readinDep1, deptype, 1, 1); \
550 VERIFY_DEPENDEE(readinDep1, readinDependee1); \
551 VERIFY_DEPENDENT(readinDep1, readinDependent1); \
553 BASIC_DEPENDENCY_TEST(readinDep2, deptype, 1, 1); \
554 VERIFY_DEPENDEE(readinDep2, readinDependee2); \
555 VERIFY_DEPENDENT(readinDep2, readinDependent2); \
557 RCP<DEPENDENCYTYPE<DependeeType, DependentType> > castedDep1 = \
558 rcp_dynamic_cast<DEPENDENCYTYPE<DependeeType, DependentType> >( \
560 TEST_ASSERT(castedDep1 != null); \
562 RCP<DEPENDENCYTYPE<DependeeType, DependentType> > castedDep2 = \
563 rcp_dynamic_cast<DEPENDENCYTYPE<DependeeType, DependentType> >( \
565 TEST_ASSERT(castedDep2 != null); \
567 RCP<const SimpleFunctionObject< DependeeType > > readInFunc = \
568 castedDep2->getFunctionObject(); \
569 TEST_ASSERT(readInFunc != null); \
571 RCP<const AdditionFunction< DependeeType > > castedFunc = \
572 rcp_dynamic_cast<const AdditionFunction< DependeeType > >(readInFunc); \
573 TEST_ASSERT(castedFunc != null); \
575 castedFunc->getModifiyingOperand(), \
576 functionTester->getModifiyingOperand()); \
581 #define NUM_ARRAY_LENGTH_TEST(DependeeType, DependentType) \
582 TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( \
583 Teuchos_Dependencies, \
584 NumberArrayLengthDependency_serialization_tests, \
592 #define NUM_ARRAY_LENGTH_TEST_GROUP(DependeeType) \
593 NUM_ARRAY_LENGTH_TEST(DependeeType, int) \
594 NUM_ARRAY_LENGTH_TEST(DependeeType, float) \
595 NUM_ARRAY_LENGTH_TEST(DependeeType, double) \
596 NUM_ARRAY_LENGTH_TEST(DependeeType, llint)
603 #define TWODROW_TEST(DependeeType, DependentType) \
604 TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( \
605 Teuchos_Dependencies, \
606 TwoDRowDependency_serialization_tests, \
614 #define TWODROW_TEST_GROUP(DependeeType) \
615 TWODROW_TEST(DependeeType, int) \
616 TWODROW_TEST(DependeeType, float) \
617 TWODROW_TEST(DependeeType, double) \
618 TWODROW_TEST(DependeeType, llint)
625 #define TWODCOL_TEST(DependeeType, DependentType) \
626 TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( \
627 Teuchos_Dependencies, \
628 TwoDColDependency_serialization_tests, \
636 #define TWODCOL_TEST_GROUP(DependeeType) \
637 TWODCOL_TEST(DependeeType, int) \
638 TWODCOL_TEST(DependeeType, float) \
639 TWODCOL_TEST(DependeeType, double) \
640 TWODCOL_TEST(DependeeType, llint)
646 std::string dependee1 =
"string param";
647 std::string dependee2 =
"string param2";
648 std::string dependent1 =
"dependent param1";
649 std::string dependent2 =
"dependent param2";
652 myDepList.
set(dependee1,
"val1");
653 myDepList.
set(dependee2,
"val2");
654 myDepList.
set(dependent1, 2.0);
655 myDepList.
set(dependent2, 3.0);
667 valuesAndValidators[
"val1"] = double1Vali;
668 valuesAndValidators[
"val2"] = double2Vali;
674 valuesAndValidators));
677 dependentList.insert(myDepList.
getEntryRCP(dependent1));
678 dependentList.insert(myDepList.
getEntryRCP(dependent2));
726 TEST_ASSERT(castedDep2->getValuesAndValidators().size() == 2);
733 double1Vali->getMax());
736 castedDep2->getValuesAndValidators().find(
"val1")->second,
true)->getMax(),
737 double1Vali->getMax());
742 double2Vali->getMax());
745 castedDep2->getValuesAndValidators().find(
"val2")->second,
true)->getMax(),
746 double2Vali->getMax());
750 castedDep2->getDefaultValidator(),
true)->getMax(),
751 defaultVali->getMax());
756 std::string dependee1 =
"bool param";
757 std::string dependee2 =
"bool param2";
758 std::string dependent1 =
"dependent param1";
759 std::string dependent2 =
"dependent param2";
762 myDepList.
set(dependee1,
true);
763 myDepList.
set(dependee2,
false);
764 myDepList.
set(dependent1, 2.0);
765 myDepList.
set(dependent2, 3.0);
785 dependentList.insert(myDepList.
getEntryRCP(dependent1));
786 dependentList.insert(myDepList.
getEntryRCP(dependent2));
835 TEST_ASSERT(castedDep2->getFalseValidator().is_null());
839 true1Vali->getMax());
843 false1Vali->getMax());
846 castedDep2->getTrueValidator(),
true)->getMax(),
847 true2Vali->getMax());
853 Teuchos_Dependencies, RangeValidatorDepSerialization, T)
855 std::string dependee1 =
"dependee param";
856 std::string dependee2 =
"dependee param2";
857 std::string dependent1 =
"dependent param1";
858 std::string dependent2 =
"dependent param2";
863 myDepList.
set(dependent1, 2.0);
864 myDepList.
set(dependent2, 3.0);
879 rangeValiMap[range1] = double1Vali;
880 rangeValiMap[range2] = double2Vali;
889 dependentList.insert(myDepList.
getEntryRCP(dependent1));
890 dependentList.insert(myDepList.
getEntryRCP(dependent2));
938 castedDep1->getRangeToValidatorMap();
950 readinMap1.find(range1)->second;
952 readinMap1.find(range2)->second;
955 range1Vali,
true)->getMax(),
956 double1Vali->getMax());
959 range2Vali,
true)->getMax(),
960 double2Vali->getMax());
963 castedDep2->getRangeToValidatorMap();
964 it = readinMap2.begin();
973 readinMap2.find(range1)->second,
true)->getMax(),
974 double1Vali->getMax());
977 readinMap2.find(range2)->second,
true)->getMax(),
978 double2Vali->getMax());
982 castedDep2->getDefaultValidator());
983 TEST_EQUALITY( defaultReadInVali->getMax(), defaultValidator->getMax());
984 TEST_EQUALITY( defaultReadInVali->getMin(), defaultValidator->getMin());
988 #define RANGE_VALIDATOR_TEST(T) \
989 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
990 Teuchos_Dependencies, RangeValidatorDepSerialization, T)
1003 getParametersFromXmlFile(
"MissingDependeeTag.xml", depSheet),
1006 getParametersFromXmlFile(
"MissingDependentTag.xml", depSheet),
1009 getParametersFromXmlFile(
"MissingDependee.xml", depSheet),
1012 getParametersFromXmlFile(
"MissingDependent.xml", depSheet),
1021 entryIDsMap[dependentParam] = 1;
1026 boolVisDep, entryIDsMap, validatorIDsMap),
1028 entryIDsMap.erase(dependentParam);
1029 entryIDsMap[dependeeParam] = 3;
1032 boolVisDep, entryIDsMap, validatorIDsMap),
1071 missingValuesXML, readerEntryMap, readerValiMap),
1077 Teuchos_Dependencies, ConditionVisualDepSerializationExceptions)
1091 missingConXML, readerEntryMap, readerValiMap),
1096 Teuchos_Dependencies, BoolValidatorDepSerializationExceptions)
1114 readerValiMap.erase(writerValiMap.find(trueVali)->second);
1118 boolValiDepXML, readerEntryMap, readerValiMap),
1122 writerValiMap.find(trueVali)->second, trueVali));
1123 readerValiMap.erase(writerValiMap.find(falseVali)->second);
1127 boolValiDepXML, readerEntryMap, readerValiMap),
1133 Teuchos_Dependencies, StringValidatorDepSerializationExceptions)
1141 valiMap[
"blah"] = scrapVali;
1147 dependeeParam1, dependentParam1, valiMap, scrapVali2));
1159 missingValuesXML, readerEntryMap, readerValiMap),
1162 readerValiMap.erase(writerValiMap.find(scrapVali)->second);
1166 stringValiDepXML, readerEntryMap, readerValiMap),
1170 writerValiMap.find(scrapVali)->second,scrapVali));
1171 readerValiMap.erase(writerValiMap.find(scrapVali2)->second);
1175 stringValiDepXML, readerEntryMap, readerValiMap),
1180 Teuchos_Dependencies, RangeValidatorDepSerializationExceptions)
1193 valiMap[scrapRange] = scrapVali;
1194 secondvaliMap[scrapRange] = otherScrapVali;
1195 writerValiMap.insert(scrapVali);
1196 writerValiMap.insert(otherScrapVali);
1197 writerValiMap.insert(defaultScrapVali);
1198 readerValiMap.insert(
1200 writerValiMap.find(scrapVali)->second,scrapVali));
1201 readerValiMap.insert(
1203 writerValiMap.find(otherScrapVali)->second,otherScrapVali));
1204 readerValiMap.insert(
1206 writerValiMap.find(defaultScrapVali)->second,defaultScrapVali));
1210 dependeeParam1, dependentParam1, valiMap));
1214 dependeeParam1, dependentParam1, secondvaliMap, defaultScrapVali));
1229 missingRangesXML, readerEntryMap, readerValiMap),
1232 readerValiMap.erase(writerValiMap.find(scrapVali)->second);
1236 rangeDepXML, readerEntryMap, readerValiMap),
1239 readerValiMap.erase(writerValiMap.find(defaultScrapVali)->second);
1242 rangeDefaultDepXML, readerEntryMap, readerValiMap),
1248 Teuchos_Dependencies, NumArrayLengthDepSerializationExceptions)
1253 dependeeParam1, dependentParam1));
1260 Teuchos_Dependencies, DepSheetTests)
1263 std::string dependee1 =
"dependee1";
1264 std::string dependent1 =
"dependent1";
1266 myDepList.
set(dependee1,
"val1");
1267 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 dependency 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.
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.
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Templated set method.
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.