32 std::string paramName1 =
"string param";
33 std::string paramName2 =
"string param2";
34 std::string dependent1Name =
"dependent1";
35 std::string dependent2Name =
"dependent2";
36 std::string paramValue =
"cheese";
39 tuple<std::string>(
"steve",
"blah",
"your face");
41 testList.set(paramName1, paramValue);
42 testList.set(paramName2, paramValue);
43 testList.set(dependent1Name, paramValue);
44 testList.set(dependent2Name, paramValue);
49 testList.getEntryRCP(paramName2), conditionVal2));
54 testList.getEntryRCP(dependent1Name)));
59 testList.getEntryRCP(dependent2Name)));
65 writeParameterListToXmlOStream(testList, out, depSheet1);
78 simpleReadInDep->
getCondition()->getTypeAttributeValue(),
86 rcp_dynamic_cast<ConditionVisualDependency>(
89 complexReadInDep->
getCondition()->getTypeAttributeValue(),
97 simpleReadInCon->getValueList(), simpleStringCon->
getValueList());
99 complexReadInCon->getValueList(), complexStringCon->
getValueList());
105 std::string paramName1 =
"bool param";
106 std::string dependent1Name =
"dependent1";
107 bool paramValue =
true;
108 std::string dependentValue =
"hi there!";
110 testList.
set(paramName1, paramValue);
111 testList.
set(dependent1Name, dependentValue);
133 simpleReadInDep->
getCondition()->getTypeAttributeValue(),
143 std::string paramName1 =
"T param";
144 std::string paramName2 =
"T param 2";
145 std::string dependent1Name =
"dependent1";
146 std::string dependent2Name =
"dependent2";
149 std::string dependentValue =
"hi there!";
151 testList.
set(paramName1, paramValue);
152 testList.
set(paramName2, paramValue);
153 testList.
set(dependent1Name, dependentValue);
154 testList.
set(dependent2Name, dependentValue);
193 simpleReadInDep->
getCondition()->getTypeAttributeValue(),
201 rcp_dynamic_cast<ConditionVisualDependency>(
212 funcReadInCon->getFunctionObject());
215 funcReadInFunc->getModifiyingOperand(),
216 funcTester->getModifiyingOperand());
221 #define NUMBER_PARAM_TYPE_TEST( T ) \
222 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(Teuchos_Conditions, NumberConditionSerialization, T )
243 std::string paramName1 =
"bool param1";
244 std::string paramName2 =
"bool param2";
245 std::string dependent1Name =
"dependent1";
246 bool paramValue1 =
true;
247 bool paramValue2 =
false;
248 std::string dependentValue =
"hi there!";
250 testList.
set(paramName1, paramValue1);
251 testList.
set(paramName2, paramValue2);
252 testList.
set(dependent1Name, dependentValue);
259 tuple<RCP<const Condition> >(boolCon1, boolCon2);
282 rcp_dynamic_cast<ConditionVisualDependency>(
289 rcp_dynamic_cast<
const BinCondition >(readInDep1->
getCondition(),
true);
297 #define BIN_CON_TEST( BinCondition ) \
298 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(Teuchos_Conditions, BoolLogicConditionSerialization, BinCondition)
306 std::string paramName1 =
"bool param1";
307 std::string dependent1Name =
"dependent1";
308 bool paramValue1 =
true;
309 std::string dependentValue =
"hi there!";
311 testList.
set(paramName1, paramValue1);
312 testList.
set(dependent1Name, dependentValue);
350 getParametersFromXmlFile(
351 "MissingParameterEntryDefinition.xml", depSheet),
365 getParametersFromXmlFile(
366 "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.
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.
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Templated set method.
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 ...