Append the passed argument to the end of the array if there is room. * * @param[in] val Value to add to the array. * * @return True if the point was successfully added to the array. False if the array is full and the point couldn't be added. */
| 74 | * @return True if the point was successfully added to the array. False if the array is full and the point couldn't be added. |
| 75 | */ |
| 76 | bool push_back(const T &val) |
| 77 | { |
| 78 | ARM_COMPUTE_ERROR_ON(0 == _max_size); |
| 79 | if (_num_values >= max_num_values()) |
| 80 | { |
| 81 | _num_values = max_num_values() + 1; |
| 82 | return false; |
| 83 | } |
| 84 | at(_num_values) = val; |
| 85 | _num_values++; |
| 86 | return true; |
| 87 | } |
| 88 | /** Clear all the points from the array. */ |
| 89 | void clear() |
| 90 | { |
no outgoing calls