OpendTect-6_4  6.4
moddepmgr.h
Go to the documentation of this file.
1 #ifndef moddepmgr_h
2 #define moddepmgr_h
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Bert
8  Date: Aug 2011
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "basicmod.h"
15 #include "bufstringset.h"
16 class od_istream;
17 
18 class SharedLibAccess;
19 
22 namespace OD
23 {
24 
30 {
31 public:
32  ModDep( const char* m )
33  : name_(m) {}
34  bool operator ==( const char* s ) const
35  { return name_ == s; }
36 
39 
40 };
41 
42 
49 {
50 public:
51  ModDepMgr(const char* fnm=0);
52  ~ModDepMgr();
53 
54  const ModDep* find(const char*) const;
55  const ObjectSet<ModDep>& deps() const { return deps_; }
56 
57  void ensureLoaded(const char*) const;
58  const SharedLibAccess* shLibAccess(const char*) const;
59 
60 protected:
61 
63 
66 
67  void readDeps(od_istream&);
68  int getLoadIdx(const char*) const;
69 
70 };
71 
72 mGlobal(Basic) const ModDepMgr& ModDeps();
73 
74 #define mDefModInitFn(nm) \
75 mExternC(nm) void od_##nm##_initStdClasses(); \
76 extern "C" void od_##nm##_initStdClasses()
77 
78 
79 } // namespace OD
80 
81 #endif
#define mExpClass(module)
Definition: commondefs.h:160
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
const ModDepMgr & ModDeps()
#define mGlobal(module)
Definition: commondefs.h:163
Set of BufferString objects.
Definition: bufstringset.h:28
BufferStringSet loadedmods_
Definition: moddepmgr.h:64
OD class for stream read.
Definition: od_istream.h:24
ModDep(const char *m)
Definition: moddepmgr.h:32
Set of pointers to objects.
Definition: commontypes.h:32
ObjectSet< SharedLibAccess > shlibaccs_
Definition: moddepmgr.h:65
Gives access to shared libs on runtime. Plugins should be loaded via the Plugin Manager (see plugins...
Definition: sharedlibs.h:30
Module Dependency.
Definition: moddepmgr.h:29
Dependency manager - provides tools for the dependencies between the different OpendTect &#39;modules&#39;...
Definition: moddepmgr.h:48
BufferStringSet mods_
Definition: moddepmgr.h:38
const T * find(const ObjectSet< T > &os, const S &val)
Get const object in set.
Definition: objectset.h:183
const ObjectSet< ModDep > & deps() const
Definition: moddepmgr.h:55
BufferString name_
Definition: moddepmgr.h:37
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
OpendTect.
Definition: commontypes.h:29
ObjectSet where the objects contained are owned by this set.
Definition: manobjectset.h:23
ManagedObjectSet< ModDep > deps_
Definition: moddepmgr.h:62

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019