aboutsummaryrefslogtreecommitdiff
path: root/common/wrapper/test.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/wrapper/test.hxx')
-rw-r--r--common/wrapper/test.hxx31
1 files changed, 29 insertions, 2 deletions
diff --git a/common/wrapper/test.hxx b/common/wrapper/test.hxx
index b28d7a0..6a1e0a9 100644
--- a/common/wrapper/test.hxx
+++ b/common/wrapper/test.hxx
@@ -69,7 +69,7 @@ struct comp1
};
inline bool
-operator== (const comp1& x, const comp1 y)
+operator== (const comp1& x, const comp1& y)
{
return x.str == y.str && x.num == y.num;
}
@@ -88,7 +88,7 @@ struct comp2
};
inline bool
-operator== (const comp2& x, const comp2 y)
+operator== (const comp2& x, const comp2& y)
{
return x.str == y.str && x.num == y.num && x.strs == y.strs;
}
@@ -122,4 +122,31 @@ struct comp_object2
std::auto_ptr<comp3> c3;
};
+//
+// Containers.
+//
+
+#pragma db value
+struct cont_comp
+{
+ int num;
+ std::auto_ptr<std::vector<std::string> > strs;
+};
+
+inline bool
+operator== (const cont_comp& x, const cont_comp& y)
+{
+ return x.num == y.num && *x.strs == *y.strs;
+}
+
+#pragma db object
+struct cont_object
+{
+ #pragma db id auto
+ unsigned long id_;
+
+ std::auto_ptr<std::vector<int> > vi; // Wrapped container.
+ cont_comp c; // Wrapped container in comp value.
+};
+
#endif // TEST_HXX