summaryrefslogtreecommitdiff
path: root/cosv/inc/cosv/tpl/swelist.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'cosv/inc/cosv/tpl/swelist.hxx')
-rw-r--r--cosv/inc/cosv/tpl/swelist.hxx152
1 files changed, 76 insertions, 76 deletions
diff --git a/cosv/inc/cosv/tpl/swelist.hxx b/cosv/inc/cosv/tpl/swelist.hxx
index d8d52ed79104..c0f06f3a5031 100644
--- a/cosv/inc/cosv/tpl/swelist.hxx
+++ b/cosv/inc/cosv/tpl/swelist.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
@@ -47,19 +47,19 @@ class SweListElement
typedef SweListElement<XX> self;
SweListElement(
- const XX & in_aObj )
- : aObj(in_aObj), pNext(0) {}
+ const XX & in_aObj )
+ : aObj(in_aObj), pNext(0) {}
- const XX & Obj() const { return aObj; }
- XX & Obj() { return aObj; }
- self * Next() const { return pNext; }
+ const XX & Obj() const { return aObj; }
+ XX & Obj() { return aObj; }
+ self * Next() const { return pNext; }
- void SetNext(
+ void SetNext(
self * i_pNext )
{ pNext = i_pNext; }
private:
- XX aObj;
- self * pNext;
+ XX aObj;
+ self * pNext;
};
@@ -73,49 +73,49 @@ class SweList
{
public:
// TYPES
- typedef SweList<XX> self;
- typedef XX value_type;
- typedef SweListIterator<XX> iterator;
+ typedef SweList<XX> self;
+ typedef XX value_type;
+ typedef SweListIterator<XX> iterator;
typedef SweListCIterator<XX> const_iterator;
private:
typedef SweListElement<XX> elem;
public:
// LIFECYCLE
- SweList() : pTop(0), pTail(0) {}
- ~SweList() { erase_all(); }
+ SweList() : pTop(0), pTail(0) {}
+ ~SweList() { erase_all(); }
// OPERATIONS
- void push_front(
- const XX & i_aObj );
- void pop_front();
- void push_back(
- const XX & i_aObj );
- void erase_all();
+ void push_front(
+ const XX & i_aObj );
+ void pop_front();
+ void push_back(
+ const XX & i_aObj );
+ void erase_all();
// INQUIRY
- const_iterator begin() const { return pTop; }
- iterator begin() { return pTop; }
- const_iterator end() const { return (elem*)0; }
- iterator end() { return (elem*)0; }
- const XX & front() const { return pTop->Obj(); }
- XX & front() { return pTop->Obj(); }
- const XX & back() const { return pTail->Obj(); }
- XX & back() { return pTail->Obj(); }
+ const_iterator begin() const { return pTop; }
+ iterator begin() { return pTop; }
+ const_iterator end() const { return (elem*)0; }
+ iterator end() { return (elem*)0; }
+ const XX & front() const { return pTop->Obj(); }
+ XX & front() { return pTop->Obj(); }
+ const XX & back() const { return pTail->Obj(); }
+ XX & back() { return pTail->Obj(); }
- bool empty() const { return pTop == 0; }
- uintt size() const;
+ bool empty() const { return pTop == 0; }
+ uintt size() const;
private:
// Forbiddden methods.
SweList(
- const self & i_rList );
- self & operator=(
- const self & i_rList );
+ const self & i_rList );
+ self & operator=(
+ const self & i_rList );
// DATA
- DYN elem * pTop;
- elem * pTail;
+ DYN elem * pTop;
+ elem * pTail;
};
template <class XX>
@@ -123,39 +123,39 @@ class SweList_dyn
{
public:
// TYPES
- typedef SweList_dyn<XX> self;
+ typedef SweList_dyn<XX> self;
typedef SweListElement< XX* > elem;
- typedef SweListIterator< XX* > iterator;
+ typedef SweListIterator< XX* > iterator;
// LIFECYCLE
- SweList_dyn() : pTop(0), pTail(0) {}
- ~SweList_dyn() { erase_all(); }
+ SweList_dyn() : pTop(0), pTail(0) {}
+ ~SweList_dyn() { erase_all(); }
// OPERATIONS
- void push_front(
- XX * i_pObj );
- void push_back(
- XX * i_pObj );
- void pop_front();
- void erase_all();
+ void push_front(
+ XX * i_pObj );
+ void push_back(
+ XX * i_pObj );
+ void pop_front();
+ void erase_all();
// INQUIRY
- iterator begin() const { return pTop; }
- iterator end() const { return (elem*)0; }
- XX * front() const { return pTop->Obj(); }
- XX * back() const { return pTail->Obj(); }
+ iterator begin() const { return pTop; }
+ iterator end() const { return (elem*)0; }
+ XX * front() const { return pTop->Obj(); }
+ XX * back() const { return pTail->Obj(); }
- bool empty() const { return pTop == 0; }
- uintt size() const;
+ bool empty() const { return pTop == 0; }
+ uintt size() const;
private:
// Forbiddden methods.
SweList_dyn(
- const self & i_rList );
- self & operator=(
- const self & i_rList );
+ const self & i_rList );
+ self & operator=(
+ const self & i_rList );
- DYN elem * pTop;
- elem * pTail;
+ DYN elem * pTop;
+ elem * pTail;
};
@@ -169,23 +169,23 @@ class SweListIterator
typedef SweListElement<XX> elem;
SweListIterator(
- elem * i_pElem = 0)
- : pElem(i_pElem) { }
+ elem * i_pElem = 0)
+ : pElem(i_pElem) { }
// OPERATORS
- XX & operator*() const { return pElem->Obj(); }
- self & operator++() { if (pElem != 0) pElem = pElem->Next();
+ XX & operator*() const { return pElem->Obj(); }
+ self & operator++() { if (pElem != 0) pElem = pElem->Next();
return *this; }
- bool operator==(
- const self & i_rIter ) const
+ bool operator==(
+ const self & i_rIter ) const
{ return pElem == i_rIter.pElem; }
- bool operator!=(
- const self & i_rIter ) const
+ bool operator!=(
+ const self & i_rIter ) const
{ return pElem != i_rIter.pElem; }
private:
friend class SweListCIterator<XX>;
- elem * pElem;
+ elem * pElem;
};
template<class XX>
@@ -196,33 +196,33 @@ class SweListCIterator
typedef SweListElement<XX> elem;
SweListCIterator(
- const elem * i_pElem = 0)
- : pElem(i_pElem) { }
+ const elem * i_pElem = 0)
+ : pElem(i_pElem) { }
// OPERATORS
- self & operator=(
+ self & operator=(
const SweListIterator<XX> &
i_rIter )
{ pElem = i_rIter.pElem; return *this; }
- const XX & operator*() const { return pElem->Obj(); }
- self & operator++() { if (pElem != 0) pElem = pElem->Next();
+ const XX & operator*() const { return pElem->Obj(); }
+ self & operator++() { if (pElem != 0) pElem = pElem->Next();
return *this; }
- bool operator==(
- const self & i_rIter ) const
+ bool operator==(
+ const self & i_rIter ) const
{ return pElem == i_rIter.pElem; }
- bool operator!=(
- const self & i_rIter ) const
+ bool operator!=(
+ const self & i_rIter ) const
{ return pElem != i_rIter.pElem; }
private:
- const elem * pElem;
+ const elem * pElem;
};
// Implementierung
template <class XX>
void
-SweList<XX>::push_front( const XX & i_aObj )
+SweList<XX>::push_front( const XX & i_aObj )
{
DYN elem * dpNew = new elem(i_aObj);
dpNew->SetNext(pTop);