Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
OpenFOAM
db
IOstreams
Pstreams
IPstreamImpl.C
Go to the documentation of this file.
1
/*----------------------------------------------------------------------------*\
2
______ _ ____ __ __
3
| ____| _| |_ / __ \ /\ | \/ |
4
| |__ _ __ ___ ___ / \| | | | / \ | \ / |
5
| __| '__/ _ \/ _ ( (| |) ) | | |/ /\ \ | |\/| |
6
| | | | | __/ __/\_ _/| |__| / ____ \| | | |
7
|_| |_| \___|\___| |_| \____/_/ \_\_| |_|
8
9
FreeFOAM: The Cross-Platform CFD Toolkit
10
11
Copyright (C) 2008-2012 Michael Wild <themiwi@users.sf.net>
12
Gerber van der Graaf <gerber_graaf@users.sf.net>
13
--------------------------------------------------------------------------------
14
License
15
This file is part of FreeFOAM.
16
17
FreeFOAM is free software: you can redistribute it and/or modify it
18
under the terms of the GNU General Public License as published by the
19
Free Software Foundation, either version 3 of the License, or (at your
20
option) any later version.
21
22
FreeFOAM is distributed in the hope that it will be useful, but WITHOUT
23
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
24
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25
for more details.
26
27
You should have received a copy of the GNU General Public License
28
along with FreeFOAM. If not, see <http://www.gnu.org/licenses/>.
29
30
\*----------------------------------------------------------------------------*/
31
32
#include <
OpenFOAM/IPstreamImpl.H
>
33
34
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35
36
defineTypeNameAndDebug
(
Foam::IPstreamImpl
, 0);
37
defineRunTimeSelectionTable
(
Foam::IPstreamImpl
, dictionary);
38
39
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
40
41
Foam::autoPtr<Foam::IPstreamImpl>
Foam::IPstreamImpl::instance_;
42
43
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45
Foam::autoPtr<Foam::IPstreamImpl>
Foam::IPstreamImpl::New
46
(
47
)
48
{
49
if
(!instance_.valid())
50
{
51
// load the Pstream library the user wants to use
52
PstreamImpl::loadPstreamLibrary();
53
// find the IPstream type the user wants to use
54
instance_ = PstreamImpl::loadPstreamInstance<IPstreamImpl>
55
(
56
"IPstream"
,
57
"FREEFOAM_IPSTREAM_CLASS"
,
58
dictionaryConstructorTablePtr_
59
);
60
}
61
return
instance_;
62
}
63
64
// ************************ vim: set sw=4 sts=4 et: ************************ //