FreeFOAM The Cross-Platform CFD Toolkit
IOobjectList Class Reference

List of IOobjects with searching and retrieving facilities. More...

#include <OpenFOAM/IOobjectList.H>


Detailed Description

List of IOobjects with searching and retrieving facilities.

Source files

Definition at line 50 of file IOobjectList.H.

+ Inheritance diagram for IOobjectList:
+ Collaboration diagram for IOobjectList:

List of all members.

Public Member Functions

 IOobjectList (const label nIoObjects=128)
 Construct given an initial estimate for the number of entries.
 IOobjectList (const objectRegistry &db, const fileName &instance, const fileName &local="")
 Construct from objectRegistry and instance path.
 IOobjectList (const IOobjectList &)
 Construct as copy.
 ~IOobjectList ()
bool add (IOobject &)
 Add an IOobject to list.
bool remove (IOobject &)
 Remove an IOobject from list.
IOobjectlookup (const word &name) const
 Lookup a given name and return IOobject ptr if found else NULL.
IOobjectList lookupClass (const word &className) const
 Return the list for all IOobjects of given class.
wordList names () const
 Return the list of names of the IOobjects.
wordList names (const word &className) const
 Return the list of names of the IOobjects of given class.
- Public Member Functions inherited from HashPtrTable< IOobject >
 HashPtrTable (const label size=128)
 Construct given initial table size.
 HashPtrTable (Istream &, const INew &)
 Construct from Istream using given Istream constructor class.
 HashPtrTable (Istream &)
 Construct from Istream using default Istream constructor class.
 HashPtrTable (const HashPtrTable< IOobject, word, string::hash > &)
 Construct as copy.
 ~HashPtrTable ()
IOobjectremove (iterator &)
 Remove and return the pointer specified by given iterator.
bool erase (iterator &)
 Erase an hashedEntry specified by given iterator.
void clear ()
 Clear all entries from table.
void operator= (const HashPtrTable< IOobject, word, string::hash > &)
- Public Member Functions inherited from HashTable< IOobject *, word, string::hash >
bool set (const word &, const IOobject *&newElmt)
 Assign a new hashedEntry, overwriting existing entries.
 HashTable (const label size=128)
 Construct given initial table size.
 HashTable (Istream &, const label size=128)
 Construct from Istream.
 HashTable (const HashTable< IOobject *, word, string::hash > &)
 Construct as copy.
 HashTable (const Xfer< HashTable< IOobject *, word, string::hash > > &)
 Construct by transferring the parameter contents.
 ~HashTable ()
label size () const
 Return number of elements in table.
bool empty () const
 Return true if the hash table is empty.
bool found (const word &) const
 Return true if hashedEntry is found in table.
iterator find (const word &)
 Find and return an iterator set at the hashedEntry.
const_iterator find (const word &) const
 Find and return an const_iterator set at the hashedEntry.
List< wordtoc () const
 Return the table of contents.
List< wordsortedToc () const
 Return the table of contents as a sorted list.
OstreamprintInfo (Ostream &) const
 Print information.
bool insert (const word &, const IOobject *&newElmt)
 Insert a new hashedEntry.
bool erase (const iterator &)
 Erase an hashedEntry specified by given iterator.
bool erase (const word &)
 Erase an hashedEntry specified by given key if in table.
label erase (const UList< word > &)
 Remove entries given by the listed keys from this HashTable.
label erase (const HashTable< AnyType, word, AnyHash > &)
 Remove entries given by the given keys from this HashTable.
void resize (const label newSize)
 Resize the hash table for efficiency.
void clearStorage ()
 Clear the table entries and the table itself.
void transfer (HashTable< IOobject *, word, string::hash > &)
 Transfer the contents of the argument table into this table.
Xfer< HashTable< IOobject
*, word, string::hash > > 
xfer ()
 Transfer contents to the Xfer container.
IOobject *& operator[] (const word &)
 Find and return an hashedEntry.
const IOobject *& operator[] (const word &) const
 Find and return an hashedEntry.
IOobject *& operator() (const word &)
 Find and return an hashedEntry, create it null if not present.
void operator= (const HashTable< IOobject *, word, string::hash > &)
 Assignment.
bool operator== (const HashTable< IOobject *, word, string::hash > &) const
 Equality. Two hash tables are equal if all contents of first are.
bool operator!= (const HashTable< IOobject *, word, string::hash > &) const
 The opposite of the equality operation. Takes linear time.
iterator begin ()
 iterator set to the begining of the HashTable
const_iterator begin () const
 const_iterator set to the beginning of the HashTable
const iterator & end ()
 iterator set to beyond the end of the HashTable
const const_iterator & end () const
 const_iterator set to beyond the end of the HashTable
const_iterator cbegin () const
 const_iterator set to the beginning of the HashTable
const const_iterator & cend () const
 const_iterator set to beyond the end of the HashTable

Additional Inherited Members

- Public Types inherited from HashPtrTable< IOobject >
typedef HashTable< IOobject
*, word, string::hash >
::iterator 
iterator
typedef HashTable< IOobject
*, word, string::hash >
::const_iterator 
const_iterator
- Public Types inherited from HashTable< IOobject *, word, string::hash >
typedef IOobjectvalue_type
 Type of values the HashTable contains.
typedef IOobject *& reference
 Type that can be used for storing into HashTable::value_type.
typedef const IOobject *& const_reference
 Type that can be used for storing into constant.
typedef label size_type
 The type that can represent the size of a HashTable.

Constructor & Destructor Documentation

IOobjectList ( const label  nIoObjects = 128)
explicit

Construct given an initial estimate for the number of entries.

Definition at line 33 of file IOobjectList.C.

IOobjectList ( const IOobjectList ioOL)

Construct as copy.

Definition at line 88 of file IOobjectList.C.

Definition at line 96 of file IOobjectList.C.


Member Function Documentation

bool add ( IOobject io)

Add an IOobject to list.

Definition at line 102 of file IOobjectList.C.

References insert(), and IOobject::name().

bool remove ( IOobject io)

Remove an IOobject from list.

Definition at line 108 of file IOobjectList.C.

References HashTable< T *, Key, Hash >::find(), and IOobject::name().

Foam::IOobject * lookup ( const word name) const

Lookup a given name and return IOobject ptr if found else NULL.

Definition at line 124 of file IOobjectList.C.

References Foam::endl(), and Foam::Info.

Foam::IOobjectList lookupClass ( const word className) const
Foam::wordList names ( ) const

Return the list of names of the IOobjects.

Definition at line 179 of file IOobjectList.C.

Foam::wordList names ( const word className) const

Return the list of names of the IOobjects of given class.

Definition at line 198 of file IOobjectList.C.

References ClassName, and List< T >::setSize().


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