34 template<
class T,
unsigned Size>
41 template<
class T,
unsigned Size>
44 is.
fatalCheck(
"operator>>(Istream&, FixedList<T, Size>&)");
46 if (is.
format() == IOstream::ASCII || !contiguous<T>())
52 "operator>>(Istream&, FixedList<T, Size>&) : reading first token"
57 L = dynamicCast<token::Compound<List<T> > >
72 <<
"incorrect first token, expected <label> "
73 "or '(' or '{', found "
86 if (delimiter == token::BEGIN_LIST)
88 for (
register unsigned i=0; i<Size; i++)
94 "operator>>(Istream&, FixedList<T, Size>&) : "
106 "operator>>(Istream&, FixedList<T, Size>&) : "
107 "reading the single entry"
110 for (
register unsigned i=0; i<Size; i++)
121 is.
read(reinterpret_cast<char*>(L.
data()), Size*
sizeof(
T));
125 "operator>>(Istream&, FixedList<T, Size>&) : "
126 "reading the binary block"
136 template<
class T,
unsigned Size>
142 && token::compound::isCompound
155 template<
class T,
unsigned Size>
164 os << token::END_STATEMENT <<
endl;
168 template<
class T,
unsigned Size>
172 if (os.
format() == IOstream::ASCII || !contiguous<T>())
176 if (Size > 1 && contiguous<T>())
193 os << L.size() << token::BEGIN_BLOCK;
199 os << token::END_BLOCK;
201 else if (Size < 11 && contiguous<T>())
204 os << token::BEGIN_LIST;
209 if (i > 0) os << token::SPACE;
214 os << token::END_LIST;
219 os <<
nl << token::BEGIN_LIST;
228 os <<
nl << token::END_LIST <<
nl;
233 os.
write(reinterpret_cast<const char*>(L.cdata()), Size*
sizeof(
T));
237 os.
check(
"Ostream& operator<<(Ostream&, const FixedList&)");