|
From: <den...@us...> - 2010-09-11 19:59:43
|
Revision: 132
http://dsim.svn.sourceforge.net/dsim/?rev=132&view=rev
Author: denis_arnaud
Date: 2010-09-11 19:59:37 +0000 (Sat, 11 Sep 2010)
Log Message:
-----------
[Test] Improved memory handling for the Boost.Intrusive example. It is now closer to the StdAir library usage.
Modified Paths:
--------------
trunk/dsim/test/boost/intrusive/BomAbstract.hpp
trunk/dsim/test/boost/intrusive/FlightDate.hpp
trunk/dsim/test/boost/intrusive/LegDate.hpp
trunk/dsim/test/boost/intrusive/SegmentDate.hpp
Modified: trunk/dsim/test/boost/intrusive/BomAbstract.hpp
===================================================================
--- trunk/dsim/test/boost/intrusive/BomAbstract.hpp 2010-09-11 19:54:29 UTC (rev 131)
+++ trunk/dsim/test/boost/intrusive/BomAbstract.hpp 2010-09-11 19:59:37 UTC (rev 132)
@@ -17,13 +17,21 @@
/** BomAbstract. */
class BomAbstract {
public:
+ /** Constructors. */
BomAbstract (const std::string& iKey) : _key (iKey) {}
BomAbstract (const int idx) {
std::ostringstream oStr;
oStr << idx;
_key = oStr.str();
}
+ protected:
+ /** Default constructors.
+ <br>They are kept private, so as to forbid their use (only the
+ public constructors should be used). */
+ BomAbstract () {}
+ BomAbstract (const BomAbstract&) {}
+ public:
// Comparison operators
friend bool operator== (const BomAbstract &a, const BomAbstract &b) {
return a._key == b._key;
Modified: trunk/dsim/test/boost/intrusive/FlightDate.hpp
===================================================================
--- trunk/dsim/test/boost/intrusive/FlightDate.hpp 2010-09-11 19:54:29 UTC (rev 131)
+++ trunk/dsim/test/boost/intrusive/FlightDate.hpp 2010-09-11 19:59:37 UTC (rev 132)
@@ -23,7 +23,14 @@
FlightDate (const int idx) : BomAbstract (idx) {}
/** Destructor. */
~FlightDate() {}
-
+ private:
+ /** Default constructors.
+ <br>They are kept private, so as to forbid their use (only the
+ public constructors should be used). */
+ FlightDate () {}
+ FlightDate (const FlightDate&) {}
+
+ public:
bi::list_member_hook<> _childHook;
public:
Modified: trunk/dsim/test/boost/intrusive/LegDate.hpp
===================================================================
--- trunk/dsim/test/boost/intrusive/LegDate.hpp 2010-09-11 19:54:29 UTC (rev 131)
+++ trunk/dsim/test/boost/intrusive/LegDate.hpp 2010-09-11 19:59:37 UTC (rev 132)
@@ -20,7 +20,14 @@
public:
LegDate (const std::string& iKey) : BomAbstract (iKey) {}
LegDate (const int idx) : BomAbstract (idx) {}
-
+ private:
+ /** Default constructors.
+ <br>They are kept private, so as to forbid their use (only the
+ public constructors should be used). */
+ LegDate () {}
+ LegDate (const LegDate&) {}
+
+ public:
bi::list_member_hook<> _childHook;
bi::list_member_hook<> _siblingHook;
Modified: trunk/dsim/test/boost/intrusive/SegmentDate.hpp
===================================================================
--- trunk/dsim/test/boost/intrusive/SegmentDate.hpp 2010-09-11 19:54:29 UTC (rev 131)
+++ trunk/dsim/test/boost/intrusive/SegmentDate.hpp 2010-09-11 19:59:37 UTC (rev 132)
@@ -20,7 +20,14 @@
public:
SegmentDate (const std::string& iKey) : BomAbstract (iKey) {}
SegmentDate (const int idx) : BomAbstract (idx) {}
-
+ private:
+ /** Default constructors.
+ <br>They are kept private, so as to forbid their use (only the
+ public constructors should be used). */
+ SegmentDate () {}
+ SegmentDate (const SegmentDate&) {}
+
+ public:
bi::list_member_hook<> _childHook;
bi::list_member_hook<> _siblingHook;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|