C++ Custom Built Dynamic Template List, What Considerations Are There?
Currently, I am re-designing a class that has seen a lot of use (called 'CharList', which allows dynamic lists of chars, interactive with C strings etc), into preferably a better system that grants more features for less code based on improvements to previous inefficiencies etc.

I want to get feedback and considerations.

I ask no suggestions be made based on or revolving around std:: classes or functions (like stream), as I like to optimise my own classes using C methodology, and knowing how they work on the lowest level helps greatly in optimisation.

Presently, I am thinking of building my own template list, of which CharList will offer higher level c string based functionality by including the template list and modifying it, of which the basic classes would be:

**TemplateListNode;**

The individual nodes themselves which automate adding, insertion and copying routines. The next and prev pointers are private and only accessible via functions or the friend association.

**TemplateListStorage;**

The storage list proper. Contains above node class. This keeps track of the size of the present list, start node and end node. This *may* have a so-called 'middle node' (which is a static node) that can occur anywhere in the list. Can add or remove nodes from either end (using post and prefix respectively), assignment operator adds items onto the right side. Includes basic copying interface (intended for Iter).

**TemplateListIter;**

Keeps track of one ListStorage at a time. Multiple Iters can be used to any one list (to allow for copies between nodes). Contains 'curr' node that can be moved left or right. Pre and post-fix operators add nodes left and right of the curr node respectively. Assignment operator adds right of the curr node by default. Grants access to ListStorage functions implicitly.



To phrase this into a specific question set:

**How would you improve/design the above? And why?**

**What are the design considerations you would use in a template list? And why?**

You can answer either question. Long answer or short, I would love to hear them all! The most thought-provoking one will likely be selected.
C++ Custom Built Dynamic Template List, What Considerations Are There?
===

Currently, I am re-designing a class that has seen a lot of use (called 'CharList', which allows dynamic lists of chars, interactive with C strings etc), into preferably a better system that grants more features for less code based on improvements to previous inefficiencies etc.

I want to get feedback and considerations.

I ask no suggestions be made based on or revolving around std:: classes or functions (like stream), as I like to optimise my own classes using C methodology, and knowing how they work on the lowest level helps greatly in optimisation.

Presently, I am thinking of building my own template list, of which CharList will offer higher level c string based functionality by including the template list and modifying it, of which the basic classes would be:

**TemplateListNode;**

The individual nodes themselves which automate adding, insertion and copying routines. The next and prev pointers are private and only accessible via functions or the friend association.

**TemplateListStorage;**

The storage list proper. Contains above node class. This keeps track of the size of the present list, start node and end node. This *may* have a so-called 'middle node' (which is a static node) that can occur anywhere in the list. Can add or remove nodes from either end (using post and prefix respectively), assignment operator adds items onto the right side. Includes basic copying interface (intended for Iter).

**TemplateListIter;**

Keeps track of one ListStorage at a time. Multiple Iters can be used to any one list (to allow for copies between nodes). Contains 'curr' node that can be moved left or right. Pre and post-fix operators add nodes left and right of the curr node respectively. Assignment operator adds right of the curr node by default. Grants access to ListStorage functions implicitly.



To phrase this into a specific question set:

**How would you improve/design the above? And why?**

**What are the design considerations you would use in a template list? And why?**

You can answer either question. Long answer or short, I would love to hear them all! The most thought-provoking one will likely be selected.