diff options
author | Othmar Gsenger <otti@anytun.org> | 2007-12-23 12:55:43 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2007-12-23 12:55:43 +0000 |
commit | 2d299769941907cb55df955754f0ca6869c0b1ae (patch) | |
tree | 5c886d636a816bfd520e2a9edd706083e2d02c40 /syncQueue.cpp | |
parent | added SyncQueue and SyncSocketHandler (diff) |
activated online syncing
Diffstat (limited to 'syncQueue.cpp')
-rw-r--r-- | syncQueue.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/syncQueue.cpp b/syncQueue.cpp index ba858ee..7d3c35f 100644 --- a/syncQueue.cpp +++ b/syncQueue.cpp @@ -31,7 +31,24 @@ #include "threadUtils.hpp" #include "datatypes.h" +#include <sstream> +#include <iostream> +#include <string> + +#include <boost/archive/text_oarchive.hpp> +#include <boost/archive/text_iarchive.hpp> + + #include "syncQueue.h" +void SyncQueue::push(const SyncCommand & scom ) +{ + std::ostringstream sout; + boost::archive::text_oarchive oa(sout); + oa << scom; + + Lock lock(mutex_); + queue_.push(sout.str()); +} void SyncQueue::push(const std::string & str ) { |