Back to index

nordugrid-arc-nox  1.1.0~rc6
resources_handling.h
Go to the documentation of this file.
00001 #ifndef SCHED_RESOURCES_HANDLING
00002 #define SCHED_RESOURCES_HANDLING
00003 
00004 #include <string>
00005 #include <map>
00006 #include "resource.h"
00007 
00008 
00009 namespace GridScheduler {
00010 
00011 class ResourcesHandling {
00012     private:
00013        std::map<std::string, Resource> resources;
00014     public:
00015         ResourcesHandling(void);
00016         void add(Resource &r);
00017         void remove(const std::string &id);
00018         Resource &get(const std::string &id);
00019         Resource &random(void);
00020         int size(void) { return resources.size(); };
00021         bool refresh(const std::string &id);
00022 };
00023 
00024 } // namespace Arc
00025 
00026 #endif // SCHED_RESOURCES_HANDLING