AbstractDeviceFactory.cpp

Go to the documentation of this file.
00001 // Copyright CERN 2012 - Developed in collaboration with GSI
00002 
00003 #include <fesa-core/DataStore/AbstractDeviceFactory.h>
00004 
00005 #include <fesa-core/Sorting/SortingInterpreter.h>
00006 #include <fesa-core/Sorting/HomogeneousDevCol.h>
00007 
00008 
00009 namespace fesa
00010 {
00011 
00012 AbstractDeviceFactory::AbstractDeviceFactory(const std::string& className) :
00013     className_(className),
00014     pAbstractDeviceCol_(0)
00015 {
00016 }
00017 
00018 std::set<HomogeneousDevCol *> AbstractDeviceFactory::getSortedDeviceCollection(const std::string& selectionCriteria)
00019 {
00020     if (pAbstractDeviceCol_.empty())
00021     {
00022         std::set<HomogeneousDevCol *> emptySet;
00023         return emptySet;
00024     }
00025     // Build the device collection by applying the selection criteria
00026     SortingInterpreter sorter;
00027 
00028     return sorter.interpret(selectionCriteria, className_, &pAbstractDeviceCol_);
00029 }
00030 
00031 const std::vector<AbstractDevice*>& AbstractDeviceFactory::getAbstractDeviceCollection()
00032 {
00033     return pAbstractDeviceCol_;
00034 }
00035 
00036 AbstractDeviceFactory::~AbstractDeviceFactory()
00037 {
00038 }
00039 
00040 } // fesa

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1