Free Electron
Master.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __core_Master_h__
8 #define __core_Master_h__
9 
10 #define FE_CAT_SPEC(name, description) name
11 #define FE_CAT(name) name
12 
13 namespace fe
14 {
15 
16 /**************************************************************************//**
17  @brief Central access point for key pseudo-global objects
18 
19  @ingroup plugin
20 *//***************************************************************************/
21 class FE_DL_EXPORT Master: public Handled<Master>
22 {
23  public:
24  Master(void);
25 #if FE_CPLUSPLUS >= 201103L
26  Master(const Master &) =delete;
27 #endif
28 
29 virtual ~Master(void);
30 
31  void bind(sp<TypeMaster>& a_rspTypeMaster)
32  { m_spTypeMaster=a_rspTypeMaster; }
33  sp<TypeMaster> typeMaster(void) const
34  { return m_spTypeMaster; }
35 
36  void bind(sp<Registry>& a_rspRegistry)
37  { m_spRegistry=a_rspRegistry; }
38  sp<Registry> registry(void) const
39  { return m_spRegistry; }
40 
41  //* instantiate a generic catalog
42  sp<Catalog> createCatalog(String a_name);
43 
44  //* return the master catalog
45  sp<Catalog> catalog(void);
46 
47  sp<Allocator> allocator(void) const { return m_spAllocator; }
48 
49  private:
50  sp<TypeMaster> m_spTypeMaster;
51  sp<Registry> m_spRegistry;
52  sp<Allocator> m_spAllocator;
53 
54  sp<Library> m_spLibrary;
55  sp<Catalog> m_spCatalog;
56  bool m_active;
57 
58 static RecursiveMutex ms_mutex;
59 };
60 
61 } /* namespace */
62 
63 #endif /* __core_Master_h__ */
64 
kernel
Definition: namespace.dox:3
Automatically reference-counted string container.
Definition: String.h:128
Base class providing an fe::Handle to the derived class.
Definition: Handled.h:209
Central access point for key pseudo-global objects.
Definition: Master.h:21