Commit c4215848 authored by dickelbeck's avatar dickelbeck

refinements

parent 6ae1471e
...@@ -56,7 +56,7 @@ void DHEAD::DestructAll() ...@@ -56,7 +56,7 @@ void DHEAD::DestructAll()
} }
void DHEAD::Append( EDA_BaseStruct* aNewElement ) void DHEAD::append( EDA_BaseStruct* aNewElement )
{ {
wxASSERT( aNewElement != NULL ); wxASSERT( aNewElement != NULL );
...@@ -85,12 +85,12 @@ void DHEAD::Append( EDA_BaseStruct* aNewElement ) ...@@ -85,12 +85,12 @@ void DHEAD::Append( EDA_BaseStruct* aNewElement )
} }
void DHEAD::Insert( EDA_BaseStruct* aNewElement, EDA_BaseStruct* aAfterMe ) void DHEAD::insert( EDA_BaseStruct* aNewElement, EDA_BaseStruct* aAfterMe )
{ {
wxASSERT( aNewElement != NULL ); wxASSERT( aNewElement != NULL );
if( !aAfterMe ) if( !aAfterMe )
Append( aNewElement ); append( aNewElement );
else else
{ {
wxASSERT( aAfterMe->GetList() == this ); wxASSERT( aAfterMe->GetList() == this );
...@@ -126,7 +126,7 @@ void DHEAD::Insert( EDA_BaseStruct* aNewElement, EDA_BaseStruct* aAfterMe ) ...@@ -126,7 +126,7 @@ void DHEAD::Insert( EDA_BaseStruct* aNewElement, EDA_BaseStruct* aAfterMe )
} }
void DHEAD::Remove( EDA_BaseStruct* aElement ) void DHEAD::remove( EDA_BaseStruct* aElement )
{ {
wxASSERT( aElement ); wxASSERT( aElement );
wxASSERT( aElement->GetList() == this ); wxASSERT( aElement->GetList() == this );
......
...@@ -58,32 +58,32 @@ protected: ...@@ -58,32 +58,32 @@ protected:
~DHEAD(); ~DHEAD();
/** /**
* Function Append * Function append
* adds \a aNewElement to the end of the list. * adds \a aNewElement to the end of the list.
*/ */
void Append( EDA_BaseStruct* aNewElement ); void append( EDA_BaseStruct* aNewElement );
/** /**
* Function Insert * Function insert
* puts aNewElement just in front of aElementAfterMe in the list sequence. * puts aNewElement just in front of aElementAfterMe in the list sequence.
* If aElementAfterMe is NULL, then simply Append() * If aElementAfterMe is NULL, then simply Append()
*/ */
void Insert( EDA_BaseStruct* aNewElement, EDA_BaseStruct* aElementAfterMe ); void insert( EDA_BaseStruct* aNewElement, EDA_BaseStruct* aElementAfterMe );
/** /**
* Function Insert * Function insert
* puts aNewElement in front of list sequence. * puts aNewElement in front of list sequence.
*/ */
void Insert( EDA_BaseStruct* aNewElement ) void insert( EDA_BaseStruct* aNewElement )
{ {
Insert( aNewElement, first ); insert( aNewElement, first );
} }
/** /**
* Function Remove * Function remove
* removes \a aElement from the list, but does not delete it. * removes \a aElement from the list, but does not delete it.
*/ */
void Remove( EDA_BaseStruct* aElement ); void remove( EDA_BaseStruct* aElement );
public: public:
...@@ -147,7 +147,7 @@ public: ...@@ -147,7 +147,7 @@ public:
*/ */
void Append( T* aNewElement ) void Append( T* aNewElement )
{ {
DHEAD::Append( aNewElement ); append( aNewElement );
} }
/** /**
...@@ -157,7 +157,7 @@ public: ...@@ -157,7 +157,7 @@ public:
*/ */
void Insert( T* aNewElement, T* aElementAfterMe ) void Insert( T* aNewElement, T* aElementAfterMe )
{ {
DHEAD::Insert( aNewElement, aElementAfterMe ); insert( aNewElement, aElementAfterMe );
} }
/** /**
...@@ -166,16 +166,18 @@ public: ...@@ -166,16 +166,18 @@ public:
*/ */
void Insert( T* aNewElement ) void Insert( T* aNewElement )
{ {
DHEAD::Insert( aNewElement ); insert( aNewElement );
} }
/** /**
* Function Remove * Function Remove
* removes \a aElement from the list, but does not delete it. * removes \a aElement from the list, but does not delete it.
* @return T* - the removed element, so you can easily delete it upon return.
*/ */
void Remove( T* aElement ) T* Remove( T* aElement )
{ {
DHEAD::Remove( aElement ); remove( aElement );
return aElement;
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment