From 81c052a4e2cd7607625cc05e5b25cab4312fc0b4 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 28 Oct 2005 19:36:09 +0000 Subject: [PATCH] Removed epicsList and associated test file - not used or maintained. --- src/libCom/Makefile | 3 - src/libCom/cppStd/epicsList.h | 458 ---------------------------- src/libCom/cppStd/epicsListBase.cpp | 53 ---- src/libCom/cppStd/epicsListBase.h | 240 --------------- src/libCom/test/Makefile | 6 - src/libCom/test/epicsListTest.cpp | 192 ------------ 6 files changed, 952 deletions(-) delete mode 100644 src/libCom/cppStd/epicsList.h delete mode 100644 src/libCom/cppStd/epicsListBase.cpp delete mode 100644 src/libCom/cppStd/epicsListBase.h delete mode 100644 src/libCom/test/epicsListTest.cpp diff --git a/src/libCom/Makefile b/src/libCom/Makefile index d3494e1a8..0d7bb1860 100644 --- a/src/libCom/Makefile +++ b/src/libCom/Makefile @@ -48,10 +48,7 @@ SRCS += cvtFast.c SRC_DIRS += $(LIBCOM)/cppStd INC += epicsAlgorithm.h INC += epicsExcept.h -INC += epicsList.h -INC += epicsListBase.h INC += epicsMemory.h -SRCS += epicsListBase.cpp # From cxxTemplates SRC_DIRS += $(LIBCOM)/cxxTemplates diff --git a/src/libCom/cppStd/epicsList.h b/src/libCom/cppStd/epicsList.h deleted file mode 100644 index 756c64838..000000000 --- a/src/libCom/cppStd/epicsList.h +++ /dev/null @@ -1,458 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -// epicsList.h -// Author: Andrew Johnson -// Date: October 2000 - -#ifndef __EPICS_LIST_H__ -#define __EPICS_LIST_H__ - -#include "epicsListBase.h" -#include - -// epicsList -// =========== - -// This implementation omits allocators, and only supports lists of pointers to -// objects. Class templates are not provided, so functions overloaded on input -// iterators are not available, nor are reverse iterators. Some functionality -// makes no sense in this version, for example splice cannot be implemented -// quickly because list nodes must never be transferred to a different list. - -// Reference numbers in comments are to sections in ISO/IEC 14882:1998(E) - -template class epicsListIterator; -template class epicsListConstIterator; - -template -class epicsList { -public: - // Types - typedef size_t size_type; - typedef epicsListIterator iterator; - typedef epicsListConstIterator const_iterator; - - // Construct/copy/destroy (23.2.2.1) - epicsList(); - ~epicsList(); - - // Iterator support - iterator begin(); - const_iterator begin() const; - iterator end(); - const_iterator end() const; - - // Capacity - bool empty() const; - size_type size() const; - - // Element access - T front(); - const T front() const; - T back(); - const T back() const; - - // Modifiers (23.2.2.3) - void push_front(const T x); - void pop_front(); - void push_back(const T x); - void pop_back(); - - iterator insert(iterator position, const T x); - iterator erase(iterator position); - iterator erase(iterator position, iterator leave); - void swap(epicsList& x); - void clear(); - - // List operations (23.2.2.4) -// void remove(const T value); -// void unique(); -// void reverse(); - -private: // Prevent compiler-generated functions - epicsList(const epicsList&); - epicsList& operator=(const epicsList&); - -private: // Data - size_type _count; - epicsListNode _head; - epicsListNodePool _pool; - -friend class epicsListIterator; -friend class epicsListConstIterator; -}; - -// Specialized algorithms: -template - inline void epicsListSwap(epicsList& x, epicsList& y) { x.swap(y); } - - -// Mutable iterator -// These used to be inner classes of epicsList, but MSVC6 -// didn't like that so they had to be typedefs... - -template -class epicsListIterator { -public: - epicsListIterator(); -// The following are created automatically by C++: - // epicsListIterator(const epicsListIterator& rhs); - // epicsListIterator& operator=(const epicsListIterator& rhs); - - T operator*() const; - T operator->() const; - - epicsListIterator& operator++(); - const epicsListIterator operator++(int); - epicsListIterator& operator--(); - const epicsListIterator operator--(int); - - bool operator==(const epicsListIterator& rhs) const; - bool operator==(const epicsListConstIterator& rhs) const; - bool operator!=(const epicsListIterator& rhs) const; - bool operator!=(const epicsListConstIterator& rhs) const; - -private: // Constructor for List use - epicsListIterator(epicsListNode* node); - -private: - epicsListNode* _node; - -friend class epicsList; -friend class epicsListConstIterator; -}; - - -// Constant iterator - -template -class epicsListConstIterator { -public: - epicsListConstIterator(); - epicsListConstIterator(const epicsListIterator& rhs); - epicsListConstIterator& operator=(const epicsListIterator& rhs); -// The following are created automatically by C++: - // epicsListConstIterator(const epicsListConstIterator& rhs); - // epicsListConstIterator& operator=(const epicsListConstIterator& rhs); - - const T operator*() const; - const T operator->() const; - - epicsListConstIterator& operator++(); - const epicsListConstIterator operator++(int); - epicsListConstIterator& operator--(); - const epicsListConstIterator operator--(int); - - bool operator==(const epicsListConstIterator& rhs) const; - bool operator==(const epicsListIterator& rhs) const; - bool operator!=(const epicsListConstIterator& rhs) const; - bool operator!=(const epicsListIterator& rhs) const; - -private: // Constructor for List use - epicsListConstIterator(const epicsListNode* node); - -private: - const epicsListNode* _node; - -friend class epicsList; -}; - -// END OF DECLARATIONS - -// INLINE METHODS - -// epicsList -template -inline epicsList::epicsList() : - _count(0), _head(0), _pool() {} - -template -inline epicsList::~epicsList() {} - -template -inline typename epicsList::iterator epicsList::begin() { - return _head.next(); -} - -template -inline typename epicsList::const_iterator epicsList::begin() const { - return _head.next(); -} - -template -inline typename epicsList::iterator epicsList::end() { - return &_head; -} - -template -inline typename epicsList::const_iterator epicsList::end() const { - return &_head; -} - -template -inline bool epicsList::empty() const { - return (_count == 0); -} - -template -inline typename epicsList::size_type epicsList::size() const { - return _count; -} - -template -inline T epicsList::front() { - if (empty()) - throw std::logic_error("epicsList::front: list empty"); - return static_cast(_head.next()->payload); -} - -template -inline const T epicsList::front() const { - if (empty()) - throw std::logic_error("epicsList::front: list empty"); - return static_cast(_head.next()->payload); -} - -template -inline T epicsList::back() { - if (empty()) - throw std::logic_error("epicsList::back: list empty"); - return static_cast(_head.prev()->payload); -} - -template -inline const T epicsList::back() const { - if (empty()) - throw std::logic_error("epicsList::back: list empty"); - return static_cast(_head.prev()->payload); -} - -template -inline void epicsList::push_front(const T x) { - epicsListNode* node = _pool.allocate(); - node->payload = x; - _head.append(*node); - _count++; -} - -template -inline void epicsList::pop_front() { - if (empty()) - throw std::logic_error("epicsList::pop_front: list empty"); - epicsListNode* node = _head.next(); - node->unlink(); - _count--; - _pool.free(node); -} - -template -inline void epicsList::push_back(const T x) { - epicsListNode* node = _pool.allocate(); - node->payload = x; - _head.insert(*node); - _count++; -} - -template -inline void epicsList::pop_back() { - if (empty()) - throw std::logic_error("epicsList::pop_back: list empty"); - epicsListNode* node = _head.prev(); - node->unlink(); - _count--; - _pool.free(node); -} - -template -inline typename epicsList::iterator epicsList::insert(iterator pos, const T x) { - epicsListNode* node = _pool.allocate(); - node->payload = x; - pos._node->insert(*node); - _count++; - return node; -} - -template -inline typename epicsList::iterator epicsList::erase(iterator pos) { - if ((pos._node == 0) || (pos._node == &_head)) - return pos; - iterator next = pos._node->next(); - pos._node->unlink(); - _count--; - _pool.free(pos._node); - return next; -} - -template -inline typename epicsList::iterator epicsList::erase(iterator pos, iterator leave) { - while (pos != leave) { - pos = erase(pos); - } - return pos; -} - -template -inline void epicsList::swap(epicsList& x) { - _head.swap(x._head); - _pool.swap(x._pool); - epicsSwap(x._count, _count); -} - -template -inline void epicsList::clear() { - if (!empty()) - erase(begin(), end()); -} - - -// epicsListIterator -template -inline epicsListIterator::epicsListIterator() : - _node(0) {} - -template -inline epicsListIterator::epicsListIterator(epicsListNode* node) : - _node(node) {} - -template -inline T epicsListIterator::operator*() const { - return static_cast(_node->payload); -} - -template -inline T epicsListIterator::operator->() const { - return static_cast(_node->payload); -} - -template -inline epicsListIterator& epicsListIterator::operator++() { - _node = _node->next(); - return *this; -} - -template -inline const epicsListIterator epicsListIterator::operator++(int) { - epicsListIterator temp = *this; - ++(*this); - return temp; -} - -template -inline epicsListIterator& epicsListIterator::operator--() { - _node = _node->prev(); - return *this; -} - -template -inline const epicsListIterator epicsListIterator::operator--(int) { - epicsListIterator temp = *this; - --(*this); - return temp; -} - -template -inline bool epicsListIterator::operator==(const epicsListIterator& rhs) const { - return (_node == rhs._node); -} - -template -inline bool epicsListIterator::operator==(const epicsListConstIterator& rhs) const { - return (rhs == *this); -} - -template -inline bool epicsListIterator::operator!=(const epicsListIterator& rhs) const { - return !(_node == rhs._node); -} - -template -inline bool epicsListIterator::operator!=(const epicsListConstIterator& rhs) const { - return !(rhs == *this); -} - -// epicsListConstIterator -template -inline epicsListConstIterator::epicsListConstIterator() : - _node(0) {} - -template -inline epicsListConstIterator::epicsListConstIterator(const epicsListIterator& rhs) : - _node(rhs._node) {} - -template -inline epicsListConstIterator::epicsListConstIterator(const epicsListNode* node) : - _node(node) {} - -template -inline epicsListConstIterator& -epicsListConstIterator::operator=(const epicsListIterator& rhs){ - _node = rhs._node; - return *this; -} - -template -inline const T epicsListConstIterator::operator*() const { - return static_cast(_node->payload); -} - -template -inline const T epicsListConstIterator::operator->() const { - return static_cast(_node->payload); -} - -template -inline epicsListConstIterator& epicsListConstIterator::operator++() { - _node = _node->next(); - return *this; -} - -template -inline const epicsListConstIterator epicsListConstIterator::operator++(int) { - epicsListConstIterator temp = *this; - ++(*this); - return temp; -} - -template -inline epicsListConstIterator& epicsListConstIterator::operator--() { - _node = _node->prev(); - return *this; -} - -template -inline const epicsListConstIterator epicsListConstIterator::operator--(int) { - epicsListConstIterator temp = *this; - --(*this); - return temp; -} - -template -inline bool -epicsListConstIterator::operator==(const epicsListConstIterator& rhs) const { - return (_node == rhs._node); -} - -template -inline bool epicsListConstIterator::operator==(const epicsListIterator& rhs) const { - return (_node == rhs._node); -} - -template -inline bool -epicsListConstIterator::operator!=(const epicsListConstIterator& rhs) const { - return !(_node == rhs._node); -} - -template -inline bool epicsListConstIterator::operator!=(const epicsListIterator& rhs) const { - return !(_node == rhs._node); -} - -#endif diff --git a/src/libCom/cppStd/epicsListBase.cpp b/src/libCom/cppStd/epicsListBase.cpp deleted file mode 100644 index 2c8ed1560..000000000 --- a/src/libCom/cppStd/epicsListBase.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -// epicsListBase.cpp -// Author: Andrew Johnson -// Date: October 2000 - -#ifdef __GNUG__ - #pragma implementation -#endif - -#define epicsExportSharedSymbols -#include "epicsListBase.h" -#include "cantProceed.h" - -// epicsListNodePool -epicsMutex epicsListNodePool::_mutex; -epicsListLink epicsListNodePool::_store; - -epicsShareFunc epicsShareAPI epicsListNodePool::~epicsListNodePool() { - while (_blocks.hasNext()) { - epicsListNodeBlock* block = - static_cast(_blocks.extract()); - block->reset(); - _mutex.lock(); - _store.append(block); - _mutex.unlock(); - } -} - -epicsShareFunc void epicsShareAPI epicsListNodePool::extend() { - assert(!_free.hasNext()); - epicsListNodeBlock* block = 0; - if (_store.hasNext()) { - _mutex.lock(); - if (_store.hasNext()) - block = static_cast(_store.extract()); - _mutex.unlock(); - } - if (block == 0) - block = new epicsListNodeBlock; - if (block == 0) // in case new didn't throw... - cantProceed("epicsList: out of memory"); - _blocks.append(block); - _free.set(block->first()); -} - diff --git a/src/libCom/cppStd/epicsListBase.h b/src/libCom/cppStd/epicsListBase.h deleted file mode 100644 index 22d156173..000000000 --- a/src/libCom/cppStd/epicsListBase.h +++ /dev/null @@ -1,240 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -// epicsListBase.h -// Author: Andrew Johnson -// Date: October 2000 - -#ifndef __EPICS_LIST_BASE_H__ -#define __EPICS_LIST_BASE_H__ - -#ifdef __GNUG__ - #pragma interface -#endif - -#include "epicsMutex.h" -#include "epicsAlgorithm.h" - -// epicsListNode -class epicsListNode { -public: - epicsListNode(int /*dummy*/); // constructor for epicsList._head - - // Status queries - bool hasNext() const; - epicsListNode* next() const; - epicsListNode* prev() const; - - // Node operations - void insert(epicsListNode& node); - void append(epicsListNode& node); - void unlink(); - void swap(epicsListNode& node); - -private: // Constructor for epicsListNodeBlock._node[] - epicsListNode(); - -private: // Data - must start with the _next pointer - epicsListNode* _next; - epicsListNode* _prev; -public: // Data - void* payload; - -friend class epicsListNodeBlock; -}; - - -// epicsListLink -class epicsListLink { -public: - epicsListLink(); - - // Status queries - bool hasNext() const; - - // list operations - void set(epicsListLink* node); - void append(epicsListLink* node); - epicsListLink* extract(); - void swap(epicsListLink& node); - -private: - epicsListLink* _next; -}; - - -// epicsListNodeBlock -class epicsListNodeBlock : public epicsListLink { -public: - epicsListNodeBlock(); - - // operations - epicsListLink* first(); - void reset(); - -private: // Data - enum {blocksize = 256}; // Poor man's const int, for MSVC++ - - epicsListNode _node[blocksize]; -}; - - -// epicsListNodePool -class epicsListNodePool { -public: - epicsListNodePool(); - epicsShareFunc epicsShareAPI ~epicsListNodePool(); - - // allocate & free nodes - epicsListNode* allocate(); - void free(epicsListNode* node); - - void swap(epicsListNodePool& pool); - -private: // Non-inline routines - epicsShareFunc void epicsShareAPI extend(); - -private: // Data - epicsListLink _free; - epicsListLink _blocks; - - static epicsMutex _mutex; - static epicsListLink _store; -}; - -// END OF DECLARATIONS - -// INLINE METHODS - -// epicsListLink -inline epicsListLink::epicsListLink() : - _next(0) {} - -inline bool epicsListLink::hasNext() const { - return (_next != 0); -} - -inline void epicsListLink::set(epicsListLink* node) { - _next = node; -} - -inline void epicsListLink::append(epicsListLink* node) { - node->_next = _next; - _next = node; -} - -inline epicsListLink* epicsListLink::extract() { - epicsListLink* result = _next; - _next = result->_next; - result->_next = 0; - return result; -} - -inline void epicsListLink::swap(epicsListLink& node) { - epicsSwap(node._next, _next); -} - - -// epicsListNode - -// Disable spurious warnings from MSVC -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4355) -#endif - -inline epicsListNode::epicsListNode() : - _next(this + 1), _prev(0), payload(0) {} - -inline epicsListNode::epicsListNode(int) : - _next(this), _prev(this), payload(0) {} - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -inline bool epicsListNode::hasNext() const { - return (_next != this); -} - -inline epicsListNode* epicsListNode::next() const { - return _next; -} - -inline epicsListNode* epicsListNode::prev() const { - return _prev; -} - -inline void epicsListNode::insert(epicsListNode& node) { - node._next = this; - node._prev = _prev; - _prev->_next = &node; - _prev = &node; -} - -inline void epicsListNode::append(epicsListNode& node) { - node._prev = this; - node._next = _next; - _next->_prev = &node; - _next = &node; -} - -inline void epicsListNode::unlink() { - _prev->_next = _next; - _next->_prev = _prev; - _next = this; - _prev = this; -} - -inline void epicsListNode::swap(epicsListNode& node) { - epicsSwap(node._next, _next); - _next->_prev = this; - node._next->_prev = &node; - - epicsSwap(node._prev, _prev); - _prev->_next = this; - node._prev->_next = &node; -} - -// epicsListNodeBlock -inline epicsListNodeBlock::epicsListNodeBlock() { - // The epicsListNode constructor links all the _next pointers in the block - _node[blocksize-1]._next = 0; -} - -inline void epicsListNodeBlock::reset() { - for (int i=0; i(&(_node[0])); -} - -// epicsListNodePool -inline epicsListNodePool::epicsListNodePool() : - _free(), _blocks() {} - -inline epicsListNode* epicsListNodePool::allocate() { - if (!_free.hasNext()) - extend(); // Complex non-inline code - return reinterpret_cast(_free.extract()); -} - -inline void epicsListNodePool::free(epicsListNode* node) { - _free.append(reinterpret_cast(node)); -} - -inline void epicsListNodePool::swap(epicsListNodePool& pool) { - _free.swap(pool._free); - _blocks.swap(pool._blocks); -} - -#endif diff --git a/src/libCom/test/Makefile b/src/libCom/test/Makefile index a52b61847..e415278bb 100644 --- a/src/libCom/test/Makefile +++ b/src/libCom/test/Makefile @@ -13,12 +13,6 @@ include $(TOP)/configure/CONFIG PROD_LIBS += Com -#epicsListTest_SRCS += epicsListTest.cpp -PROD_HOST += epicsListTest -#epicsListTest build fails for vxWorks-ppc604 on win32-x86 host -#OBJS_IOC_vxWorks += epicsListTest -OBJS_IOC_RTEMS += epicsListTest - epicsAlgorithmTest_SRCS += epicsAlgorithmTest.cpp PROD_HOST += epicsAlgorithmTest OBJS_IOC_vxWorks += epicsAlgorithmTest diff --git a/src/libCom/test/epicsListTest.cpp b/src/libCom/test/epicsListTest.cpp deleted file mode 100644 index a268d844f..000000000 --- a/src/libCom/test/epicsListTest.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -// $Id$ -// Author: Andrew Johnson -// Date: December 2000 - -// Test code for the epics::List class - -#include -#include - -#include "epicsList.h" - -using std::cout; -using std::endl; - -#if defined(vxWorks) || defined(__rtems__) - #define MAIN epicsListTest - extern "C" int MAIN(int /*argc*/, char* /*argv[]*/); -#else - #define MAIN main -#endif - -class fred { -public: - fred(const char* const _name) : name(_name) {} - void show () const {cout << name << ' ';} -private: - const char* const name; -}; - -static int tests = 0; -static int nak = 0; - -static void check(bool res, const char* str, int line) { - tests++; - if (!res) { - printf("Test %d failed, line %d: %s\n", tests, line, str); - nak++; - } -} - -#define test(expr) check(expr, #expr, __LINE__) - -int MAIN(int /*argc*/, char* /*argv[]*/) { - - fred* apf[10]; - const char* const names[] = { - "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" - }; - int i; - - for (i=0; i<10; i++) - apf[i] = new fred(names[i]); - - epicsList Fred; - test(Fred.empty()); - test(Fred.size() == 0); - test(Fred.begin() == Fred.end()); - - Fred.push_back(apf[0]); - test(!Fred.empty()); - test(Fred.size() == 1); - test(Fred.begin() != Fred.end()); - test(Fred.front() == apf[0]); - test(Fred.back() == apf[0]); - - epicsList::iterator Fi = Fred.begin(); - test(Fi != Fred.end()); - test(*Fi == apf[0]); - - epicsList::const_iterator Fci = Fred.begin(); - test(Fci != Fred.end()); - test(Fci == Fi); - test(Fi == Fci); - test(*Fci == apf[0]); - - ++Fi; - test(Fi == Fred.end()); - test(Fci != Fi); - test(Fi != Fci); - - ++Fci; - test(Fci == Fred.end()); - - Fci = --Fi; - test(Fi == Fred.begin()); - test(Fci == Fred.begin()); - - Fred.push_front(apf[1]); - test(Fred.size() == 2); - test(Fred.front() == apf[1]); - test(Fred.back() == apf[0]); - test(*Fi == apf[0]); - - Fi--; - test(*Fi == apf[1]); - - Fci--; - test(*Fci == apf[1]); - - Fi = Fred.insert(++Fi, apf[2]); - test(Fred.size() == 3); - test(Fred.front() == apf[1]); - test(Fred.back() == apf[0]); - test(Fi != Fci); - test(*Fi == apf[2]); - - Fred.pop_back(); - test(Fred.size() == 2); - - Fred.push_front(apf[0]); - test(Fred.size() == 3); - - Fi = Fred.begin(); - Fred.erase(Fi); - test(Fred.size() == 2); - - Fred.push_front(apf[0]); - test(Fred.size() == 3); - - Fi = Fred.begin(); - for (i=0; Fi != Fred.end(); i++, ++Fi) - test(*Fi == apf[i]); - - Fci = Fred.begin(); - for (i=0; Fci != Fred.end(); i++, ++Fci) - test(*Fci == apf[i]); - - for (i=0; i<10; i++) { - test(Fred.size() == 3); - - epicsList Freda; - test(Freda.empty()); - - epicsListSwap(Fred, Freda); - test(Fred.empty()); - test(Freda.size() == 3); - test(Freda.front() == apf[0]); - - for (Fi = Freda.begin(); Fi != Freda.end(); Fi++) - Fred.push_back(*Fi); - test(Fred.size() == 3); - - Fi = Freda.begin(); - for (Fci = Fred.begin(); Fci != Fred.end(); ++Fci, ++Fi) { - test(Fi != Freda.end()); - test(*Fci == *Fi); - } - // Freda's destructor returns her nodes to global store, - // from where they are allocated again during the next loop. - } - - Fred.erase(Fred.begin(), --Fred.end()); - test(Fred.size() == 1); - - Fred.clear(); - test(Fred.empty()); - - // Some more complicated stuff, just for the fun of it. - // Try doing this in tsDLList! - - epicsList*> llf; - for (i=0; i<10; i++) { - llf.push_front(new epicsList); - llf.front()->push_front(apf[i]); - } - test(llf.size() == 10); - - epicsList*>::iterator llfi; - for (llfi = llf.begin(); llfi != llf.end(); ++llfi) - test(llfi->size() == 1); - - for (llfi = llf.begin(); llfi != llf.end(); ++llfi) { - llfi->clear(); - delete *llfi; - } - llf.clear(); - - for (i=0; i<10; i++) - delete apf[i]; - - cout << tests << " tests completed, " << nak << " failed." << endl; - return 0; -}