Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Private Attributes
GridScheduler::ResourcesHandling Class Reference

#include <resources_handling.h>

Collaboration diagram for GridScheduler::ResourcesHandling:
Collaboration graph

List of all members.

Public Member Functions

 ResourcesHandling (void)
void add (Resource &r)
void remove (const std::string &id)
Resourceget (const std::string &id)
Resourcerandom (void)
int size (void)
bool refresh (const std::string &id)

Private Attributes

std::map< std::string, Resourceresources

Detailed Description

Definition at line 11 of file resources_handling.h.

Constructor & Destructor Documentation

Definition at line 12 of file resources_handling.cpp.

    // NOP

Member Function Documentation

Definition at line 17 of file resources_handling.cpp.

    resources.insert(make_pair(r.getURL(), r));

Here is the call graph for this function:

Resource & GridScheduler::ResourcesHandling::get ( const std::string &  id)

Definition at line 27 of file resources_handling.cpp.

    return resources[id];

Definition at line 38 of file resources_handling.cpp.

    int i;
    i = std::rand() % resources.size();

    std::map<std::string, Resource>::iterator it;
    it = resources.begin();
    for (;i > 0; it++, i--) {}
    std::cout << "Random selected resource: " << it->second.getURL() << std::endl;
    return (*it).second;
bool GridScheduler::ResourcesHandling::refresh ( const std::string &  id)

Definition at line 32 of file resources_handling.cpp.

    return true;
void GridScheduler::ResourcesHandling::remove ( const std::string &  id)

Definition at line 22 of file resources_handling.cpp.

int GridScheduler::ResourcesHandling::size ( void  ) [inline]

Definition at line 20 of file resources_handling.h.

{ return resources.size(); };

Here is the caller graph for this function:

Member Data Documentation

std::map<std::string, Resource> GridScheduler::ResourcesHandling::resources [private]

Definition at line 13 of file resources_handling.h.

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