Back to index

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

Class responsible for loading Submitter plugins The Submitter objects returned by a SubmitterLoader must not be used after the SubmitterLoader goes out of scope. More...

#include <Submitter.h>

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

List of all members.

Public Member Functions

 SubmitterLoader ()
 Constructor Creates a new SubmitterLoader.
 ~SubmitterLoader ()
 Destructor Calling the destructor destroys all Submitters loaded by the SubmitterLoader instance.
Submitterload (const std::string &name, const UserConfig &usercfg)
 Load a new Submitter.
const std::list< Submitter * > & GetSubmitters () const
 Retrieve the list of loaded Submitters.

Static Public Attributes

static Logger logger

Protected Attributes

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

Private Attributes

std::list< Submitter * > submitters

Detailed Description

Class responsible for loading Submitter plugins The Submitter objects returned by a SubmitterLoader must not be used after the SubmitterLoader goes out of scope.

Definition at line 90 of file Submitter.h.


Constructor & Destructor Documentation

Constructor Creates a new SubmitterLoader.

Definition at line 145 of file Submitter.cpp.

    : Loader(BaseConfig().MakeConfig(Config()).Parent()) {}

Destructor Calling the destructor destroys all Submitters loaded by the SubmitterLoader instance.

Definition at line 148 of file Submitter.cpp.

                                    {
    for (std::list<Submitter*>::iterator it = submitters.begin();
         it != submitters.end(); it++)
      delete *it;
  }

Member Function Documentation

const std::list<Submitter*>& Arc::SubmitterLoader::GetSubmitters ( ) const [inline]

Retrieve the list of loaded Submitters.

Returns:
A reference to the list of Submitters.

Definition at line 111 of file Submitter.h.

                                                     {
      return submitters;
    }

Here is the caller graph for this function:

Submitter * Arc::SubmitterLoader::load ( const std::string &  name,
const UserConfig usercfg 
)

Load a new Submitter.

Parameters:
nameThe name of the Submitter to load.
usercfgThe UserConfig object for the new Submitter.
Returns:
A pointer to the new Submitter (NULL on error).

Definition at line 154 of file Submitter.cpp.

                                                              {
    if (name.empty())
      return NULL;

    if(!factory_->load(FinderLoader::GetLibrariesList(),
                       "HED:Submitter", name)) {
      logger.msg(ERROR, "Submitter plugin \"%s\" not found.", name);
      return NULL;
    }

    SubmitterPluginArgument arg(usercfg);
    Submitter *submitter =
      factory_->GetInstance<Submitter>("HED:Submitter", name, &arg, false);

    if (!submitter) {
      logger.msg(ERROR, "Submitter %s could not be created", name);
      return NULL;
    }

    submitters.push_back(submitter);
    logger.msg(INFO, "Loaded Submitter %s", name);
    return submitter;
  }

Here is the call graph for this function:


Member Data Documentation

PluginsFactory* Arc::Loader::factory_ [protected, inherited]

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

Definition at line 23 of file Loader.h.

Logger Arc::Loader::logger [static, inherited]

Definition at line 18 of file Loader.h.

Definition at line 116 of file Submitter.h.


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