Dumping some WIP stuff.
This commit is contained in:
20
include/list.h
Normal file
20
include/list.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef __ODS_LIST__
|
||||
#define __ODS_LIST__
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
|
||||
// Lists are sequences of values.
|
||||
template <typename T>
|
||||
class List {
|
||||
public:
|
||||
virtual std::size_t size(void);
|
||||
virtual T get(std::size_t);
|
||||
virtual T set(std::size_t, T);
|
||||
virtual void add(std:size_t, T);
|
||||
virtual T remove(std::size_t);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
16
include/queue.h
Normal file
16
include/queue.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef __ODS_QUEUE__
|
||||
#define __ODS_QUEUE__
|
||||
|
||||
|
||||
// Dequeue represents a collection of elements to which we can add elements
|
||||
// and remove the next element.
|
||||
template<typename T>
|
||||
class Dequeue {
|
||||
public:
|
||||
virtual void add_first(T);
|
||||
virtual void add_last(T);
|
||||
virtual T remove_first(void);
|
||||
virtual T remove_last(void);
|
||||
virtual bool empty(void);
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user