home *** CD-ROM | disk | FTP | other *** search
- #ifndef __SORTLIST_H
- #define __SORTLIST_H
-
- // ╔════════════════════════════════════════════════╗
- // ║ sortlist.h, sortlist.cpp ║
- // ╟────────────────────────────────────────────────╢
- // ║ Sorted linked lists ║
- // ╟────────────────────────────────────────────────╢
- // ║ Written by Gus Smedstad ║
- // ╟────────────────────────────────────────────────╢
- // ║ Copyright 1990-91 NoGate Consulting ║
- // ╚════════════════════════════════════════════════╝
-
- #ifndef __DOUBLE_H
- #include "double.h"
- #endif
-
- class sorted_list : public double_list { // ascending order
- public:
- virtual void put(containable *arg);
- sortable *find(sortable &arg); // find an object >= arg
- };
-
- class sorted_index : public double_index {
- public:
- sorted_index(sorted_list &base) : double_index(base) {};
- int find(sortable &arg); // look for an item >= to arg
- sortable *value() { return (sortable *) item(); };
- };
-
- #endif