Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
topoSetSource Class Referenceabstract

Base class of a source for a topoSet. More...

Inheritance diagram for topoSetSource:
Inheritance graph
[legend]
Collaboration diagram for topoSetSource:
Collaboration graph
[legend]

Classes

class  addToUsageTable
 Class with constructor to add usage string to table. More...
 
class  iNew
 Class used for the read-construction of. More...
 

Public Types

enum  sourceType {
  CELLSETSOURCE, FACESETSOURCE, POINTSETSOURCE, CELLZONESOURCE,
  FACEZONESOURCE, POINTZONESOURCE
}
 Enumeration defining the types of sources. More...
 
enum  setAction {
  CLEAR, NEW, INVERT, ADD,
  DELETE, SUBSET, LIST, REMOVE
}
 Enumeration defining the valid actions. More...
 

Public Member Functions

 TypeName ("topoSetSource")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, topoSetSource, word,( const polyMesh &mesh, const dictionary &dict ),(mesh, dict))
 
 declareRunTimeSelectionTable (autoPtr, topoSetSource, istream,( const polyMesh &mesh, Istream &is ),(mesh, is))
 
 topoSetSource (const polyMesh &mesh)
 Construct from components. More...
 
autoPtr< topoSetSourceclone () const
 Clone. More...
 
virtual ~topoSetSource ()
 Destructor. More...
 
const polyMeshmesh () const
 
virtual sourceType setType () const =0
 
virtual void applyToSet (const setAction action, topoSet &) const =0
 

Static Public Member Functions

static setAction toAction (const word &actionName)
 Convert string to action. More...
 
static IstreamcheckIs (Istream &is)
 Check state of stream. More...
 
static const stringusage (const word &name)
 
static autoPtr< topoSetSourceNew (const word &topoSetSourceType, const polyMesh &mesh, const dictionary &dict)
 Return a reference to the selected topoSetSource. More...
 
static autoPtr< topoSetSourceNew (const word &topoSetSourceType, const polyMesh &mesh, Istream &is)
 Return a reference to the selected topoSetSource. More...
 

Protected Member Functions

void addOrDelete (topoSet &set, const label cellI, const bool) const
 Add (if bool) cellI to set or delete cellI from set. More...
 

Protected Attributes

const polyMeshmesh_
 

Static Protected Attributes

static HashTable< string > * usageTablePtr_ = NULL
 A table of usage strings. More...
 

Detailed Description

Base class of a source for a topoSet.

Implementer has to modify the given set (see applyToSet) according to its function and the setAction (one of add/delete/new)

Source files

Definition at line 63 of file topoSetSource.H.

Member Enumeration Documentation

enum sourceType

Enumeration defining the types of sources.

Enumerator
CELLSETSOURCE 
FACESETSOURCE 
POINTSETSOURCE 
CELLZONESOURCE 
FACEZONESOURCE 
POINTZONESOURCE 

Definition at line 70 of file topoSetSource.H.

enum setAction

Enumeration defining the valid actions.

Enumerator
CLEAR 
NEW 
INVERT 
ADD 
DELETE 
SUBSET 
LIST 
REMOVE 

Definition at line 82 of file topoSetSource.H.

Constructor & Destructor Documentation

topoSetSource ( const polyMesh mesh)

Construct from components.

Definition at line 165 of file topoSetSource.C.

~topoSetSource ( )
virtual

Destructor.

Definition at line 173 of file topoSetSource.C.

Referenced by topoSetSource::clone().

Here is the caller graph for this function:

Member Function Documentation

void addOrDelete ( topoSet set,
const label  cellI,
const bool  add 
) const
protected

Add (if bool) cellI to set or delete cellI from set.

Definition at line 146 of file topoSetSource.C.

Referenced by topoSetSource::checkIs().

Here is the caller graph for this function:

TypeName ( "topoSetSource"  )

Runtime type information.

static setAction toAction ( const word actionName)
inlinestatic

Convert string to action.

Definition at line 157 of file topoSetSource.H.

References topoSetSource::checkIs(), topoSetSource::declareRunTimeSelectionTable(), dict, topoSetSource::mesh(), and topoSetSource::mesh_.

Here is the call graph for this function:

Foam::Istream & checkIs ( Istream is)
static

Check state of stream.

Definition at line 127 of file topoSetSource.C.

References topoSetSource::addOrDelete(), IOstream::eof(), Foam::exit(), Foam::FatalError, FatalErrorIn, and IOstream::good().

Referenced by topoSetSource::toAction().

Here is the call graph for this function:

Here is the caller graph for this function:

declareRunTimeSelectionTable ( autoPtr  ,
topoSetSource  ,
word  ,
( const polyMesh &mesh, const dictionary &dict ,
(mesh, dict  
)

Referenced by topoSetSource::toAction().

Here is the caller graph for this function:

declareRunTimeSelectionTable ( autoPtr  ,
topoSetSource  ,
istream  ,
( const polyMesh &mesh, Istream &is )  ,
(mesh, is)   
)
static const string& usage ( const word name)
inlinestatic

Definition at line 216 of file topoSetSource.H.

References HashTable< T, Key, Hash >::found(), Foam::name(), and topoSetSource::usageTablePtr_.

Here is the call graph for this function:

autoPtr<topoSetSource> clone ( ) const
inline

Clone.

Definition at line 242 of file topoSetSource.H.

References topoSetSource::New(), notImplemented, and topoSetSource::~topoSetSource().

Here is the call graph for this function:

Foam::autoPtr< Foam::topoSetSource > New ( const word topoSetSourceType,
const polyMesh mesh,
const dictionary dict 
)
static

Return a reference to the selected topoSetSource.

Definition at line 74 of file topoSetSource.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, and mesh.

Referenced by topoSetSource::clone(), NamedEnum< Enum, nEnum >::names(), and topoSetSource::iNew::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::autoPtr< Foam::topoSetSource > New ( const word topoSetSourceType,
const polyMesh mesh,
Istream is 
)
static

Return a reference to the selected topoSetSource.

Definition at line 101 of file topoSetSource.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, and mesh.

Here is the call graph for this function:

const polyMesh& mesh ( ) const
inline

Definition at line 274 of file topoSetSource.H.

References topoSetSource::applyToSet(), topoSetSource::mesh_, and topoSetSource::setType().

Referenced by topoSetSource::toAction().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual sourceType setType ( ) const
pure virtual
virtual void applyToSet ( const setAction  action,
topoSet  
) const
pure virtual

Member Data Documentation

Foam::HashTable< Foam::string > * usageTablePtr_ = NULL
staticprotected
const polyMesh& mesh_
protected

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