typeInfo.H File Reference
Detailed Description
View typeInfo.H - License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Description
Basic run-time type information using word as the type's name.
Used to enhance the standard RTTI to cover I/O.
The user can get the type's type name using the type info access function
type()
The reference type cast template function:
refCast<T>(r)
wraps dynamic_cast to handle the bad_cast exception and generate a
FatalError.
The isA function:
isA<T>(r)
returns true if r is of type T or derived from type T.
Definition in file typeInfo.H.
Go to the source code of this file.
|
Namespaces |
| namespace | Foam |
Defines |
| #define | TypeName(TypeNameString) |
Functions |
| template<class To, class From> |
| To & | dynamicCast (From &r) |
| template<class To, class From> |
| To & | refCast (From &r) |
| template<class TestType, class Type> |
| bool | isType (const Type &t) |
| template<class TestType, class Type> |
| bool | isA (const Type &t) |
Define Documentation
| #define TypeName |
( |
TypeNameString |
|
) |
|
Value: ClassName(TypeNameString); \
virtual const word& type() const { return typeName; }
Definition at line 70 of file typeInfo.H.
Copyright © 2000-2007 OpenCFD Ltd
|