Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Static Public Attributes | Protected Attributes
Arc::Loader Class Reference

Plugins loader. More...

#include <Loader.h>

Inheritance diagram for Arc::Loader:
Inheritance graph
[legend]
Collaboration diagram for Arc::Loader:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Loader ()
 Loader (XMLNode cfg)
 Constructor that takes whole XML configuration and performs common configuration part.
 ~Loader ()
 Destructor destroys all components created by constructor.

Static Public Attributes

static Logger logger

Protected Attributes

PluginsFactoryfactory_
 Link to Factory responsible for loading and creation of Plugin and derived objects.

Detailed Description

Plugins loader.

This class processes XML configration and loads specified plugins. Accepted configuration is defined by XML schema mcc.xsd. "Plugins" elements are parsed by this class and corresponding libraries are loaded.

Definition at line 16 of file Loader.h.


Constructor & Destructor Documentation

Arc::Loader::Loader ( ) [inline]

Definition at line 26 of file Loader.h.

{};

Constructor that takes whole XML configuration and performs common configuration part.

Definition at line 18 of file Loader.cpp.

                            {
    factory_    = new PluginsFactory(cfg);
    for(int n = 0;; ++n) {
      XMLNode cn = cfg.Child(n);
      if(!cn) break;

      if(MatchXMLName(cn, "ModuleManager")) {
        continue;
      }

      if(MatchXMLName(cn, "Plugins")) {
        XMLNode n;
        for (int i = 0; (n = cn["Name"][i]) != false; i++) { 
            std::string name = (std::string)n;
            factory_->load(name);
        }
      }

      // Configuration processing is split to multiple functions - hence
      // ignoring all unknown elements.
      //logger.msg(WARNING, "Unknown element \"%s\" - ignoring", cn.Name());
    }

  }

Here is the call graph for this function:

Destructor destroys all components created by constructor.

Definition at line 14 of file Loader.cpp.

                      {
    if(factory_) delete factory_;
  }

Member Data Documentation

Link to Factory responsible for loading and creation of Plugin and derived objects.

Definition at line 23 of file Loader.h.

Definition at line 18 of file Loader.h.


The documentation for this class was generated from the following files: