From ea68727d27e699200236b3b7ecbe36b7f7061cfc Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 18 Nov 2008 19:40:06 -0600 Subject: *Merge from Mangos. Add MapReference. Author: hunuza. *Also re-commit the patches reverted in 255. --HG-- branch : trunk --- src/framework/Utilities/LinkedReference/RefManager.h | 6 ++++-- src/framework/Utilities/LinkedReference/Reference.h | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/framework/Utilities/LinkedReference') diff --git a/src/framework/Utilities/LinkedReference/RefManager.h b/src/framework/Utilities/LinkedReference/RefManager.h index 40b7cade914..599c4efab39 100644 --- a/src/framework/Utilities/LinkedReference/RefManager.h +++ b/src/framework/Utilities/LinkedReference/RefManager.h @@ -10,12 +10,12 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _REFMANAGER_H @@ -33,7 +33,9 @@ template class RefManager : public LinkedListHead virtual ~RefManager() { clearReferences(); } Reference* getFirst() { return ((Reference*) LinkedListHead::getFirst()); } + Reference const* getFirst() const { return ((Reference const*) LinkedListHead::getFirst()); } Reference* getLast() { return ((Reference*) LinkedListHead::getLast()); } + Reference const* getLast() const { return ((Reference const*) LinkedListHead::getLast()); } iterator begin() { return iterator(getFirst()); } iterator end() { return iterator(NULL); } diff --git a/src/framework/Utilities/LinkedReference/Reference.h b/src/framework/Utilities/LinkedReference/Reference.h index 8e969669b99..ca837c81f91 100644 --- a/src/framework/Utilities/LinkedReference/Reference.h +++ b/src/framework/Utilities/LinkedReference/Reference.h @@ -10,12 +10,12 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _REFERENCE_H @@ -74,6 +74,7 @@ template class Reference : public LinkedListElement } Reference* next() { return((Reference*)LinkedListElement::next()); } + Referenceconst* next() const { return((Reference const*)LinkedListElement::next()); } Reference* prev() { return((Reference*)LinkedListElement::prev()); } inline TO* operator ->() const { return iRefTo; } -- cgit v1.2.3