FreeFOAM The Cross-Platform CFD Toolkit
dlLibraryTable.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::dlLibraryTable
26 
27 Description
28  A table of dynamically loaded libraries
29 
30 SourceFiles
31  dlLibraryTable.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef dlLibraryTable_H
36 #define dlLibraryTable_H
37 
38 #include <OpenFOAM/label.H>
39 #include <OpenFOAM/Hash.H>
40 #include <OpenFOAM/HashTable.H>
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class dlLibraryTable Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public HashTable<fileName, void*, Hash<void*> >
54 {
55  // Private Member Functions
56 
57  //- Disallow default bitwise copy construct
59 
60  //- Disallow default bitwise assignment
61  void operator=(const dlLibraryTable&);
62 
63 
64 public:
65 
66  // Static data members
67 
68  //- Static data someStaticData
70 
71 
72  // Public classes
73 
74  //- Class whose construction causes the reading of dynamic libraries
76  {
77  public:
78 
79  //- Read all the libraries listed in the 'libsEntry' entry in the
80  // given dictionary if present
81  readDlLibrary(const dictionary&, const word& libsEntry);
82  };
83 
84 
85  // Constructors
86 
87  //- Construct null
89 
90 
91  // Destructor
92 
94 
95 
96  // Member Functions
97 
98  //- Open the named library
99  static bool open(const fileName& name);
100 
101  //- Open all the libraries listed in the 'libsEntry' entry in the
102  // given dictionary if present
103  static bool open(const dictionary&, const word& libsEntry);
104 
105  //- Open all the libraries listed in the 'libsEntry' entry in the
106  // given dictionary if present and check the additions
107  // to the give constructor table
108  template<class TablePtr>
109  static bool open
110  (
111  const dictionary&,
112  const word& libsEntry,
113  const TablePtr& tablePtr
114  );
115 };
116 
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace Foam
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #ifdef NoRepository
125 # include "dlLibraryTableTemplates.C"
126 #endif
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************ vim: set sw=4 sts=4 et: ************************ //