From: g0dil Date: Wed, 26 Aug 2009 15:40:55 +0000 (+0000) Subject: Re-add construct()/destruct() members (where did they go??) X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=a266a7c438396cfea4c17f95d1556471dfcc2317;p=senf.git Re-add construct()/destruct() members (where did they go??) git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1345 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Packets/ListBParser.cti b/senf/Packets/ListBParser.cti index ac603c3..7358fad 100644 --- a/senf/Packets/ListBParser.cti +++ b/senf/Packets/ListBParser.cti @@ -114,6 +114,20 @@ init(data_iterator i, state_type s) } template +prefix_ void +senf::detail::ListBParser_Policy::container_policy:: +construct(container_type & c) + const +{} + +template +prefix_ void +senf::detail::ListBParser_Policy::container_policy:: +destruct(container_type & c) + const +{} + +template prefix_ void senf::detail::ListBParser_Policy::container_policy:: erase(container_type & c, data_iterator p) { diff --git a/senf/Packets/ListBParser.ih b/senf/Packets/ListBParser.ih index fe61177..d8f7b11 100644 --- a/senf/Packets/ListBParser.ih +++ b/senf/Packets/ListBParser.ih @@ -107,9 +107,11 @@ namespace detail { size_type size (data_iterator i, state_type s) const; void init (data_iterator i, state_type s); - void erase (container_type & c, data_iterator p); - void insert (container_type & c, data_iterator p); - void update (container_type const & c) const; + void construct (container_type & c) const; + void destruct (container_type & c) const; + void erase (container_type & c, data_iterator p); + void insert (container_type & c, data_iterator p); + void update (container_type const & c) const; /** \brief Internal: ListBParser specific iterator data */ struct iterator_data {}; diff --git a/senf/Packets/ListNParser.cti b/senf/Packets/ListNParser.cti index ca46454..c10b375 100644 --- a/senf/Packets/ListNParser.cti +++ b/senf/Packets/ListNParser.cti @@ -68,6 +68,18 @@ prefix_ void senf::detail::ListNParser_Policy::init(dat template prefix_ void +senf::detail::ListNParser_Policy::construct(container_type & c) + const +{} + +template +prefix_ void +senf::detail::ListNParser_Policy::destruct(container_type & c) + const +{} + +template +prefix_ void senf::detail::ListNParser_Policy::erase(container_type & c, data_iterator p) const diff --git a/senf/Packets/ListNParser.ih b/senf/Packets/ListNParser.ih index db54348..f50bbfd 100644 --- a/senf/Packets/ListNParser.ih +++ b/senf/Packets/ListNParser.ih @@ -58,9 +58,11 @@ namespace detail { size_type size (data_iterator i, state_type s) const; void init (data_iterator i, state_type s) const; - void erase (container_type & c, data_iterator p) const; - void insert (container_type & c, data_iterator p) const; - void update (container_type const & c) const; + void construct (container_type & c) const; + void destruct (container_type & c) const; + void erase (container_type & c, data_iterator p) const; + void insert (container_type & c, data_iterator p) const; + void update (container_type const & c) const; /** Internal: ListNParser iterator specific data */ struct iterator_data { diff --git a/senf/Packets/ListParser.cti b/senf/Packets/ListParser.cti index a16ed88..286c325 100644 --- a/senf/Packets/ListParser.cti +++ b/senf/Packets/ListParser.cti @@ -222,12 +222,15 @@ prefix_ senf::ListParser_Container:: ListParser_Container(parser_type const & list) : ListPolicy(static_cast(list)), state_(list.state()), i_(std::distance(data().begin(),list.i())) -{} +{ + ListPolicy::construct(*this); +} template prefix_ senf::ListParser_Container::~ListParser_Container() { ListPolicy::update(*this); + ListPolicy::destruct(*this); } // Accessors