Commit 123e61f7 authored by neverlord's avatar neverlord

serialization tests

parent cc1a1fc6
...@@ -6,5 +6,6 @@ test ...@@ -6,5 +6,6 @@ test
*.png *.png
*.dat *.dat
queue_test queue_test
cppa.creator.user.1.3
8threads 8threads
4threads 4threads
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<qtcreator> <qtcreator>
<data> <data>
<variable>GenericProjectManager.GenericProject.Toolchain</variable> <variable>GenericProjectManager.GenericProject.Toolchain</variable>
<value type="QString"></value> <value type="QString">ProjectExplorer.ToolChain.Gcc:/opt/local/bin/g++-mp-4.6.x86-macos-generic-mach_o-64bit.</value>
</data> </data>
<data> <data>
<variable>ProjectExplorer.Project.ActiveTarget</variable> <variable>ProjectExplorer.Project.ActiveTarget</variable>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value> <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap"> <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
<value key="GenericProjectManager.GenericBuildConfiguration.BuildDirectory" type="QString">/Users/neverlord/libcppa</value> <value key="GenericProjectManager.GenericBuildConfiguration.BuildDirectory" type="QString">/Users/neverlord/libcppa</value>
<value key="ProjectExplorer.BuildCOnfiguration.ToolChain" type="QString">INVALID</value> <value key="ProjectExplorer.BuildCOnfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-macos-generic-mach_o-64bit.</value>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap"> <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap"> <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
<valuelist key="GenericProjectManager.GenericMakeStep.BuildTargets" type="QVariantList"> <valuelist key="GenericProjectManager.GenericMakeStep.BuildTargets" type="QVariantList">
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap"> <valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap"> <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value> <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deployment</value> <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Deploy</value> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Deploy</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap> </valuemap>
...@@ -115,7 +115,9 @@ ...@@ -115,7 +115,9 @@
<value key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase" type="int">2</value> <value key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase" type="int">2</value>
<value key="ProjectExplorer.CustomExecutableRunConfiguration.Executable" type="QString">/Users/neverlord/libcppa/test</value> <value key="ProjectExplorer.CustomExecutableRunConfiguration.Executable" type="QString">/Users/neverlord/libcppa/test</value>
<value key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal" type="bool">false</value> <value key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal" type="bool">false</value>
<valuelist key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges" type="QVariantList"/> <valuelist key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges" type="QVariantList">
<value type="QString">DYLD_LIBRARY_PATH=/Users/neverlord/libcppa</value>
</valuelist>
<value key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory" type="QString">%{buildDir}</value> <value key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory" type="QString">%{buildDir}</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Führe /Users/neverlord/libcppa/test aus</value> <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Führe /Users/neverlord/libcppa/test aus</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">test</value> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">test</value>
...@@ -133,7 +135,7 @@ ...@@ -133,7 +135,7 @@
</data> </data>
<data> <data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QString">{349f52bc-ac64-4a14-898f-d44d989b22a2}</value> <value type="QString">{07fcd197-092d-45a0-8500-3be614e6ae31}</value>
</data> </data>
<data> <data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable> <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
......
...@@ -118,3 +118,6 @@ src/to_uniform_name.cpp ...@@ -118,3 +118,6 @@ src/to_uniform_name.cpp
cppa/detail/default_uniform_type_info_impl.hpp cppa/detail/default_uniform_type_info_impl.hpp
src/object.cpp src/object.cpp
cppa/util/comparable.hpp cppa/util/comparable.hpp
cppa/util/disable_if.hpp
cppa/util/if_else_type.hpp
cppa/util/wrapped_type.hpp
...@@ -109,7 +109,7 @@ class uniform_type_info : cppa::util::comparable<uniform_type_info> ...@@ -109,7 +109,7 @@ class uniform_type_info : cppa::util::comparable<uniform_type_info>
public: public:
/** /**
* @brief Get instances by its uniform name. * @brief Get instance by uniform name.
* @param uniform_name The libCPPA internal name for a type. * @param uniform_name The libCPPA internal name for a type.
* @return The instance associated to @p uniform_name. * @return The instance associated to @p uniform_name.
*/ */
...@@ -144,7 +144,7 @@ class uniform_type_info : cppa::util::comparable<uniform_type_info> ...@@ -144,7 +144,7 @@ class uniform_type_info : cppa::util::comparable<uniform_type_info>
/** /**
* @brief Add a new type mapping to the libCPPA internal type system. * @brief Add a new type mapping to the libCPPA internal type system.
* @return <code>true</code> if @p uniform_type was added as known * @return <code>true</code> if @p uniform_type was added as known
* instance (mapped to @p plain_type); otherwise <code>false</code> * instance (mapped to @p plain_type); otherwise @c false
* is returned and @p uniform_type was deleted. * is returned and @p uniform_type was deleted.
*/ */
static bool announce(const std::type_info& plain_type, static bool announce(const std::type_info& plain_type,
......
#ifndef DISABLE_IF_HPP
#define DISABLE_IF_HPP
namespace cppa { namespace util {
template<bool Stmt, typename T>
struct disable_if_c { };
template<typename T>
struct disable_if_c<false, T>
{
typedef T type;
};
template<class Trait, typename T = void>
struct disable_if : disable_if_c<Trait::value, T>
{
};
} } // namespace cppa::util
#endif // DISABLE_IF_HPP
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
namespace cppa { namespace util { namespace cppa { namespace util {
template<bool Stmt, typename T = void> template<bool Stmt, typename T = void>
struct enable_if_c { }; struct enable_if_c
{
};
template<typename T> template<typename T>
struct enable_if_c<true, T> struct enable_if_c<true, T>
......
#ifndef IF_ELSE_TYPE_HPP
#define IF_ELSE_TYPE_HPP
#include "cppa/util/wrapped_type.hpp"
namespace cppa { namespace util {
// if (IfStmt == true) type = T; else type = Else::type;
template<bool IfStmt, typename T, class Else>
struct if_else_type_c
{
typedef T type;
};
template<typename T, class Else>
struct if_else_type_c<false, T, Else>
{
typedef typename Else::type type;
};
// if (Stmt::value == true) type = T; else type = Else::type;
template<class Stmt, typename T, class Else>
struct if_else_type : if_else_type_c<Stmt::value, T, Else> { };
} } // namespace cppa::util
#endif // IF_ELSE_TYPE_HPP
#ifndef WRAPPED_TYPE_HPP
#define WRAPPED_TYPE_HPP
namespace cppa { namespace util {
template<typename T>
struct wrapped_type { typedef T type; };
} } // namespace cppa::util
#endif // WRAPPED_TYPE_HPP
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment