- Main Page
- Classes
- Files

- File List

# OptFrame/Parallel/MapReduce++/MaPI/serializer.hpp

    00001 #ifndef SERIALIZER_HPP
    00002 #define SERIALIZER_HPP
    00003
    00004 template<class KeyA, class A, class KeyB, class B, class C>
    00005 class MaPI_Serializer
    00006 {
    00007 public:
    00008
    00009         virtual KeyA    KeyA_fromString(string s)       = 0;
    00010         virtual string  KeyA_toString(KeyA o)   = 0;
    00011
    00012         virtual A               A_fromString(string s)          = 0;
    00013         virtual string  A_toString(A o)                         = 0;
    00014
    00015         virtual KeyB    KeyB_fromString(string s)       = 0;
    00016         virtual string  KeyB_toString(KeyB o)           = 0;
    00017
    00018         virtual B               B_fromString(string s)          = 0;
    00019         virtual string  B_toString(B o)                         = 0;
    00020
    00021         virtual C               C_fromString(string s)          = 0;
    00022         virtual string  C_toString(C o)                         = 0;
    00023
    00024 };
    00025
    00026 #include "../MaPI/MaPI.h"
    00027 #include <iostream>
    00028
    00029 class MaPI_StrSerializer : public MaPI_Serializer<string,string,string,string,string>
    00030 {
    00031 public:
    00032
    00033         virtual string  KeyA_fromString(string s)       {return s;};
    00034         virtual string  KeyA_toString(string o)         {return o;};
    00035
    00036         virtual string  A_fromString(string s)          {return s;};
    00037         virtual string  A_toString(string o)            {return o;};
    00038
    00039         virtual string  KeyB_fromString(string s)       {return s;};
    00040         virtual string  KeyB_toString(string o)         {return o;};
    00041
    00042         virtual string  B_fromString(string s)          {return s;};
    00043         virtual string  B_toString(string o)            {return o;};
    00044
    00045         virtual string  C_fromString(string s)          {return s;};
    00046         virtual string  C_toString(string o)            {return o;};
    00047
    00048 };
    00049
    00050 #endif /* SERIALIZER_HPP */

All Classes Functions