CompactIOList< T, BaseType > Class Template Reference

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. More...

Inheritance diagram for CompactIOList< T, BaseType >:
[legend]

Public Member Functions

 TypeName ("CompactList")
 Runtime type information. More...
 
 CompactIOList (const CompactIOList &)=default
 Default copy construct. More...
 
 CompactIOList (const IOobject &io)
 Construct from IOobject. More...
 
 CompactIOList (const IOobject &io, const label len)
 Construct from IOobject and default length of CompactIOList. More...
 
 CompactIOList (const IOobject &io, const UList< T > &content)
 Construct from IOobject and List content. More...
 
 CompactIOList (const IOobject &io, List< T > &&content)
 Construct by transferring the List content. More...
 
virtual ~CompactIOList ()=default
 
virtual bool writeObject (IOstreamOption streamOpt, const bool valid) const
 Write using stream options. Checks for overflow in binary. More...
 
virtual bool writeData (Ostream &) const
 
void operator= (const CompactIOList< T, BaseType > &rhs)
 Copy assignment of entries. More...
 

Friends

Istreamoperator>> (Istream &, CompactIOList< T, BaseType > &)
 Read List from Istream, discarding contents of existing List. More...
 
Ostreamoperator (Ostream &, const CompactIOList< T, BaseType > &)
 

Detailed Description

template<class T, class BaseType>
class Foam::CompactIOList< T, BaseType >

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.

Useful for lists of small sublists e.g. faceList, cellList.

Source files

Definition at line 55 of file CompactIOList.H.

Constructor & Destructor Documentation

◆ CompactIOList() [1/5]

CompactIOList ( const CompactIOList< T, BaseType > &  )
default

Default copy construct.

◆ CompactIOList() [2/5]

CompactIOList ( const IOobject io)
explicit

Construct from IOobject.

Definition at line 81 of file CompactIOList.C.

◆ CompactIOList() [3/5]

CompactIOList ( const IOobject io,
const label  len 
)

Construct from IOobject and default length of CompactIOList.

Definition at line 98 of file CompactIOList.C.

◆ CompactIOList() [4/5]

CompactIOList ( const IOobject io,
const UList< T > &  content 
)

Construct from IOobject and List content.

Definition at line 122 of file CompactIOList.C.

◆ CompactIOList() [5/5]

CompactIOList ( const IOobject io,
List< T > &&  content 
)

Construct by transferring the List content.

Definition at line 146 of file CompactIOList.C.

◆ ~CompactIOList()

virtual ~CompactIOList ( )
virtualdefault

Member Function Documentation

◆ TypeName()

TypeName ( "CompactList"  )

Runtime type information.

◆ writeObject()

bool writeObject ( IOstreamOption  streamOpt,
const bool  valid 
) const
virtual

Write using stream options. Checks for overflow in binary.

Definition at line 170 of file CompactIOList.C.

◆ writeData()

bool writeData ( Ostream os) const
virtual

Definition at line 209 of file CompactIOList.C.

◆ operator=()

void operator= ( const CompactIOList< T, BaseType > &  rhs)

Copy assignment of entries.

Definition at line 219 of file CompactIOList.C.

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream ,
CompactIOList< T, BaseType > &   
)
friend

Read List from Istream, discarding contents of existing List.

◆ operator

Ostream& operator ( Ostream ,
const CompactIOList< T, BaseType > &   
)
friend

The documentation for this class was generated from the following files: