Public Member Functions | Private Member Functions | Friends
CompactIOList Class 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:
Inheritance graph
[legend]

Public Member Functions

 TypeName ("CompactList")
 Runtime type information. More...
 
 CompactIOList (const IOobject &)
 Construct from IOobject. More...
 
 CompactIOList (const IOobject &, const label)
 Construct from IOobject and size of CompactIOList. More...
 
 CompactIOList (const IOobject &, const List< T > &)
 Construct from IOobject and a List. More...
 
 CompactIOList (const IOobject &, const Xfer< List< T > > &)
 Construct by transferring the List contents. More...
 
virtual ~CompactIOList ()
 
virtual bool writeObject (IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
 
virtual bool writeData (Ostream &) const
 
void operator= (const CompactIOList< T, BaseType > &)
 
void operator= (const List< T > &)
 

Private Member Functions

void readFromStream ()
 Read according to header type. More...
 
bool overflows () const
 Has too many elements in it? 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

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 53 of file CompactIOList.H.

Constructor & Destructor Documentation

◆ CompactIOList() [1/4]

CompactIOList ( const IOobject )

Construct from IOobject.

◆ CompactIOList() [2/4]

CompactIOList ( const IOobject ,
const  label 
)

Construct from IOobject and size of CompactIOList.

◆ CompactIOList() [3/4]

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

Construct from IOobject and a List.

◆ CompactIOList() [4/4]

CompactIOList ( const IOobject ,
const Xfer< List< T > > &   
)

Construct by transferring the List contents.

◆ ~CompactIOList()

~CompactIOList ( )
virtual

Definition at line 166 of file CompactIOList.C.

Member Function Documentation

◆ readFromStream()

void readFromStream ( )
private

Read according to header type.

Definition at line 32 of file CompactIOList.C.

◆ overflows()

bool overflows ( ) const
private

Has too many elements in it?

Definition at line 59 of file CompactIOList.C.

◆ TypeName()

TypeName ( "CompactList"  )

Runtime type information.

◆ writeObject()

bool writeObject ( IOstream::streamFormat  fmt,
IOstream::versionNumber  ver,
IOstream::compressionType  cmp 
) const
virtual

Definition at line 175 of file CompactIOList.C.

Referenced by main().

Here is the caller graph for this function:

◆ writeData()

bool writeData ( Ostream os) const
virtual

Definition at line 222 of file CompactIOList.C.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

void operator= ( const List< T > &  )

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: