31 template<
class T,
class BaseType>
34 Istream& is = readStream(word::null);
36 if (headerClassName() == IOList<T>::typeName)
38 is >>
static_cast<List<T>&
>(*this);
41 else if (headerClassName() == typeName)
51 ) <<
"unexpected class name " << headerClassName()
52 <<
" expected " << typeName <<
" or " << IOList<T>::typeName
54 <<
" while reading object " <<
name()
62 template<
class T,
class BaseType>
78 template<
class T,
class BaseType>
102 template<
class T,
class BaseType>
126 template<
class T,
class BaseType>
150 template<
class T,
class BaseType>
158 template<
class T,
class BaseType>
169 const word oldTypeName = typeName;
176 const_cast<word&
>(typeName) = oldTypeName;
187 template<
class T,
class BaseType>
190 return (os << *
this).good();
196 template<
class T,
class BaseType>
197 void Foam::CompactIOList<T, BaseType>::operator=
206 template<
class T,
class BaseType>
215 template<
class T,
class BaseType>
227 L.setSize(start.
size()-1);
233 label index = start[i];
234 subList.
setSize(start[i+1] - index);
238 subList[j] = elems[index++];
246 template<
class T,
class BaseType>
256 os << static_cast<const List<T>&>(L);
264 for (
label i = 1; i < start.size(); i++)
266 start[i] = start[i-1]+L[i-1].
size();
278 elems[elemI++] = subList[j];
281 os << start << elems;
A simple container for copying or transferring objects of type <T>.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A List of objects of type <T> with automated input and output.
regIOobject(const IOobject &, const bool isTime=false)
Construct from IOobject. Optional flag for if IOobject is the.
A List obtained as a section of another List.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
Write using given format, version and compression.
A class for handling words, derived from string.
CompactIOList(const IOobject &)
Construct from IOobject.
streamFormat
Enumeration for the format of data in the stream.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
Write using given format, version and compression.
compressionType
Enumeration for the format of data in the stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A List of objects of type <T> with automated input and output using a compact storage. Behaves like IOList except when binary output in case it writes a CompactListList.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
word name(const complex &)
Return a string representation of a complex.
void operator=(const UList< T > &)
Assignment from UList operator. Takes linear time.
void setSize(const label)
Reset size of List.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
readOption readOpt() const
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
bool headerOk()
Read and check header info.
void operator=(const CompactIOList< T, BaseType > &)
virtual bool writeData(Ostream &) const
Pure virtual writaData function.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void transfer(List< T > &)
Transfer the contents of the argument List into this list.