Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Teuchos_StandardDependencyXMLConverters.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#ifndef TEUCHOS_STANDARDDEPENDENCYXMLCONVERTERS_HPP
43#define TEUCHOS_STANDARDDEPENDENCYXMLCONVERTERS_HPP
44
54
55
56namespace Teuchos {
57
58
62
63public:
64
67
80 XMLObject& xmlObj,
81 const XMLParameterListWriter::EntryIDsMap& entryIDsMap) const = 0;
82
95 const XMLObject& xmlObj,
97 const Dependency::ParameterEntryList dependets,
98 bool showIf,
99 const XMLParameterListReader::EntryIDsMap& entryIDsMap) const = 0;
100
102
105
107 RCP<Dependency> convertXML(
108 const XMLObject& xmlObj,
110 const Dependency::ParameterEntryList dependets,
111 const XMLParameterListReader::EntryIDsMap& entryIDsMap,
112 const IDtoValidatorMap& validatorIDsMap) const;
113
115 void convertDependency(
116 const RCP<const Dependency> dependency,
117 XMLObject& xmlObj,
118 const XMLParameterListWriter::EntryIDsMap& entryIDsMap,
119 ValidatortoIDMap& validatorIDsMap) const;
120
122
123private:
124
127
129 static const std::string& getShowIfAttributeName(){
130 static const std::string showIfAttributeName = "showIf";
131 return showIfAttributeName;
132 }
133
135
136};
137
141
142public:
143
146
159 XMLObject& xmlObj,
160 ValidatortoIDMap& validatorIDsMap) const = 0;
161
173 const XMLObject& xmlObj,
175 const Dependency::ParameterEntryList dependents,
176 const IDtoValidatorMap& validatorIDsMap) const = 0;
177
179
182
184 RCP<Dependency> convertXML(
185 const XMLObject& xmlObj,
187 const Dependency::ParameterEntryList dependets,
188 const XMLParameterListReader::EntryIDsMap& entryIDsMap,
189 const IDtoValidatorMap& validatorIDsMap) const;
190
192 void convertDependency(
193 const RCP<const Dependency> dependency,
194 XMLObject& xmlObj,
195 const XMLParameterListWriter::EntryIDsMap& entryIDsMap,
196 ValidatortoIDMap& validatorIDsMap) const;
197
199
200};
201
221
222public:
223
226
228 void convertSpecialVisualAttributes(
230 XMLObject& xmlObj,
231 const XMLParameterListWriter::EntryIDsMap& entryIDsMap) const;
232
234 RCP<VisualDependency> convertSpecialVisualAttributes(
235 const XMLObject& xmlObj,
237 const Dependency::ParameterEntryList dependets,
238 bool showIf,
239 const XMLParameterListReader::EntryIDsMap& entryIDsMap) const;
240
242 static const std::string& getStringValuesTagName(){
243 static const std::string stringValuesTagName = "StringValues";
244 return stringValuesTagName;
245 }
246
248
249private:
250
253
255 static const std::string& getStringTagName(){
256 static const std::string stringTagName = "String";
257 return stringTagName;
258 }
259
261 static const std::string& getValueAttributeName(){
262 static const std::string valueAttributeName = "value";
263 return valueAttributeName;
264 }
265
267
268};
269
284
285public:
286
289
291 void convertSpecialVisualAttributes(
293 XMLObject& xmlObj,
294 const XMLParameterListWriter::EntryIDsMap& entryIDsMap) const;
295
297 RCP<VisualDependency> convertSpecialVisualAttributes(
298 const XMLObject& xmlObj,
300 const Dependency::ParameterEntryList dependets,
301 bool showIf,
302 const XMLParameterListReader::EntryIDsMap& entryIDsMap) const;
303
305
306};
307
324template<class T>
326
327public:
328
331
335 XMLObject& xmlObj,
336 const XMLParameterListWriter::EntryIDsMap& entryIDsMap) const;
337
340 const XMLObject& xmlObj,
342 const Dependency::ParameterEntryList dependets,
343 bool showIf,
344 const XMLParameterListReader::EntryIDsMap& entryIDsMap) const;
345
347
348};
349
350template<class T>
353 XMLObject& xmlObj,
354 const XMLParameterListWriter::EntryIDsMap& /* entryIDsMap */) const
355{
356 RCP<const NumberVisualDependency<T> > castedDependency =
357 rcp_dynamic_cast<const NumberVisualDependency<T> >(dependency);
358 RCP<const SimpleFunctionObject<T> > functionObject =
359 castedDependency->getFunctionObject();
360
361 if(functionObject != null){
362 XMLObject functionXML =
364 xmlObj.addChild(functionXML);
365 }
366
367}
368
369template<class T>
372 const XMLObject& xmlObj,
374 const Dependency::ParameterEntryList dependents,
375 bool showIf,
376 const XMLParameterListReader::EntryIDsMap& /* entryIDsMap */) const
377{
378 TEUCHOS_TEST_FOR_EXCEPTION(dependees.size() > 1,
380 "A NumberVisualDependency can only have 1 dependee!" <<
381 std::endl << std::endl);
382 int functionIndex = xmlObj.findFirstChild(FunctionObject::getXMLTagName());
383 RCP<SimpleFunctionObject<T> > functionObject = null;
384 if(functionIndex != -1){
385 functionObject = rcp_dynamic_cast<SimpleFunctionObject<T> >(
387 }
389 *(dependees.begin()), dependents, showIf, functionObject));
390
391}
392
411{
412
413public:
414
417
419 void convertSpecialVisualAttributes(
421 XMLObject& xmlObj,
422 const XMLParameterListWriter::EntryIDsMap& entryIDsMap) const;
423
425 RCP<VisualDependency> convertSpecialVisualAttributes(
426 const XMLObject& xmlObj,
428 const Dependency::ParameterEntryList dependets,
429 bool showIf,
430 const XMLParameterListReader::EntryIDsMap& entryIDsMap) const;
431
433
434};
435
436
458
459public:
460
463
465 void convertSpecialValidatorAttributes(
467 XMLObject& xmlObj,
468 ValidatortoIDMap& validatorIDsMap) const;
469
471 RCP<ValidatorDependency> convertSpecialValidatorAttributes(
472 const XMLObject& xmlObj,
474 const Dependency::ParameterEntryList dependents,
475 const IDtoValidatorMap& validatorIDsMap) const;
476
478 static const std::string& getValuesAndValidatorsTag(){
479 static const std::string valuesAndValidatorsTag = "ValuesAndValidators";
480 return valuesAndValidatorsTag;
481 }
482
484
485private:
488
490 static const std::string& getPairTag(){
491 static const std::string pairTag = "Pair";
492 return pairTag;
493 }
494
496 static const std::string& getValueAttributeName(){
497 static const std::string valueAttributeName = "value";
498 return valueAttributeName;
499 }
500
502 static const std::string& getValidatorIdAttributeName(){
503 static const std::string validatorIDAttributeName = "validatorId";
504 return validatorIDAttributeName;
505 }
506
508 static const std::string& getDefaultValidatorIdAttributeName(){
509 static const std::string defaultValidatorIdAttributeName =
510 "defaultValidatorId";
511 return defaultValidatorIdAttributeName;
512 }
513
515
516};
517
535
536public:
537
540
542 void convertSpecialValidatorAttributes(
544 XMLObject& xmlObj,
545 ValidatortoIDMap& validatorIDsMap) const;
546
548 RCP<ValidatorDependency> convertSpecialValidatorAttributes(
549 const XMLObject& xmlObj,
551 const Dependency::ParameterEntryList dependents,
552 const IDtoValidatorMap& validatorIDsMap) const;
553
555
556private:
557
560
562 static const std::string& getFalseValidatorIdAttributeName(){
563 static const std::string falseValidatorIdAttributeName =
564 "falseValidatorId";
565 return falseValidatorIdAttributeName;
566 }
567
569 static const std::string& getTrueValidatorIdAttributeName(){
570 static const std::string trueValidatorIdAttributeName =
571 "trueValidatorId";
572 return trueValidatorIdAttributeName;
573 }
574
576
577};
578
601template<class T>
604
605public:
606
609
613 XMLObject& xmlObj,
614 ValidatortoIDMap& validatorIDsMap) const;
615
618 const XMLObject& xmlObj,
620 const Dependency::ParameterEntryList dependents,
621 const IDtoValidatorMap& validatorIDsMap) const;
622
624 static const std::string& getRangesAndValidatorsTag(){
625 static const std::string rangesAndValidatorsTag = "RangesAndValidators";
626 return rangesAndValidatorsTag;
627 }
628
630
631private:
634
635
637 static const std::string& getPairTag(){
638 static const std::string pairTag = "Pair";
639 return pairTag;
640 }
641
643 static const std::string& getMinAttributeName(){
644 static const std::string minAttributeName = "min";
645 return minAttributeName;
646 }
647
649 static const std::string& getMaxAttributeName(){
650 static const std::string maxAttributeName = "max";
651 return maxAttributeName;
652 }
653
654
656 static const std::string& getValidatorIdAttributeName(){
657 static const std::string validatorIdAttributeName = "validatorId";
658 return validatorIdAttributeName;
659 }
660
662 static const std::string& getDefaultValidatorIdAttributeName(){
663 static const std::string defaultValidatorIdAttributeName =
664 "defaultValidatorId";
665 return defaultValidatorIdAttributeName;
666 }
667
669
670};
671
672template<class T>
673void
676 XMLObject& xmlObj,
677 ValidatortoIDMap& validatorIDsMap) const
678{
679 RCP<const RangeValidatorDependency<T> > castedDependency =
680 rcp_dynamic_cast<const RangeValidatorDependency<T> >(dependency, true);
681
682 XMLObject rangesAndValidatorsTag(getRangesAndValidatorsTag());
683
684 castedDependency->getRangeToValidatorMap();
685 for(
687 it = castedDependency->getRangeToValidatorMap().begin();
688 it != castedDependency->getRangeToValidatorMap().end();
689 ++it)
690 {
691 T min = it->first.first;
692 T max = it->first.second;
693 if(validatorIDsMap.find(it->second) == validatorIDsMap.end()){
694 validatorIDsMap.insert(it->second);
695 }
697 validatorIDsMap.find(it->second)->second;
698 XMLObject pairTag(getPairTag());
699 pairTag.addAttribute(getMinAttributeName(), min);
700 pairTag.addAttribute(getMaxAttributeName(), max);
701 pairTag.addAttribute(getValidatorIdAttributeName(), validatorID);
702 rangesAndValidatorsTag.addChild(pairTag);
703 }
704 xmlObj.addChild(rangesAndValidatorsTag);
705 RCP<const ParameterEntryValidator> defaultValidator =
706 castedDependency->getDefaultValidator();
707 if(nonnull(defaultValidator)){
708 if(validatorIDsMap.find(defaultValidator) == validatorIDsMap.end()){
709 validatorIDsMap.insert(defaultValidator);
710 }
711 xmlObj.addAttribute(
712 getDefaultValidatorIdAttributeName(),
713 validatorIDsMap.find(defaultValidator)->second);
714 }
715}
716
717template<class T>
720 const XMLObject& xmlObj,
722 const Dependency::ParameterEntryList dependents,
723 const IDtoValidatorMap& validatorIDsMap) const
724{
725
726 int result = xmlObj.findFirstChild(getRangesAndValidatorsTag());
727 TEUCHOS_TEST_FOR_EXCEPTION(result == -1,
729 "Error: All RangeValidatorDependencies must have a " <<
730 getRangesAndValidatorsTag() << " tag!" << std::endl << std::endl);
731
732 XMLObject rangesAndValidatorsTag = xmlObj.getChild(result);
733
735 rangesAndValidators;
736 for(int i = 0 ; i < rangesAndValidatorsTag.numChildren(); ++i){
737 XMLObject child = rangesAndValidatorsTag.getChild(i);
738 T min = child.getRequired<T>(getMinAttributeName());
739 T max = child.getRequired<T>(getMaxAttributeName());
742 getValidatorIdAttributeName());
743
745 validatorIDsMap.find(currentID) == validatorIDsMap.end(),
747 "Could not find validator in given ValidatorIDsMap! " << std::endl <<
748 std::endl);
750 validatorIDsMap.find(currentID)->second;
751
752 rangesAndValidators.insert(
754 typename RangeValidatorDependency<T>::Range(min, max), validator));
755 }
756
757 RCP<ParameterEntryValidator> defaultValidator = null;
758 if(xmlObj.hasAttribute(getDefaultValidatorIdAttributeName())){
761 getDefaultValidatorIdAttributeName());
763 validatorIDsMap.find(defaultValiID) == validatorIDsMap.end(),
765 "Could not find a validator (for the default validator) " <<
766 "corresponding to the ID " << defaultValiID <<
767 " in the given validatorIDsMap!" << std::endl << std::endl);
768 defaultValidator = validatorIDsMap.find(defaultValiID)->second;
769 }
770
772 dependee, dependents, rangesAndValidators, defaultValidator));
773}
774
779template<class DependeeType, class DependentType>
781
782public:
783
786
789 const XMLObject& xmlObj,
791 const Dependency::ParameterEntryList dependets,
792 const XMLParameterListReader::EntryIDsMap& entryIDsMap,
793 const IDtoValidatorMap& validatorIDsMap) const;
794
797 const RCP<const Dependency> dependency,
798 XMLObject& xmlObj,
799 const XMLParameterListWriter::EntryIDsMap& entryIDsMap,
800 ValidatortoIDMap& validatorIDsMap) const;
801
803
804protected:
805
827 RCP<const SimpleFunctionObject<DependeeType> > function) const = 0;
828
829};
830
831template<class DependeeType, class DependentType>
834 const XMLObject& xmlObj,
836 const Dependency::ParameterEntryList dependents,
837 const XMLParameterListReader::EntryIDsMap& /* entryIDsMap */,
838 const IDtoValidatorMap& /* validatorIDsMap */) const
839{
840 TEUCHOS_TEST_FOR_EXCEPTION(dependees.size() > 1,
842 "A ArrayModifierDependency can only have 1 dependee!" <<
843 std::endl << std::endl);
845 int functionIndex = xmlObj.findFirstChild(FunctionObject::getXMLTagName());
846 if(functionIndex != -1){
847 functionObject = rcp_dynamic_cast<SimpleFunctionObject<DependeeType> >(
849 }
850 return
851 getConcreteDependency(*(dependees.begin()), dependents, functionObject);
852}
853
854template<class DependeeType, class DependentType>
855void
857 const RCP<const Dependency> dependency,
858 XMLObject& xmlObj,
859 const XMLParameterListWriter::EntryIDsMap& /* entryIDsMap */,
860 ValidatortoIDMap& /* validatorIDsMap */) const
861{
863 rcp_dynamic_cast<const ArrayModifierDependency<DependeeType, DependentType> >(
864 dependency);
866 castedDep->getFunctionObject();
867 if(functionObject != null){
869 functionObject);
870 xmlObj.addChild(functionXML);
871 }
872}
873
874
889template<class DependeeType, class DependentType>
891 public ArrayModifierDependencyXMLConverter<DependeeType, DependentType>{
892
893protected:
894
901 RCP<const SimpleFunctionObject<DependeeType> > function) const;
903
904};
905
906template<class DependeeType, class DependentType>
911 RCP<const SimpleFunctionObject<DependeeType> > function) const
912{
913return rcp(
915 dependee, dependents, function));
916}
917
918
935template<class DependeeType, class DependentType>
937 public ArrayModifierDependencyXMLConverter<DependeeType, DependentType>
938{
939
940protected:
941
948 RCP<const SimpleFunctionObject<DependeeType> > function) const;
950
951};
952
953template<class DependeeType, class DependentType>
958 RCP<const SimpleFunctionObject<DependeeType> > function) const
959{
960return rcp(
962 dependee, dependents, function));
963}
964
981template<class DependeeType, class DependentType>
983 public ArrayModifierDependencyXMLConverter<DependeeType, DependentType>
984{
985
986protected:
987
994 RCP<const SimpleFunctionObject<DependeeType> > function) const;
996
997};
998
999template<class DependeeType, class DependentType>
1004 RCP<const SimpleFunctionObject<DependeeType> > function) const
1005{
1006return rcp(
1008 dependee, dependents, function));
1009}
1010
1011
1012
1013} // namespace Teuchos
1014
1015
1016#endif // TEUCHOS_STANDARDDEPENDENCYXMLCONVERTERS_HPP
#define TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
Converts back and forth between XML and Dependencies.
A database for FunctionObjectXMLConverters.
A collection of standard dependencies.
A collection of Exceptions thrown when converting Dependencys to and from XML.
A converter used to convert ArrayModifierDepdencies to and from xml.
void convertDependency(const RCP< const Dependency > dependency, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap, ValidatortoIDMap &validatorIDsMap) const
RCP< Dependency > convertXML(const XMLObject &xmlObj, const Dependency::ConstParameterEntryList dependees, const Dependency::ParameterEntryList dependets, const XMLParameterListReader::EntryIDsMap &entryIDsMap, const IDtoValidatorMap &validatorIDsMap) const
virtual RCP< ArrayModifierDependency< DependeeType, DependentType > > getConcreteDependency(RCP< const ParameterEntry > dependee, Dependency::ParameterEntryList dependents, RCP< const SimpleFunctionObject< DependeeType > > function) const =0
Obtains a concrete ArrayModifierDependency given a dependee, dependtns, and a funciton object.
An abstract base class for converting Dependencies to and from XML.
std::set< RCP< ParameterEntry >, RCPComp > ParameterEntryList
A list of Dependees.
std::set< RCP< const ParameterEntry >, RCPConstComp > ConstParameterEntryList
A list of dependents.
static XMLObject convertFunctionObject(RCP< const FunctionObject > function)
Given a FunctionObject, converts the FunctionObject to XML.
static RCP< FunctionObject > convertXML(const XMLObject &xmlObject)
Given an XMLObject, converts the XMLObject to a FunctionObject.
static const std::string & getXMLTagName()
Returns the name of the XML tag used to indicate a funciton object.
Maps Validators to integers.
const_iterator end() const
Returns a const_reference to the end of the map.
const_iterator find(int id) const
Retrieves and iterator to a validator and id based on the id given.
Thrown when the rangesAndValidators tag for the RangeValidatorDepencyConverter can't be found.
Thrown when converting a dependency that has validaotrs to and from XML. This excetpion indicates tha...
virtual RCP< ArrayModifierDependency< DependeeType, DependentType > > getConcreteDependency(RCP< const ParameterEntry > dependee, Dependency::ParameterEntryList dependents, RCP< const SimpleFunctionObject< DependeeType > > function) const
Obtains a concrete ArrayModifierDependency given a dependee, dependtns, and a funciton object.
A NumberArrayLengthDependency says the following about the relationship between two parameters: The l...
void convertSpecialVisualAttributes(RCP< const VisualDependency > dependency, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
A number visual dependency says the following about the relationship between two elements in a Parame...
Smart reference counting pointer class for automatic garbage collection.
void convertSpecialValidatorAttributes(RCP< const ValidatorDependency > dependency, XMLObject &xmlObj, ValidatortoIDMap &validatorIDsMap) const
A RangeValidatorDependency says the following about the relationship between two parameters: Dependen...
std::pair< Range, RCP< const ParameterEntryValidator > > RangeValidatorPair
Convenience typedef.
std::map< Range, RCP< const ParameterEntryValidator > > RangeToValidatorMap
Convenience typedef.
std::pair< T, T > Range
Convenience typedef.
A simple function object that applies a given operand to a spcified arguement using a specific operat...
static const std::string & getValueAttributeName()
Gets the Value attribute name.
static const std::string & getStringValuesTagName()
Gets the StringValues Tag.
static const std::string & getStringTagName()
Gets the String Tag.
Thrown when a Dependency has too many dependees specified in its XML.
A class for converting TwoDColDependencies to and from XML.
virtual RCP< ArrayModifierDependency< DependeeType, DependentType > > getConcreteDependency(RCP< const ParameterEntry > dependee, Dependency::ParameterEntryList dependents, RCP< const SimpleFunctionObject< DependeeType > > function) const
Obtains a concrete ArrayModifierDependency given a dependee, dependtns, and a funciton object.
A dependency in which the number of rows in a parameter with a TwoDArray depends on the value of anot...
A class for converting TwoDRowDependencies to and from XML.
virtual RCP< ArrayModifierDependency< DependeeType, DependentType > > getConcreteDependency(RCP< const ParameterEntry > dependee, Dependency::ParameterEntryList dependents, RCP< const SimpleFunctionObject< DependeeType > > function) const
Obtains a concrete ArrayModifierDependency given a dependee, dependtns, and a funciton object.
A dependency in which the number of rows in a parameter with a TwoDArray depends on the value of anot...
virtual RCP< ValidatorDependency > convertSpecialValidatorAttributes(const XMLObject &xmlObj, RCP< const ParameterEntry > dependee, const Dependency::ParameterEntryList dependents, const IDtoValidatorMap &validatorIDsMap) const =0
Converts any special aspects of a specific validator dependency from xml.
virtual void convertSpecialValidatorAttributes(RCP< const ValidatorDependency > dependency, XMLObject &xmlObj, ValidatortoIDMap &validatorIDsMap) const =0
Converts any special aspects of a specific validator dependency to xml.
A class for mapping validators to integers.
const_iterator end() const
Returns a const_reference to the end of the map.
void insert(RCP< const ParameterEntryValidator > toInsert)
inserts an IDValidatorPair into the map.
const_iterator find(const RCP< const ParameterEntryValidator > validator) const
Returns an iterator to the validator and id specified by the validator.
virtual void convertSpecialVisualAttributes(RCP< const VisualDependency > dependency, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const =0
Converts any special aspects of a specific visual dependency to xml.
static const std::string & getShowIfAttributeName()
Gets the name of the showif attribute.
virtual RCP< VisualDependency > convertSpecialVisualAttributes(const XMLObject &xmlObj, const Dependency::ConstParameterEntryList dependees, const Dependency::ParameterEntryList dependets, bool showIf, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const =0
Converts any special aspects of a specific visual dependency from xml.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
void addChild(const XMLObject &child)
Add a child node to the node.
const std::string & getRequired(const std::string &name) const
Get an attribute, throwing an std::exception if it is not found.
void addAttribute(const std::string &name, T value)
Lookup whether or not Doubles are allowed.
const XMLObject & getChild(int i) const
Return the i-th child node.
bool hasAttribute(const std::string &name) const
Find out if the current node has an attribute of the specified name.
int findFirstChild(std::string tagName) const
Returns the index of the first child found with the given tag name. Returns -1 if no child is found.
int numChildren() const
Return the number of child nodes owned by this node.
std::map< ParameterEntry::ParameterEntryID, RCP< ParameterEntry > > EntryIDsMap
Convenience typedef.
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
bool nonnull(const std::shared_ptr< T > &p)
Returns true if p.get()!=NULL.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.