Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
#include "Teuchos_ParameterList.hpp"
#include "Teuchos_Array.hpp"
#include "Teuchos_Version.hpp"
#include "Teuchos_ParameterEntryXMLConverterDB.hpp"
#include "Teuchos_XMLParameterListCoreHelpers.hpp"
#include "Teuchos_as.hpp"
#include "Teuchos_StandardCatchMacros.hpp"
#include <iostream>
Go to the source code of this file.
Classes | |
class | CustomDataType |
Functions | |
std::ostream & | operator<< (std::ostream &out, const CustomDataType &object) |
std::istream & | operator>> (std::istream &in, CustomDataType &object) |
int | main (int argc, char *argv[]) |
std::ostream& operator<< | ( | std::ostream & | out, |
const CustomDataType & | object | ||
) |
Definition at line 50 of file xml_data_types.cpp.
std::istream& operator>> | ( | std::istream & | in, |
CustomDataType & | object | ||
) |
Definition at line 55 of file xml_data_types.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
this examples gives a demonstration of all the supporeted data types for a parameter list. By supported we mean that they be serailized to and from XML. You can use any data type you want as a parameter, but only these types will be serailized to and from XML properly. In order to serialize another data type, you must create and converter, something which we will demonstrate in this example.
Final Notes: StandardTemplatedParameterConverter should suit most your needs. Buf if for some reason you don't feel like overrideing the inseration and extraction operators, you can allways subclass the ParameterEntryXMLConverter class and do your own thing.
Definition at line 73 of file xml_data_types.cpp.