OpendTect  6.3
moddepmgr.h
Go to the documentation of this file.
1 #pragma once
2 /*+
3 ________________________________________________________________________
4 
5  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
6  Author: Bert
7  Date: Aug 2011
8 ________________________________________________________________________
9 
10 -*/
11 
12 #include "basicmod.h"
13 #include "bufstringset.h"
14 #include "od_iosfwd.h"
15 
16 class SharedLibAccess;
17 
20 namespace OD
21 {
22 
28 {
29 public:
30  ModDep( const char* m )
31  : name_(m) {}
32  bool operator ==( const char* s ) const
33  { return name_ == s; }
34 
37 
38 };
39 
40 
47 {
48 public:
49  ModDepMgr(const char* fnm=0);
50  ~ModDepMgr();
51 
52  const ModDep* find(const char*) const;
53  const ObjectSet<ModDep>& deps() const { return deps_; }
54 
55  void ensureLoaded(const char*) const;
56  const SharedLibAccess* shLibAccess(const char*) const;
57 
58  static const char* sAllNonUI() { return "AllNonUi"; }
59  static const char* sAllUI() { return "uiODMain"; }
60 
61 protected:
62 
64 
67 
68  void readDeps(od_istream&);
69  int getLoadIdx(const char*) const;
70 
71 };
72 
73 mGlobal(Basic) const ModDepMgr& ModDeps();
74 
75 #define mDefModInitFn(nm) \
76 mExternC(nm) void od_##nm##_initStdClasses(); \
77 extern "C" void od_##nm##_initStdClasses()
78 
79 
80 } // namespace OD
#define mExpClass(module)
Definition: commondefs.h:157
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
const ModDepMgr & ModDeps()
#define mGlobal(module)
Definition: commondefs.h:160
static const char * sAllUI()
Definition: moddepmgr.h:59
Set of BufferString objects.
Definition: bufstringset.h:25
BufferStringSet loadedmods_
Definition: moddepmgr.h:65
OD class for stream read.
Definition: od_istream.h:23
ModDep(const char *m)
Definition: moddepmgr.h:30
Set of pointers to objects.
Definition: commontypes.h:28
ObjectSet< SharedLibAccess > shlibaccs_
Definition: moddepmgr.h:66
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:27
Dependency manager - provides tools for the dependencies between the different OpendTect &#39;modules&#39;...
Definition: moddepmgr.h:46
BufferStringSet mods_
Definition: moddepmgr.h:36
const T * find(const ObjectSet< T > &os, const S &val)
Get const object in set.
Definition: objectset.h:187
const ObjectSet< ModDep > & deps() const
Definition: moddepmgr.h:53
BufferString name_
Definition: moddepmgr.h:35
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
OpendTect.
Definition: commontypes.h:25
ObjectSet where the objects contained are owned by this set.
Definition: manobjectset.h:49
ManagedObjectSet< ModDep > deps_
Definition: moddepmgr.h:63
static const char * sAllNonUI()
Definition: moddepmgr.h:58

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