src/Factory.cpp
author František Kučera <franta-hg@frantovo.cz>
Sun, 22 Jul 2018 00:08:13 +0200
branchv_0
changeset 14 733334eca89b
parent 9 src/RelationalWriter.cpp@0a40752e401d
child 20 bef6648e79b1
permissions -rw-r--r--
move create() method to a factory
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
#include "../include/RelationalWriter.h"
14
733334eca89b move create() method to a factory
František Kučera <franta-hg@frantovo.cz>
parents: 9
diff changeset
     2
#include "../include/Factory.h"
9
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
#include "StreamRelationalWriter.h"
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
namespace relpipe {
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
namespace writer {
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
14
733334eca89b move create() method to a factory
František Kučera <franta-hg@frantovo.cz>
parents: 9
diff changeset
     8
RelationalWriter* Factory::create(std::ostream& output) {
9
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
	return new StreamRelationalWriter(output);
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
}
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
}
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
}