55 FXival
no()
const {
return *((FXival*)(ptr-1)); }
58 FXbool no(FXival num);
62 FXptr
const& operator[](FXival i)
const {
return ptr[i]; }
65 FXptr&
at(FXival i){
return ptr[i]; }
66 FXptr
const& at(FXival i)
const {
return ptr[i]; }
69 FXptr&
head(){
return ptr[0]; }
70 FXptr
const& head()
const {
return ptr[0]; }
73 FXptr&
tail(){
return ptr[no()-1]; }
74 FXptr
const& tail()
const {
return ptr[no()-1]; }
77 FXptr*
data(){
return ptr; }
78 const FXptr* data()
const {
return ptr; }
81 FXival find(FXptr
object,FXival pos=0)
const;
84 FXival rfind(FXptr
object,FXival pos=2147483647)
const;
87 FXbool assign(FXptr
object);
90 FXbool assign(FXptr
object,FXival n);
93 FXbool assign(FXptr* objects,FXival n);
96 FXbool assign(
const FXPtrList& objects);
99 FXbool insert(FXival pos,FXptr
object);
102 FXbool insert(FXival pos,FXptr
object,FXival n);
105 FXbool insert(FXival pos,FXptr* objects,FXival n);
108 FXbool insert(FXival pos,
const FXPtrList& objects);
111 FXbool prepend(FXptr
object);
114 FXbool prepend(FXptr
object,FXival n);
117 FXbool prepend(FXptr* objects,FXival n);
120 FXbool prepend(
const FXPtrList& objects);
123 FXbool append(FXptr
object);
126 FXbool append(FXptr
object,FXival n);
129 FXbool append(FXptr* objects,FXival n);
132 FXbool append(
const FXPtrList& objects);
135 FXbool replace(FXival pos,FXptr
object);
138 FXbool replace(FXival pos,FXival m,FXptr
object,FXival n);
141 FXbool replace(FXival pos,FXival m,FXptr* objects,FXival n);
144 FXbool replace(FXival pos,FXival m,
const FXPtrList& objects);
147 FXbool erase(FXival pos);
150 FXbool erase(FXival pos,FXival n);
153 FXbool
remove(FXptr object);
156 FXbool push(FXptr
object);
171 template<
typename TYPE>
197 TYPE*&
operator[](FXival i){
return reinterpret_cast<TYPE*&
>(ptr[i]); }
198 TYPE *
const&
operator[](FXival i)
const {
return reinterpret_cast<TYPE*const&
>(ptr[i]); }
201 TYPE*&
at(FXival i){
return reinterpret_cast<TYPE*&
>(ptr[i]); }
202 TYPE *
const&
at(FXival i)
const {
return reinterpret_cast<TYPE*const&
>(ptr[i]); }
205 TYPE*&
head(){
return reinterpret_cast<TYPE*&
>(ptr[0]); }
206 TYPE*
const&
head()
const {
return reinterpret_cast<TYPE*const&
>(ptr[0]); }
209 TYPE*&
tail(){
return reinterpret_cast<TYPE*&
>(ptr[
no()-1]); }
210 TYPE*
const&
tail()
const {
return reinterpret_cast<TYPE* const&
>(ptr[
no()-1]); }
213 TYPE**
data(){
return reinterpret_cast<TYPE**
>(ptr); }
214 TYPE *
const *
data()
const {
return reinterpret_cast<TYPE*const*
>(ptr); }
FXPtrList & adopt(FXPtrList &other)
Adopt objects from other, leaving other empty.
FXbool replace(FXival pos, FXptr object)
Replace object at position by given object.
FXbool prepend(TYPE *object)
Prepend object.
Definition: FXPtrList.h:247
FXPtrListOf(TYPE *object)
Construct and init with single object.
Definition: FXPtrList.h:182
FXbool replace(FXival pos, FXival m, TYPE *object, FXival n)
Replaces the m objects at pos with n copies of object.
Definition: FXPtrList.h:274
FXbool prepend(TYPE *object, FXival n)
Prepend n copies of object.
Definition: FXPtrList.h:250
FXbool remove(FXptr object)
Remove object.
FXbool prepend(const FXPtrListOf< TYPE > &objects)
Prepend objects.
Definition: FXPtrList.h:256
FXbool insert(FXival pos, TYPE **objects, FXival n)
Insert n objects at specified position.
Definition: FXPtrList.h:241
List to pointers to TYPE.
Definition: FXPtrList.h:172
FXbool insert(FXival pos, const FXPtrListOf< TYPE > &objects)
Insert objects at specified position.
Definition: FXPtrList.h:244
FXbool assign(TYPE **objects, FXival n)
Assign n objects to list.
Definition: FXPtrList.h:229
FXbool append(TYPE *object, FXival n)
Append n copies of object.
Definition: FXPtrList.h:262
FXptr & at(FXival i)
Indexing operator.
Definition: FXPtrList.h:65
TYPE *& tail()
Last element in list.
Definition: FXPtrList.h:209
FXbool assign(FXptr object)
Assign object to list.
FXbool assign(TYPE *object)
Assign object to list.
Definition: FXPtrList.h:223
FXbool insert(FXival pos, FXptr object)
Insert object at certain position.
TYPE ** data()
Access to content array.
Definition: FXPtrList.h:213
FXptr & tail()
Last element in list.
Definition: FXPtrList.h:73
FXbool append(FXptr object)
Append object.
FXbool prepend(FXptr object)
Prepend object.
FXbool append(TYPE **objects, FXival n)
Append n objects.
Definition: FXPtrList.h:265
FXbool replace(FXival pos, FXival m, TYPE **objects, FXival n)
Replaces the m objects at pos with n objects.
Definition: FXPtrList.h:277
TYPE *& at(FXival i)
Indexing operator.
Definition: FXPtrList.h:201
FXbool push(FXptr object)
Push object to end.
FXPtrListOf(TYPE **objects, FXival n)
Construct and init with list of objects.
Definition: FXPtrList.h:188
FXbool assign(TYPE *object, FXival n)
Assign n copies of object to list.
Definition: FXPtrList.h:226
FXbool prepend(TYPE **objects, FXival n)
Prepend n objects.
Definition: FXPtrList.h:253
FXbool replace(FXival pos, FXival m, const FXPtrListOf< TYPE > &objects)
Replace the m objects at pos with objects.
Definition: FXPtrList.h:280
FXbool append(const FXPtrListOf< TYPE > &objects)
Append objects.
Definition: FXPtrList.h:268
FXptr & head()
First element in list.
Definition: FXPtrList.h:69
FXPtrListOf(TYPE *object, FXival n)
Construct and init with n copies of object.
Definition: FXPtrList.h:185
Definition: FX4Splitter.h:28
TYPE *& head()
First element in list.
Definition: FXPtrList.h:205
FXival no() const
Return number of objects.
Definition: FXPtrList.h:55
FXbool insert(FXival pos, TYPE *object, FXival n)
Insert n copies of object at specified position.
Definition: FXPtrList.h:238
FXival rfind(FXptr object, FXival pos=2147483647) const
Find object in list, searching backward; return position or -1.
FXPtrListOf()
Default constructor.
Definition: FXPtrList.h:176
FXptr & operator[](FXival i)
Indexing operator.
Definition: FXPtrList.h:61
FXival find(TYPE *object, FXival pos=0) const
Find object in list, searching forward; return position or -1.
Definition: FXPtrList.h:217
TYPE *& operator[](FXival i)
Indexing operator.
Definition: FXPtrList.h:197
FXPtrList & operator=(const FXPtrList &other)
Assignment operator.
FXbool append(TYPE *object)
Append object.
Definition: FXPtrList.h:259
FXptr * data()
Access to content array.
Definition: FXPtrList.h:77
FXival find(FXptr object, FXival pos=0) const
Find object in list, searching forward; return position or -1.
FXbool replace(FXival pos, TYPE *object)
Replace object at position by given object.
Definition: FXPtrList.h:271
FXPtrListOf(const FXPtrListOf< TYPE > &src)
Copy constructor.
Definition: FXPtrList.h:179
FXPtrListOf< TYPE > & operator=(const FXPtrListOf< TYPE > &src)
Assignment operator.
Definition: FXPtrList.h:191
List of void pointers.
Definition: FXPtrList.h:28
FXival rfind(TYPE *object, FXival pos=2147483647) const
Find object in list, searching backward; return position or -1.
Definition: FXPtrList.h:220
FXbool insert(FXival pos, TYPE *object)
Insert object at certain position.
Definition: FXPtrList.h:235
FXbool push(TYPE *object)
Push object to end.
Definition: FXPtrList.h:286
FXPtrListOf< TYPE > & adopt(FXPtrListOf< TYPE > &src)
Adopt objects from orig, leaving orig empty.
Definition: FXPtrList.h:194
FXbool assign(const FXPtrListOf< TYPE > &objects)
Assign objects to list.
Definition: FXPtrList.h:232