1 #include "GenericStorageContainerTemplateImpl.hpp"
8 main (int argc, char **argv, char **env)
10 cout << "Generic Storage Template (with Iterator) Test" << endl
11 << "Copyright 2014 TJ <hacker@iam.tj>" << endl
12 << "Licensed on terms of the GNU General Public License version 3.0" << endl;
14 int* test = new int(320596); // initial test value
15 GSCTI<int, StorageClass_DynamicArray> my_collection_of_ints(*test);
21 cout << endl << "Menu" << endl
22 << "1. Add node" << endl
23 << "2. Remove node" << endl
24 << "3. List nodes using forward Iterator" << endl
25 << "4. List nodes using reverse Interator" << endl
35 test = new int(76543);
36 my_collection_of_ints.add_node(test);
38 case 2: // Remove node
40 case 3: // List using forward Iterator
41 cout << "size = " << my_collection_of_ints.get_size();
42 for (int i : my_collection_of_ints) // XXX: C++11 'range for' automagically uses the iterator
44 cout << "Node = " << i << endl;
47 case 4: // List using reverse Iterator
51 } while (menu_choice > 0);