ParserElements.h

Go to the documentation of this file.
00001 // Copyright CERN 2012 - Developed in collaboration with GSI
00002 
00003 #ifndef PARSER_ELEMENTS_H_
00004 #define PARSER_ELEMENTS_H_
00005 
00006 #include <fesa-core/Core/FesaDefs.h>
00007 #include <fesa-core/Utilities/XMLParser.h>
00008 #include <fesa-core/Utilities/StringUtilities.h>
00009 
00010 #include <string>
00011 #include <map>
00012 #include <vector>
00013 
00014 namespace fesa
00015 {
00021 class RollingMultiplexingElement
00022 {
00023   public:
00029     RollingMultiplexingElement(int32_t depth, const std::string base);
00030 
00034     ~RollingMultiplexingElement();
00035 
00040     int32_t getDepth();
00041 
00046     std::string getBase();
00047 
00048   protected:
00049 
00053     int32_t depth_;
00054 
00058     std::string base_;
00059 };
00060 
00066 class FieldElement
00067 {
00068   public:
00069 
00074     FieldElement(const std::string fieldName);
00075 
00079     ~FieldElement();
00080 
00085     uint32_t getExtraConditionDepth();
00086 
00091     uint32_t getMultiplexingDepth();
00092 
00098     std::string getCycleName(int32_t cycleId);
00099 
00106     void getDimensions(uint32_t& dimension1, uint32_t& dimension2);
00107 
00111     std::string fieldName_;
00112 
00117     std::map<int32_t, std::string> fieldValuesCol_;
00118 
00123     std::map<int32_t, std::map<std::string, std::string> > fieldExtraValuesCol_;
00124 
00128     std::map<int32_t, std::string> cyclesNamesCol_;
00129 
00133     uint32_t dimension1_;
00134 
00138     uint32_t dimension2_;
00139 
00143     bool fromPersistency_;
00144 };
00145 
00150 class DataStoreElement
00151 {
00152   public:
00153 
00158     DataStoreElement(std::string name);
00159 
00163     ~DataStoreElement();
00164 
00170     FieldElement* getFieldElement(const std::string fieldName);
00171 
00176     const std::map<std::string, FieldElement*>& getFieldElementMap();
00177 
00183     const std::string& getFieldValue(const std::string fieldName);
00184 
00189     void addFieldElement(FieldElement* fieldElement);
00190 
00196     void setFieldValue(const std::string fieldName, const std::string fieldValue);
00197 
00201     const std::string& getName();
00202 
00206     int32_t getSize();
00207 
00212     const std::string& getTimingDomain();
00213 
00217     const std::string& getTimingCriterion();
00218 
00222     bool isMultiplexed();
00223 
00224   private:
00225 
00229     std::map<std::string, FieldElement*> fieldElements_;
00230 };
00231 
00236 class GlobalDeviceElement: public DataStoreElement
00237 {
00238   public:
00239 
00244     GlobalDeviceElement(const std::string name);
00245 
00249     ~GlobalDeviceElement();
00250 
00255     const std::string& getClassName();
00256 
00261     const std::string& getDescription();
00262 
00263 };
00264 
00269 class DeviceElement: public DataStoreElement
00270 {
00271   public:
00272 
00277     DeviceElement(std::string name);
00278 
00282     ~DeviceElement();
00283 
00288     const std::string& getAccelerator();
00289 
00293     const std::string& getDescription();
00294 
00298     bool isMultiplexed();
00299 
00303     std::vector<std::string> extraCriterionCol_;
00304 
00305 };
00306 
00311 class DomainStoreElement: public DataStoreElement
00312 {
00313   public:
00314 
00319     DomainStoreElement(std::string name);
00320 
00324     ~DomainStoreElement();
00325 
00329     const std::string& getTimingDomain();
00330 
00334     const std::string& getMultiplexingCriterion();
00335 
00336 };
00337 }
00338 
00339 #endif /* PARSER_ELEMENTS_H_ */

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1