1 |
/*************************************************************************** |
/*************************************************************************** |
2 |
* * |
* * |
3 |
* Copyright (C) 2005 - 2010 Christian Schoenebeck * |
* Copyright (C) 2005 - 2014 Christian Schoenebeck * |
4 |
* * |
* * |
5 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
6 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
114 |
/** |
/** |
115 |
* Number of elements currently on the list. |
* Number of elements currently on the list. |
116 |
*/ |
*/ |
117 |
inline int size() { |
inline int size() const { |
118 |
return iSize; |
return iSize; |
119 |
} |
} |
120 |
|
|
121 |
/** |
/** |
122 |
* Returns true if the list is empty. |
* Returns true if the list is empty. |
123 |
*/ |
*/ |
124 |
inline bool empty() { |
inline bool empty() const { |
125 |
return (bool) !iSize; |
return (bool) !iSize; |
126 |
} |
} |
127 |
|
|
132 |
return pData[iPosition]; |
return pData[iPosition]; |
133 |
} |
} |
134 |
|
|
135 |
|
/** |
136 |
|
* Access element at \a iPosition. |
137 |
|
*/ |
138 |
|
inline const T& operator[](int iPosition) const { |
139 |
|
return pData[iPosition]; |
140 |
|
} |
141 |
|
|
142 |
/** |
/** |
143 |
* Copy constructor. |
* Copy constructor. |
144 |
*/ |
*/ |