/*
- * Implementation of Storage Classes for GenericStorageContainerTemplateImpl
+ * Implementation of Data Structures for GenericStorageContainerTemplateImpl
* Copyright (c) 2014 TJ <hacker@iam.tj>
*
* This program is free software: you can redistribute it and/or modify
*/
template <typename S>
- class StorageClass
+ class AbstractDataStructure
{
size_t capacity_;
size_t size_;
public:
- StorageClass() {};
- virtual ~StorageClass() {};
+ AbstractDataStructure() {};
+ virtual ~AbstractDataStructure() {};
/* API available to application
*
* @param data the item (of type S) to be stored
* @param index position to insert; 0 is 'beginning', -1 is 'end'
*
- * Depending on the storage class, values of index other than 0 or -1 may have no meaning and be ignored
+ * Depending on the data structure, values of index other than 0 or -1 may have no meaning and be ignored
*/
virtual bool insert_at(S& data, long index = -1) = 0;
};
- /* Specialised storage class implementing a Dynamic Array
+ /* Specialised data structure implementing a Dynamic Array
*/
- template <typename SAD>
- class StorageClass_DynamicArray : StorageClass<SAD>
+ template <typename AD>
+ class DataStructure_ArrayDynamic : AbstractDataStructure<AD>
{
// TODO: implement
};
- /* Specialised storage class implementing a 2-way Linked List
+ /* Specialised data structure implementing a 1-way Linked List
*/
- template <typename SLLD>
- class StorageClass_LinkedListDouble : StorageClass<SLLD>
+ template <typename LLS>
+ class DataStructure_LinkedListSingle : AbstractDataStructure<LLS>
{
// TODO: implement
};
- /* Specialised storage class implementing a Binary Search Tree
+ /* Specialised data structure implementing a 2-way Linked List
*/
- template <typename SBST>
- class StorageClass_BinarySearchTree : StorageClass<SBST>
+ template <typename LLD>
+ class DataStructure_LinkedListDouble : DataStructure_LinkedListSingle<LLD>
+ {
+ // TODO: implement
+ };
+
+ /* Specialised data structure implementing a Binary Search Tree
+ */
+ template <typename BST>
+ class DataStructure_BinarySearchTree : DataStructure<BST>
{
// TODO: implement
};