diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-27 09:53:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-27 11:25:34 +0200 |
commit | 834cbda1ec3f8b4fd5e64da4f8ff2f9072e35989 (patch) | |
tree | 1412a39545598b004ae8751ffc2ed2f90f538746 /include | |
parent | 67466a19752d73540e13697b91ca58429f6a64ac (diff) |
move SvRefMemberList into idl
since it's only usage is there
Change-Id: I882ddd3e08ab37cf7b3cca8121463598ea3d3bc4
Diffstat (limited to 'include')
-rw-r--r-- | include/tools/ref.hxx | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx index 93b0c564c594..e27277787cb3 100644 --- a/include/tools/ref.hxx +++ b/include/tools/ref.hxx @@ -20,11 +20,8 @@ #define INCLUDED_TOOLS_REF_HXX #include <sal/config.h> - #include <cassert> - #include <tools/toolsdllapi.h> -#include <vector> /** This implements similar functionality to boost::intrusive_ptr @@ -92,55 +89,6 @@ protected: } -template<typename T> -class SvRefMemberList : private std::vector<T> -{ -private: - typedef typename std::vector<T> base_t; - -public: - using base_t::size; - using base_t::front; - using base_t::back; - using base_t::operator[]; - using base_t::begin; - using base_t::end; - using typename base_t::iterator; - using typename base_t::const_iterator; - using base_t::rbegin; - using base_t::rend; - using typename base_t::reverse_iterator; - using base_t::empty; - - inline ~SvRefMemberList() { clear(); } - inline void clear() - { - for( typename base_t::const_iterator it = base_t::begin(); it != base_t::end(); ++it ) - { - T p = *it; - if( p ) - p->ReleaseRef(); - } - base_t::clear(); - } - - inline void push_back( T p ) - { - base_t::push_back( p ); - p->AddFirstRef(); - } - - inline T pop_back() - { - T p = base_t::back(); - base_t::pop_back(); - if( p ) - p->ReleaseRef(); - return p; - } -}; - - /** Classes that want to be referenced-counted via SvRef<T>, should extend this base class */ class TOOLS_DLLPUBLIC SvRefBase { |