summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-07-02 10:49:24 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-07-02 10:49:24 +0800
commit61858103ef9efdc7db7d2a213aabefa52390b445 (patch)
tree2bd8cf6cfb8d098dff9fda05b98f28c11b349bbe /include
parentd56524e79e4e2d2563c3788e12b431a0c2bc973c (diff)
downloadzcomp-61858103ef9efdc7db7d2a213aabefa52390b445.tar.gz
zcomp-61858103ef9efdc7db7d2a213aabefa52390b445.tar.bz2
Simplify serialization interface
Diffstat (limited to 'include')
-rw-r--r--include/core/serialization.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/core/serialization.h b/include/core/serialization.h
index cb9ea1a..54f9e57 100644
--- a/include/core/serialization.h
+++ b/include/core/serialization.h
@@ -30,6 +30,9 @@
#include <core/timer.h>
#include <core/propertywriter.h>
+#include <typeinfo>
+#include <boost/preprocessor/cat.hpp>
+
#include <boost/archive/text_iarchive.hpp>
#include <boost/archive/text_oarchive.hpp>
@@ -119,7 +122,6 @@ class PluginStateWriter
}
PluginStateWriter (T *instance,
- CompString pluginName,
Window xid) :
mResource (xid),
mClassPtr (instance)
@@ -127,8 +129,8 @@ class PluginStateWriter
if (screen->shouldSerializePlugins ())
{
- CompString atomName = CompString ("_COMPIZ_") + pluginName +
- CompString ("_STATE");
+ CompString atomName = compPrintf ("_COMPIZ_%s_STATE",
+ typeid (T).name ());
CompOption::Vector o;
o.resize (1);