Back to index

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

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

#include <TargetRetriever.h>

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

List of all members.

Public Member Functions

 TargetRetrieverLoader ()
 Constructor Creates a new TargetRetrieverLoader.
 ~TargetRetrieverLoader ()
 Destructor Calling the destructor destroys all TargetRetrievers loaded by the TargetRetrieverLoader instance.
TargetRetrieverload (const std::string &name, const UserConfig &usercfg, const URL &url, const ServiceType &st)
 Load a new TargetRetriever.
const std::list
< TargetRetriever * > & 
GetTargetRetrievers () const
 Retrieve the list of loaded TargetRetrievers.

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< TargetRetriever * > targetretrievers

Detailed Description

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

Definition at line 75 of file TargetRetriever.h.


Constructor & Destructor Documentation

Constructor Creates a new TargetRetrieverLoader.

Definition at line 26 of file TargetRetriever.cpp.

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

Destructor Calling the destructor destroys all TargetRetrievers loaded by the TargetRetrieverLoader instance.

Definition at line 29 of file TargetRetriever.cpp.

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

Member Function Documentation

Retrieve the list of loaded TargetRetrievers.

Returns:
A reference to the list of TargetRetrievers.

Definition at line 98 of file TargetRetriever.h.

                                                                 {
      return targetretrievers;
    }

Here is the caller graph for this function:

TargetRetriever * Arc::TargetRetrieverLoader::load ( const std::string &  name,
const UserConfig usercfg,
const URL url,
const ServiceType st 
)

Load a new TargetRetriever.

Parameters:
nameThe name of the TargetRetriever to load.
usercfgThe UserConfig object for the new TargetRetriever.
urlThe URL used to contact the target.
stspecifies service type of the target.
Returns:
A pointer to the new TargetRetriever (NULL on error).

Definition at line 35 of file TargetRetriever.cpp.

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

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

    TargetRetrieverPluginArgument arg(usercfg, url, st);
    TargetRetriever *targetretriever =
      factory_->GetInstance<TargetRetriever>("HED:TargetRetriever", name, &arg, false);

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

    targetretrievers.push_back(targetretriever);
    logger.msg(INFO, "Loaded TargetRetriever %s", name);
    return targetretriever;
  }

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.

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

Definition at line 18 of file Loader.h.

Definition at line 103 of file TargetRetriever.h.


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