reference_list.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _KJS_REFERENCE_LIST_H_
00024 #define _KJS_REFERENCE_LIST_H_
00025
00026 #include "types.h"
00027 #include "reference.h"
00028
00029 namespace KJS {
00030
00031 class ReferenceListNode;
00032 class ReferenceListHeadNode;
00033
00034 class ReferenceListIterator {
00035 friend class ReferenceList;
00036
00037 public:
00038 bool operator!=(const ReferenceListIterator &it) const;
00039 const Reference *operator->() const;
00040 const Reference &operator++(int i);
00041
00042 private:
00043 ReferenceListIterator(ReferenceListNode *n);
00044 ReferenceListIterator();
00045 ReferenceListNode *node;
00046 };
00047
00048 class ReferenceList {
00049 public:
00050 ReferenceList();
00051 ReferenceList(const ReferenceList &list);
00052 ReferenceList &operator=(const ReferenceList &list);
00053 ~ReferenceList();
00054
00055 void append(const Reference& val);
00056 int length();
00057
00058 ReferenceListIterator begin() const;
00059 ReferenceListIterator end() const;
00060
00061 private:
00062 void swap(ReferenceList &list);
00063 ReferenceListHeadNode *head;
00064 ReferenceListNode *tail;
00065 };
00066
00067 }
00068
00069 #endif
This file is part of the documentation for kjs Library Version 3.2.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Mar 4 22:44:08 2004 by
doxygen 1.3.6-20040222 written by
Dimitri van Heesch, © 1997-2003