Back to index

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

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

#include <JobController.h>

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

List of all members.

Public Member Functions

 JobControllerLoader ()
 Constructor Creates a new JobControllerLoader.
 ~JobControllerLoader ()
 Destructor Calling the destructor destroys all JobControllers loaded by the JobControllerLoader instance.
JobControllerload (const std::string &name, const UserConfig &usercfg)
 Load a new JobController.
const std::list< JobController * > & GetJobControllers () const
 Retrieve the list of loaded JobControllers.

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< JobController * > jobcontrollers

Detailed Description

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

Definition at line 157 of file JobController.h.


Constructor & Destructor Documentation

Constructor Creates a new JobControllerLoader.

Definition at line 872 of file JobController.cpp.

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

Destructor Calling the destructor destroys all JobControllers loaded by the JobControllerLoader instance.

Definition at line 875 of file JobController.cpp.

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

Member Function Documentation

const std::list<JobController*>& Arc::JobControllerLoader::GetJobControllers ( ) const [inline]

Retrieve the list of loaded JobControllers.

Returns:
A reference to the list of JobControllers.

Definition at line 178 of file JobController.h.

                                                             {
      return jobcontrollers;
    }

Here is the caller graph for this function:

JobController * Arc::JobControllerLoader::load ( const std::string &  name,
const UserConfig usercfg 
)

Load a new JobController.

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

Definition at line 881 of file JobController.cpp.

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

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

    JobControllerPluginArgument arg(usercfg);
    JobController *jobcontroller =
      factory_->GetInstance<JobController>("HED:JobController", name, &arg, false);

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

    jobcontrollers.push_back(jobcontroller);
    logger.msg(INFO, "Loaded JobController %s", name);
    return jobcontroller;
  }

Here is the call graph for this function:

Here is the caller 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.

Definition at line 183 of file JobController.h.

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

Definition at line 18 of file Loader.h.


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