1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-18 07:47:06 +01:00

Separated IO reader/writers into a proper abstract base,

derived relationship. Have Text/Binary/Xml versions of
Reader & Writer.

Any new Reader/Writer class inheriting the interface can give object serialisation
to any desired format now.

      new file:   lib/serialisation/BaseIO.h
      modified:   lib/serialisation/BinaryIO.h
      modified:   lib/serialisation/Serialisation.h
      modified:   lib/serialisation/TextIO.h
      modified:   lib/serialisation/XmlIO.h

The test uses the Xml, Binary and Text formats as well as cout << Object.
This commit is contained in:
Peter Boyle
2015-08-21 10:06:33 +01:00
parent 35818fdf6c
commit 476da3ee62
7 changed files with 183 additions and 157 deletions

View File

@ -38,7 +38,7 @@ bool b = false;
int main(int argc,char **argv)
{
{
Writer WR("bother.xml");
XMLWriter WR("bother.xml");
push(WR,"BasicTypes");
write(WR,"i16",i16);
@ -57,7 +57,7 @@ int main(int argc,char **argv)
};
Reader RD("bother.xml");
XMLReader RD("bother.xml");
myclass copy1;
myclass copy2;