21 template <
typename Obj,
unsigned int SIZE>
27 template <
typename Obj,
unsigned int SIZE>
33 template <
typename Obj,
unsigned int SIZE>
34 std::ostream& tlp::operator<<(std::ostream &os,const tlp::Array<Obj,SIZE> &a) {
37 for (
unsigned int i=0 ; i<SIZE ; ++i ) {
57 template <
typename Obj,
unsigned int SIZE>
64 while(
bool(is >> c) && isspace(c)) {}
68 is.setstate(std::ios::failbit);
72 for(
unsigned int i=0; i<SIZE; ++i) {
77 while((ok =
bool(is >> c)) && isspace(c)) {}
81 is.setstate(std::ios::failbit);
87 while((ok =
bool(is >> c)) && isspace(c)) {}
90 bool done = bool(is >> outA.
array[i]);
94 is.setstate(std::ios::failbit);
100 while(
bool(is >> c) && isspace(c)) {}
104 is.setstate(std::ios::failbit);
Obj array[SIZE]
array The underlying array of data.
std::istream & operator>>(std::istream &is, Array< Obj, SIZE > &array)
operator >> stream operator to easily read an array
Obj operator[](const unsigned int i) const
operator [] Read-only accessor.
Fixed-size array encapsulation.In debug mode, a bound check is performed at each access. Stream operators implementations are provided.