summaryrefslogtreecommitdiff
path: root/o3tl/inc
diff options
context:
space:
mode:
Diffstat (limited to 'o3tl/inc')
-rw-r--r--o3tl/inc/o3tl/cow_wrapper.hxx34
-rw-r--r--o3tl/inc/o3tl/heap_ptr.hxx20
-rw-r--r--o3tl/inc/o3tl/lazy_update.hxx68
-rw-r--r--o3tl/inc/o3tl/range.hxx2
-rw-r--r--o3tl/inc/o3tl/vector_pool.hxx12
5 files changed, 68 insertions, 68 deletions
diff --git a/o3tl/inc/o3tl/cow_wrapper.hxx b/o3tl/inc/o3tl/cow_wrapper.hxx
index 143905a1ab89..88820d6e2952 100644
--- a/o3tl/inc/o3tl/cow_wrapper.hxx
+++ b/o3tl/inc/o3tl/cow_wrapper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,12 +60,12 @@ namespace o3tl
{
typedef oslInterlockedCount ref_count_t;
static void incrementCount( ref_count_t& rCount ) { osl_incrementInterlockedCount(&rCount); }
- static bool decrementCount( ref_count_t& rCount )
- {
+ static bool decrementCount( ref_count_t& rCount )
+ {
if( rCount == 1 ) // caller is already the only/last reference
return false;
else
- return osl_decrementInterlockedCount(&rCount) != 0;
+ return osl_decrementInterlockedCount(&rCount) != 0;
}
};
@@ -178,13 +178,13 @@ void cow_wrapper_client::queryUnmodified() const
*/
struct impl_t : private boost::noncopyable
{
- impl_t() :
+ impl_t() :
m_value(),
m_ref_count(1)
{
}
- explicit impl_t( const T& v ) :
+ explicit impl_t( const T& v ) :
m_value(v),
m_ref_count(1)
{
@@ -208,14 +208,14 @@ void cow_wrapper_client::queryUnmodified() const
/** Default-construct wrapped type instance
*/
- cow_wrapper() :
+ cow_wrapper() :
m_pimpl( new impl_t() )
{
}
/** Copy-construct wrapped type instance from given object
*/
- explicit cow_wrapper( const value_type& r ) :
+ explicit cow_wrapper( const value_type& r ) :
m_pimpl( new impl_t(r) )
{
}
@@ -241,7 +241,7 @@ void cow_wrapper_client::queryUnmodified() const
release();
m_pimpl = rSrc.m_pimpl;
-
+
return *this;
}
@@ -254,7 +254,7 @@ void cow_wrapper_client::queryUnmodified() const
release();
m_pimpl = pimpl;
}
-
+
return m_pimpl->m_value;
}
@@ -274,14 +274,14 @@ void cow_wrapper_client::queryUnmodified() const
{
std::swap(m_pimpl, r.m_pimpl);
}
-
- pointer operator->() { return &make_unique(); }
+
+ pointer operator->() { return &make_unique(); }
value_type& operator*() { return make_unique(); }
const_pointer operator->() const { return &m_pimpl->m_value; }
const value_type& operator*() const { return m_pimpl->m_value; }
pointer get() { return &make_unique(); }
- const_pointer get() const { return &m_pimpl->m_value; }
+ const_pointer get() const { return &m_pimpl->m_value; }
/// true, if both cow_wrapper internally share the same object
bool same_object( const cow_wrapper& rOther ) const
@@ -294,25 +294,25 @@ void cow_wrapper_client::queryUnmodified() const
};
- template<class T, class P> inline bool operator==( const cow_wrapper<T,P>& a,
+ template<class T, class P> inline bool operator==( const cow_wrapper<T,P>& a,
const cow_wrapper<T,P>& b )
{
return a.same_object(b) ? true : *a == *b;
}
- template<class T, class P> inline bool operator!=( const cow_wrapper<T,P>& a,
+ template<class T, class P> inline bool operator!=( const cow_wrapper<T,P>& a,
const cow_wrapper<T,P>& b )
{
return a.same_object(b) ? false : *a != *b;
}
- template<class A, class B, class P> inline bool operator<( const cow_wrapper<A,P>& a,
+ template<class A, class B, class P> inline bool operator<( const cow_wrapper<A,P>& a,
const cow_wrapper<B,P>& b )
{
return *a < *b;
}
- template<class T, class P> inline void swap( cow_wrapper<T,P>& a,
+ template<class T, class P> inline void swap( cow_wrapper<T,P>& a,
cow_wrapper<T,P>& b )
{
a.swap(b);
diff --git a/o3tl/inc/o3tl/heap_ptr.hxx b/o3tl/inc/o3tl/heap_ptr.hxx
index 3fe1e1c6e541..025666c0bc7d 100644
--- a/o3tl/inc/o3tl/heap_ptr.hxx
+++ b/o3tl/inc/o3tl/heap_ptr.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -105,7 +105,7 @@ class heap_ptr
const T & operator*() const;
T & operator*();
const T * operator->() const;
- T * operator->();
+ T * operator->();
/// True, if pHeapObject != 0.
#ifndef __SUNPRO_CC
@@ -123,33 +123,33 @@ class heap_ptr
Such, multiple assignment of the same pointer to the same
instance of heap_ptr<> is possible (though not recommended).
*/
- void reset(
+ void reset(
T * pass_heapObject );
/** @return An object on the heap that must be deleted by the caller,
or 0.
@postcond get() == 0;
*/
- T * release();
+ T * release();
void swap(
self & io_other );
/// True, if pHeapObject != 0.
- bool is() const;
- const T * get() const;
- T * get();
+ bool is() const;
+ const T * get() const;
+ T * get();
private:
// Forbidden functions:
heap_ptr( const self & ); /// Prevent copies.
- self & operator=( const self & ); /// Prevent copies.
+ self & operator=( const self & ); /// Prevent copies.
/// @attention Does not set ->pHeapObject = 0.
- void internal_delete();
+ void internal_delete();
// DATA
/// Will be deleted, when *this is destroyed.
- T * pHeapObject;
+ T * pHeapObject;
};
diff --git a/o3tl/inc/o3tl/lazy_update.hxx b/o3tl/inc/o3tl/lazy_update.hxx
index 08c7b12375c1..c8abfefd9abf 100644
--- a/o3tl/inc/o3tl/lazy_update.hxx
+++ b/o3tl/inc/o3tl/lazy_update.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -103,13 +103,13 @@ output( myValue.getOutValue() );
void setInValue( input_type const& rIn ) { Functor::m_bCacheDirty = true; m_aInput = rIn; }
input_type const& getInValue() const { return m_aInput; }
output_type const& getOutValue() const { return implUpdateValue(m_aInput); }
-
+
input_type& operator*() { Functor::m_bCacheDirty = true; return m_aInput; }
input_type* operator->() { Functor::m_bCacheDirty = true; return &m_aInput; }
output_type const& operator*() const { return implUpdateValue(m_aInput); }
output_type const* operator->() const { return &implUpdateValue(m_aInput); }
-
+
private:
input_type m_aInput;
};
@@ -180,25 +180,25 @@ output( myValue.getOutValue() );
// -----------------------------------------------------------------------------------------------------
- // partial specializations for the three LAZYUPDATE_* tags
+ // partial specializations for the three LAZYUPDATE_* tags
template< typename InputType, typename OutputType > class LazyUpdate<InputType,
OutputType,
- LAZYUPDATE_DIRECT_TAG> :
- public detail::LazyUpdateImpl<InputType,
- OutputType,
- detail::DefaultFunctor<InputType, OutputType> >
+ LAZYUPDATE_DIRECT_TAG> :
+ public detail::LazyUpdateImpl<InputType,
+ OutputType,
+ detail::DefaultFunctor<InputType, OutputType> >
{
public:
LazyUpdate() {}
- explicit LazyUpdate( InputType const& rIn ) :
- detail::LazyUpdateImpl<InputType,
- OutputType,
- detail::DefaultFunctor<InputType, OutputType> >(
+ explicit LazyUpdate( InputType const& rIn ) :
+ detail::LazyUpdateImpl<InputType,
+ OutputType,
+ detail::DefaultFunctor<InputType, OutputType> >(
rIn,
detail::LazyUpdateImpl<
- InputType,
- OutputType,
+ InputType,
+ OutputType,
detail::DefaultFunctor<InputType, OutputType> >::UNARY_CONSTRUCTOR_TAG )
{}
};
@@ -207,29 +207,29 @@ output( myValue.getOutValue() );
template< typename InputType, typename OutputType > class LazyUpdate<InputType,
OutputType,
- LAZYUPDATE_FUNCTION_TAG> :
- public detail::LazyUpdateImpl<InputType,
- OutputType,
+ LAZYUPDATE_FUNCTION_TAG> :
+ public detail::LazyUpdateImpl<InputType,
+ OutputType,
detail::FunctionPointer<
- InputType,
+ InputType,
OutputType,
OutputType (*)( InputType const& ) > >
{
public:
explicit LazyUpdate( OutputType (*pFunc)( InputType const& ) ) :
- detail::LazyUpdateImpl<InputType,
- OutputType,
+ detail::LazyUpdateImpl<InputType,
+ OutputType,
detail::FunctionPointer<
- InputType,
+ InputType,
OutputType,
OutputType (*)( InputType const& )> >(pFunc)
{}
LazyUpdate( OutputType (*pFunc)( InputType const& ),
InputType const& rIn ) :
- detail::LazyUpdateImpl<InputType,
- OutputType,
+ detail::LazyUpdateImpl<InputType,
+ OutputType,
detail::FunctionPointer<
- InputType,
+ InputType,
OutputType,
OutputType (*)( InputType const& )> >(pFunc,rIn)
{}
@@ -239,29 +239,29 @@ output( myValue.getOutValue() );
template< typename InputType, typename OutputType > class LazyUpdate<InputType,
OutputType,
- LAZYUPDATE_FUNCTOR_TAG> :
- public detail::LazyUpdateImpl<InputType,
- OutputType,
+ LAZYUPDATE_FUNCTOR_TAG> :
+ public detail::LazyUpdateImpl<InputType,
+ OutputType,
detail::FunctionPointer<
- InputType,
+ InputType,
OutputType,
boost::function1<OutputType,InputType> > >
{
public:
explicit LazyUpdate( boost::function1<OutputType,InputType> const& rFunc ) :
- detail::LazyUpdateImpl<InputType,
- OutputType,
+ detail::LazyUpdateImpl<InputType,
+ OutputType,
detail::FunctionPointer<
- InputType,
+ InputType,
OutputType,
boost::function1<OutputType,InputType> > >(rFunc)
{}
LazyUpdate( boost::function1<OutputType,InputType> const& rFunc,
InputType const& rIn ) :
- detail::LazyUpdateImpl<InputType,
- OutputType,
+ detail::LazyUpdateImpl<InputType,
+ OutputType,
detail::FunctionPointer<
- InputType,
+ InputType,
OutputType,
boost::function1<OutputType,InputType> > >(rFunc,rIn)
{}
diff --git a/o3tl/inc/o3tl/range.hxx b/o3tl/inc/o3tl/range.hxx
index 633415ca4b47..e12e3faa6204 100644
--- a/o3tl/inc/o3tl/range.hxx
+++ b/o3tl/inc/o3tl/range.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/o3tl/inc/o3tl/vector_pool.hxx b/o3tl/inc/o3tl/vector_pool.hxx
index da562e3eb000..1198e4e6d79b 100644
--- a/o3tl/inc/o3tl/vector_pool.hxx
+++ b/o3tl/inc/o3tl/vector_pool.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,14 +39,14 @@ namespace o3tl
{
namespace detail
{
- template<typename ValueType, class Container> class simple_pool_impl :
+ template<typename ValueType, class Container> class simple_pool_impl :
public Container
{
typedef typename Container::value_type value_type;
std::ptrdiff_t mnFirstFreeIndex;
public:
- simple_pool_impl() :
+ simple_pool_impl() :
mnFirstFreeIndex(-1)
{}
@@ -103,7 +103,7 @@ namespace o3tl
{}
ValueType value;
- std::ptrdiff_t nextFree;
+ std::ptrdiff_t nextFree;
};
};
}
@@ -124,8 +124,8 @@ myPool[nIdx] = myVal;
myPool.free(nIdx);
</pre>
*/
- template<typename ValueType> struct vector_pool :
- public detail::simple_pool_impl<ValueType,
+ template<typename ValueType> struct vector_pool :
+ public detail::simple_pool_impl<ValueType,
std::vector<typename detail::struct_from_value<ValueType>::type > >
{};
}