Lines Matching defs:hb_vector_t
35 struct hb_vector_t struct
40 HB_NO_COPY_ASSIGN_TEMPLATE2 (hb_vector_t, Type, PreallocedCount); argument
41 hb_vector_t () { init (); } in hb_vector_t() function
42 ~hb_vector_t () { fini (); } in ~hb_vector_t() argument
44 unsigned int len;
46 unsigned int allocated; /* == 0 means allocation failed. */
47 Type *arrayZ_;
48 Type static_array[PreallocedCount];
51 void init () in init()
58 void fini () in fini()
65 void fini_deep () in fini_deep()
74 Type * arrayZ () { return arrayZ_ ? arrayZ_ : static_array; } in arrayZ()
75 const Type * arrayZ () const { return arrayZ_ ? arrayZ_ : static_array; } in arrayZ()
77 Type& operator [] (int i_) in operator []()
84 const Type& operator [] (int i_) const in operator []()
92 hb_array_t<Type> as_array () in as_array()
94 hb_array_t<const Type> as_array () const in as_array()
97 hb_array_t<const Type> sub_array (unsigned int start_offset, unsigned int count) const in sub_array()
99 …const Type> sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */) const in sub_array()
101 hb_array_t<Type> sub_array (unsigned int start_offset, unsigned int count) in sub_array()
103 hb_array_t<Type> sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */) in sub_array()
106 hb_sorted_array_t<Type> as_sorted_array () in as_sorted_array()
108 hb_sorted_array_t<const Type> as_sorted_array () const in as_sorted_array()
111 hb_array_t<const Type> sorted_sub_array (unsigned int start_offset, unsigned int count) const in sorted_sub_array()
113 …ype> sorted_sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */) const in sorted_sub_array()
115 hb_array_t<Type> sorted_sub_array (unsigned int start_offset, unsigned int count) in sorted_sub_array()
117 …ay_t<Type> sorted_sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */) in sorted_sub_array()
122 operator hb_array_t<Type> () { return as_array (); } in operator hb_array_t<Type>()
123 operator hb_array_t<const Type> () const { return as_array (); } in operator hb_array_t<const Type>()
125 Type * operator + (unsigned int i) { return arrayZ() + i; } in operator +()
126 const Type * operator + (unsigned int i) const { return arrayZ() + i; } in operator +()
128 Type *push () in push()
134 Type *push (const Type& v) in push()
141 bool in_error () const { return allocated == 0; } in in_error()
144 bool alloc (unsigned int size) in alloc()
185 bool resize (int size_) in resize()
198 void pop () in pop()
204 void remove (unsigned int i) in remove()
215 void shrink (int size_) in shrink()
223 Type *find (T v) in find()
232 const Type *find (T v) const in find()
241 void qsort (int (*cmp)(const void*, const void*)) in qsort()
243 void qsort (unsigned int start = 0, unsigned int end = (unsigned int) -1) in qsort()
247 Type *lsearch (const T &x, Type *not_found = nullptr) in lsearch()
250 const Type *lsearch (const T &x, const Type *not_found = nullptr) const in lsearch()
254 Type *bsearch (const T &x, Type *not_found = nullptr) in bsearch()
257 const Type *bsearch (const T &x, const Type *not_found = nullptr) const in bsearch()
260 bool bfind (const T &x, unsigned int *i = nullptr, in bfind()