Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
xml_data_types.cpp File Reference
#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>
Include dependency graph for xml_data_types.cpp:

Go to the source code of this file.


class  CustomDataType


std::ostream & operator<< (std::ostream &out, const CustomDataType &object)
std::istream & operator>> (std::istream &in, CustomDataType &object)
int main (int argc, char *argv[])

Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const CustomDataType object 

Definition at line 84 of file xml_data_types.cpp.

std::istream& operator>> ( std::istream &  in,
CustomDataType object 

Definition at line 89 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 107 of file xml_data_types.cpp.