Teuchos Package Browser (Single Doxygen Collection) Version of the Day
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_XMLParameterListHelpers.hpp"
#include <iostream>
Include dependency graph for xml_data_types.cpp:

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[])

Function Documentation

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

Definition at line 82 of file xml_data_types.cpp.

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

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

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines