MCPcopy Create free account
hub / github.com/dengwirda/jigsaw / array_list

Class array_list

src/libcpp/containers/arraylist.hpp:67–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 typename A = allocators::basic_alloc
66 >
67 class array_list : public
68 allocators::_item_alloc <
69 single_item < T>, A >
70 {
71/*----------------------- a dynamic array of linked-lists */
72 public :
73
74 typedef T data_type ;
75 typedef A allocator ;
76
77 typedef typename
78 allocator::size_type size_type ;
79 typedef typename
80 allocator::diff_type diff_type ;
81
82 typedef containers::array_list <
83 data_type,
84 allocator > self_type ;
85
86 typedef containers::single_item <
87 data_type > item_type ;
88
89 typedef containers::const_single_iterator <
90 self_type > _const_it ;
91
92 typedef containers::write_single_iterator <
93 self_type > _write_it ;
94
95 typedef allocators::_item_alloc <
96 item_type,
97 allocator > item_pool ;
98
99 typedef containers::array <
100 item_type * ,
101 allocator > lptr_list ;
102
103 public :
104
105 lptr_list _lptr;
106
107 size_type _size;
108
109 public :
110
111 /*
112 --------------------------------------------------------
113 MAKE-ITEM (helper): _new/construct a node.
114 --------------------------------------------------------
115 */
116
117 __inline_call void_type make_item (// copy
118 data_type const&_data,
119 item_type *& _item
120 )
121 {
122 _item = self_type::allocate(1);
123 self_type::construct(_item,
124 nullptr, //link!

Callers

nothing calls this directly

Calls 1

item_poolFunction · 0.85

Tested by

no test coverage detected