64 std::string paramName1 =
"string param";
65 std::string paramName2 =
"string param2";
66 std::string dependent1Name =
"dependent1";
67 std::string dependent2Name =
"dependent2";
68 std::string paramValue =
"cheese";
71 tuple<std::string>(
"steve",
"blah",
"your face");
73 testList.set(paramName1, paramValue);
74 testList.set(paramName2, paramValue);
75 testList.set(dependent1Name, paramValue);
76 testList.set(dependent2Name, paramValue);
81 testList.getEntryRCP(paramName2), conditionVal2));
86 testList.getEntryRCP(dependent1Name)));
91 testList.getEntryRCP(dependent2Name)));
97 writeParameterListToXmlOStream(testList, out, depSheet1);
110 simpleReadInDep->
getCondition()->getTypeAttributeValue(),
118 rcp_dynamic_cast<ConditionVisualDependency>(
121 complexReadInDep->
getCondition()->getTypeAttributeValue(),
129 simpleReadInCon->getValueList(), simpleStringCon->
getValueList());
131 complexReadInCon->getValueList(), complexStringCon->
getValueList());
137 std::string paramName1 =
"bool param";
138 std::string dependent1Name =
"dependent1";
139 bool paramValue =
true;
140 std::string dependentValue =
"hi there!";
142 testList.
set(paramName1, paramValue);
143 testList.
set(dependent1Name, dependentValue);
165 simpleReadInDep->
getCondition()->getTypeAttributeValue(),
175 std::string paramName1 =
"T param";
176 std::string paramName2 =
"T param 2";
177 std::string dependent1Name =
"dependent1";
178 std::string dependent2Name =
"dependent2";
181 std::string dependentValue =
"hi there!";
183 testList.
set(paramName1, paramValue);
184 testList.
set(paramName2, paramValue);
185 testList.
set(dependent1Name, dependentValue);
186 testList.
set(dependent2Name, dependentValue);
225 simpleReadInDep->
getCondition()->getTypeAttributeValue(),
233 rcp_dynamic_cast<ConditionVisualDependency>(
244 funcReadInCon->getFunctionObject());
247 funcReadInFunc->getModifiyingOperand(),
248 funcTester->getModifiyingOperand());
253 #define NUMBER_PARAM_TYPE_TEST( T ) \
254 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(Teuchos_Conditions, NumberConditionSerialization, T )
275 std::string paramName1 =
"bool param1";
276 std::string paramName2 =
"bool param2";
277 std::string dependent1Name =
"dependent1";
278 bool paramValue1 =
true;
279 bool paramValue2 =
false;
280 std::string dependentValue =
"hi there!";
282 testList.
set(paramName1, paramValue1);
283 testList.
set(paramName2, paramValue2);
284 testList.
set(dependent1Name, dependentValue);
291 tuple<RCP<const Condition> >(boolCon1, boolCon2);
314 rcp_dynamic_cast<ConditionVisualDependency>(
321 rcp_dynamic_cast<
const BinCondition >(readInDep1->
getCondition(),
true);
329 #define BIN_CON_TEST( BinCondition ) \
330 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(Teuchos_Conditions, BoolLogicConditionSerialization, BinCondition)
338 std::string paramName1 =
"bool param1";
339 std::string dependent1Name =
"dependent1";
340 bool paramValue1 =
true;
341 std::string dependentValue =
"hi there!";
343 testList.
set(paramName1, paramValue1);
344 testList.
set(dependent1Name, dependentValue);
382 getParametersFromXmlFile(
383 "MissingParameterEntryDefinition.xml", depSheet),
397 getParametersFromXmlFile(
398 "MissingValuesTag.xml", depSheet),
A Dependency sheet keeps track of dependencies between various ParameterEntries.
#define TEST_ASSERT(v1)
Assert the given statement is true.
static RCP< T > getDummyObject()
Retrieves a dummy object of type T.
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
unsigned long long int ullint
A collection of Exceptions thrown when converting Conditions to and from XML.
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.
static void printKnownConverters(std::ostream &out)
prints the xml tags associated with all known converters
#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)...
A Not condition returns the result of performing a logical NOT on a given condition.
T * get() const
Get the raw C++ pointer to the underlying object.
const ValueList & getValueList() const
Returns the value list being used with this StringCondition.
A Number Condition is a Parameter Condition that evaluates whether or not a number parameter is great...
Simple helper functions that make it easy to read and write XML to and from a parameterlist.
void addDependency(RCP< Dependency > dependency)
Adds a dependency to the sheet.
Thrown when a referenced ParameterEntry can't be found.
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)
TEUCHOS_UNIT_TEST(ConstNonconstObjectContainer, create)
Thrown when a StringConditon is missing it's Value tag.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
Templated Parameter List class.
#define BIN_CON_TEST(BinCondition)
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
A database for ConditionXMLConverters.
A String Condition is a Parameter Condition that evaluates whether or not a string parameter has take...
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
An xml converter for NumberConditions The valid XML represntation for a NumberCondition is: ...
A list of parameters of arbitrary type.
A collection of standard dependencies.
#define NUMBER_PARAM_TYPE_TEST(T)
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....
Class for retrieving a dummy object of type T.
A collection of Exceptions that can be potentially thrown when converting a ParameterList to and from...
XMLObject fromConditiontoXML(const RCP< const Condition > condition, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
Converters a given ParameterEntryValidator to XML.
Smart reference counting pointer class for automatic garbage collection.
A condition visual dependency says the following about the relationship between elements in a Paramet...
A collection of standard ConditionXMLConverters.
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...
static T one()
Returns representation of one for this scalar type.
Standard Conditions to be used.
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 ...