00001 /*----------------------------------------------------------------------------*\ 00002 ______ _ ____ __ __ 00003 | ____| _| |_ / __ \ /\ | \/ | 00004 | |__ _ __ ___ ___ / \| | | | / \ | \ / | 00005 | __| '__/ _ \/ _ ( (| |) ) | | |/ /\ \ | |\/| | 00006 | | | | | __/ __/\_ _/| |__| / ____ \| | | | 00007 |_| |_| \___|\___| |_| \____/_/ \_\_| |_| 00008 00009 FreeFOAM: The Cross-Platform CFD Toolkit 00010 00011 Copyright (C) 2008-2012 Michael Wild <themiwi@users.sf.net> 00012 Gerber van der Graaf <gerber_graaf@users.sf.net> 00013 -------------------------------------------------------------------------------- 00014 License 00015 This file is part of FreeFOAM. 00016 00017 FreeFOAM is free software: you can redistribute it and/or modify it 00018 under the terms of the GNU General Public License as published by the 00019 Free Software Foundation, either version 3 of the License, or (at your 00020 option) any later version. 00021 00022 FreeFOAM is distributed in the hope that it will be useful, but WITHOUT 00023 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00024 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00025 for more details. 00026 00027 You should have received a copy of the GNU General Public License 00028 along with FreeFOAM. If not, see <http://www.gnu.org/licenses/>. 00029 00030 \*----------------------------------------------------------------------------*/ 00031 00032 #include <OpenFOAM/OPstreamImpl.H> 00033 00034 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00035 00036 defineTypeNameAndDebug(Foam::OPstreamImpl, 0); 00037 defineRunTimeSelectionTable(Foam::OPstreamImpl, dictionary); 00038 00039 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // 00040 00041 Foam::autoPtr<Foam::OPstreamImpl> Foam::OPstreamImpl::instance_; 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 Foam::autoPtr<Foam::OPstreamImpl> Foam::OPstreamImpl::New 00046 ( 00047 ) 00048 { 00049 if(!instance_.valid()) 00050 { 00051 // load the Pstream library the user wants to use 00052 PstreamImpl::loadPstreamLibrary(); 00053 // find the OPstream type the user wants to use 00054 instance_ = PstreamImpl::loadPstreamInstance<OPstreamImpl> 00055 ( 00056 "OPstream", 00057 "FREEFOAM_OPSTREAM_CLASS", 00058 dictionaryConstructorTablePtr_ 00059 ); 00060 } 00061 return instance_; 00062 } 00063 00064 // ************************ vim: set sw=4 sts=4 et: ************************ //