Functions

writertest.cpp File Reference

#include <xmlstorage.h>
#include <iostream>
Include dependency graph for writertest.cpp:

Go to the source code of this file.

Functions

void test_writer ()
int main ()

Function Documentation

int main (  )

Definition at line 115 of file writertest.cpp.

References test_writer().

{
    test_writer();

    return 0;
}

Here is the call graph for this function:

void test_writer (  )

Definition at line 49 of file writertest.cpp.

References XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().

Referenced by main().

{
    XMLWriter wr("writertest.xml");

    wr.create("root");

      wr.create("example1");
        wr.create("PARAMS");
          wr.create("TEXT");
            wr.set_content("Testgruppe");
          wr.back(); // </TEXT>

          wr.create("COLOR");
            wr.create("RED");
            wr.set_content("234");
            wr.back(); // </RED>

            wr.create("GREEN");
            wr.set_content("22");
            wr.back(); // </GREEN>

            wr.create("BLUE");
            wr.set_content("33");
            wr.back(); // </BLUE>
          wr.back(); // </COLOR>

          wr.create("FONT");
            wr.create("FONT_FILENAME");
            wr.set_content("Arial.ttf");
            wr.back(); // </FONT_FILENAME>

            wr.create("SIZE");
            wr.set_content("12");
            wr.back(); // </SIZE>
          wr.back(); // </FONT>
        wr.back(); // </PARAMS>
      wr.back(); // </example1>

      wr.create("example2");
        wr.create("PARAMS");
          wr["text"] = "Testgruppe";

          wr.create("COLOR");
            wr["red"] = XMLInt(234);
            wr["green"] = XMLInt(22);
            wr["blue"] = XMLInt(33);
          wr.back(); // </COLOR>

          wr.create("FONT");
            wr["font_filename"] = "Arial.ttf";
            wr["size"] = XMLInt(12);
          wr.back(); // </FONT>
        wr.back(); // </PARAMS>
      wr.back(); // </example2>

      wr.create("example3");
        wr.create("Y_ACHSE");
          wr["Stopbits"] = XMLInt(1);
          wr["Parity"] = "N";
        wr.back();
      wr.back(); // </example3>

    wr.back(); // </root>
}

Here is the call graph for this function:

Here is the caller graph for this function: