|
yast2-core
|
#include <Y2ComponentBroker.h>
Classes | |
| struct | ltstr |
Public Types | |
| enum | order_t { BUILTIN = 0, PLUGIN = 1, SCRIPT = 2, EXTERNAL_PROGRAM = 3, NETWORK = 4, MAX_ORDER = 5 } |
Static Public Member Functions | |
| static void | registerComponentCreator (const Y2ComponentCreator *creator, order_t order, bool force=false) |
| static Y2Component * | createClient (const char *name) |
| static Y2Component * | createServer (const char *name) |
| static Y2Component * | getNamespaceComponent (const char *name) |
| static bool | registerNamespaceException (const char *name_space, const char *component_name) |
Static Private Member Functions | |
| static Y2Component * | createComponent (const char *name, bool look_for_clients) |
| static void | initializeLists () |
Static Private Attributes | |
| static map< const char *, const Y2Component *, ltstr > | namespaces |
| static vector< const Y2ComponentCreator * > * | creators [MAX_ORDER] = { 0, 0, 0, 0, 0 } |
| static bool | stop_register = false |
| static map< string, string > | namespace_exceptions |
|
static |
Is a wrapper for createComponent, but only looks for clients.
References createComponent().
Referenced by Y2WFMComponent::CallFunction(), Y2WFMComponent::ClientExists(), getNamespaceComponent(), and main().
|
staticprivate |
Tries to create or find a YaST2 component.
| spec | Specifies which component to find. |
| look_for_clients | Set this to true if you are looking for clients. If set to false only servers are created. |
References Y2ComponentCreator::createInLevel(), creators, Y2PathSearch::currentComponentLevel(), Y2PathSearch::GENERIC, initializeLists(), Y2ComponentCreator::isClientCreator(), Y2ComponentCreator::isServerCreator(), MAX_ORDER, Y2PathSearch::numberOfComponentLevels(), Y2PathSearch::searchPath(), stop_register, and y2debug.
Referenced by createClient(), and createServer().
|
static |
Is a wrapper for createComponent, but only looks for servers.
References createComponent().
Referenced by getNamespaceComponent(), main(), SCRSubAgent::mount(), processfile(), and WFMSubAgent::start().
|
static |
Provide a component which implements the given namespace.
| name | the name of the requested namespace |
References createClient(), createServer(), creators, MAX_ORDER, namespace_exceptions, namespaces, Y2ComponentCreator::provideNamespace(), stop_register, y2debug, and y2warning.
Referenced by Debugger::findSymbol(), Import::import(), and main().
|
staticprivate |
Initializes creators.
References creators, and MAX_ORDER.
Referenced by createComponent(), and registerComponentCreator().
|
static |
Enters a component creator into the list of component creators. Is called by Y2ComponentCreator::Y2ComponentCreator.
| creator | the component creator the register |
| order | The orders define the order how the creators are looked up. A creator with a lower order is looked up before one with a higher order. It is very important that the compiled-in components must be created with the lowest order to prevent an infinitive loop of starting external components. |
| force | override the stop_register flag. See order_t for the possible orders. |
References creators, initializeLists(), and stop_register.
Referenced by Y2ComponentCreator::Y2ComponentCreator().
|
static |
Register a new namespace exception to be used by getNamespaceComponent.
| name_space | the namespace to be changed |
| component_name | the component which should provide the namespace |
References namespace_exceptions, namespaces, and y2error.
Referenced by main().
|
staticprivate |
Storage for the component creators.
Referenced by createComponent(), getNamespaceComponent(), initializeLists(), and registerComponentCreator().
|
staticprivate |
A map containing a namespace exceptions. This will be honoured in getNamespaceComponent to give an explicit preference for a namespace to be created by a preffered component.
Referenced by getNamespaceComponent(), and registerNamespaceException().
|
staticprivate |
Referenced by getNamespaceComponent(), and registerNamespaceException().
|
staticprivate |
This flag stops the registry of components at the broker. It must be set to true before any plugin (dynamic loadable library) is loaded!
Referenced by createComponent(), getNamespaceComponent(), and registerComponentCreator().
1.8.6