Revision: 1086
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1086&view=rev
Author: roman_yakovenko
Date: 2007-07-28 10:47:53 -0700 (Sat, 28 Jul 2007)
Log Message:
-----------
adding new test case for "constructor transformation"
Added Paths:
-----------
pyplusplus_dev/unittests/data/ft_constructor_to_be_exported.hpp
Added: pyplusplus_dev/unittests/data/ft_constructor_to_be_exported.hpp
===================================================================
--- pyplusplus_dev/unittests/data/ft_constructor_to_be_exported.hpp (rev 0)
+++ pyplusplus_dev/unittests/data/ft_constructor_to_be_exported.hpp 2007-07-28 17:47:53 UTC (rev 1086)
@@ -0,0 +1,37 @@
+// Copyright 2004 Roman Yakovenko.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef __ft_constructor_to_be_exported_hpp__
+#define __ft_constructor_to_be_exported_hpp__
+
+#include "boost/noncopyable.hpp"
+
+namespace ft_constructor{
+
+struct resources_t{
+ resources_t(){
+ std::cout << "created";
+ }
+ ~resources_t(){
+ std::cout << "destroyed";
+ }
+};
+
+struct holder_t : public boost::noncopyable{
+ holder_t(resources_t* r=0)
+ : resource( r )
+ {}
+
+ ~holder_t(){ delete resource; }
+
+ const resources_t* get_resource() const { return resource; }
+
+private:
+ resources_t* resource;
+};
+
+}
+
+#endif//__ft_constructor_to_be_exported_hpp__
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|