Skip to content

Commit

Permalink
- don't use factory
Browse files Browse the repository at this point in the history
  • Loading branch information
aschnell committed Aug 14, 2012
1 parent 8309661 commit a07ba24
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
5 changes: 3 additions & 2 deletions examples/Create.cc
Expand Up @@ -2,7 +2,6 @@
#include <stdlib.h>
#include <iostream>

#include <snapper/Factory.h>
#include <snapper/Snapper.h>

using namespace snapper;
Expand All @@ -11,9 +10,11 @@ using namespace std;
int
main(int argc, char** argv)
{
Snapper* sh = createSnapper();
Snapper* sh = new Snapper();

sh->createSingleSnapshot("test");

delete sh;

exit(EXIT_SUCCESS);
}
9 changes: 4 additions & 5 deletions examples/CreateTimeline.cc
Expand Up @@ -3,7 +3,6 @@
#include <vector>
#include <iostream>

#include <snapper/Factory.h>
#include <snapper/Snapper.h>

using namespace snapper;
Expand All @@ -13,7 +12,7 @@ using namespace std;
void
deleteAll()
{
Snapper* sh = createSnapper("testsuite");
Snapper* sh = new Snapper("testsuite");

Snapshots snapshots = sh->getSnapshots();

Expand All @@ -25,7 +24,7 @@ deleteAll()
for (vector<Snapshots::iterator>::iterator it = tmp.begin(); it != tmp.end(); ++it)
sh->deleteSnapshot(*it);

deleteSnapper(sh);
delete sh;
}


Expand All @@ -34,7 +33,7 @@ main()
{
deleteAll();

Snapper* sh = createSnapper("testsuite");
Snapper* sh = new Snapper("testsuite");

time_t t = time(NULL) - 100 * 24*60*60;
while (t < time(NULL))
Expand All @@ -46,7 +45,7 @@ main()
t += 60*60;
}

deleteSnapper(sh);
delete sh;

exit(EXIT_SUCCESS);
}
5 changes: 3 additions & 2 deletions examples/List.cc
Expand Up @@ -2,7 +2,6 @@
#include <stdlib.h>
#include <iostream>

#include <snapper/Factory.h>
#include <snapper/Snapper.h>

using namespace snapper;
Expand All @@ -11,13 +10,15 @@ using namespace std;
int
main(int argc, char** argv)
{
Snapper* sh = createSnapper();
Snapper* sh = new Snapper();

const Snapshots& snapshots = sh->getSnapshots();
for (Snapshots::const_iterator it = snapshots.begin(); it != snapshots.end(); ++it)
{
cout << *it << endl;
}

delete sh;

exit(EXIT_SUCCESS);
}
1 change: 0 additions & 1 deletion examples/ListAll.cc
Expand Up @@ -2,7 +2,6 @@
#include <stdlib.h>
#include <iostream>

#include <snapper/Factory.h>
#include <snapper/Snapper.h>

using namespace snapper;
Expand Down
1 change: 0 additions & 1 deletion examples/SnapTest.cc
Expand Up @@ -2,7 +2,6 @@
#include <stdlib.h>
#include <iostream>

#include <snapper/Factory.h>
#include <snapper/Snapper.h>
#include <snapper/Comparison.h>
#include <snapper/File.h>
Expand Down

0 comments on commit a07ba24

Please sign in to comment.