CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MappingDatabase.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_MAPPINGDATABASE_H
2 #define INCLUDE_ORA_MAPPINGDATABASE_H
3 
4 #include "Sequences.h"
5 //
6 #include <string>
7 #include <map>
8 #include <vector>
9 #include <set>
10 
11 namespace Reflex{
12  class Type;
13 }
14 
15 namespace ora {
16 
17  class IDatabaseSchema;
18  class MappingTree;
19  class MappingElement;
20  class MappingRawData;
21  class MappingRawElement;
22 
28 
29  public:
30 
31  static std::string versionOfClass( const Reflex::Type& dictionary );
32  public:
35 
38 
39  std::string newMappingVersionForContainer( const std::string& className );
40 
41  std::string newMappingVersionForDependentClass( const std::string& containerName, const std::string& className );
42 
43  bool getMappingByVersion( const std::string& version, MappingTree& destination );
44 
45  void removeMapping( const std::string& version );
46 
47  bool getMappingForContainer( const Reflex::Type& containerClass, int containerId, MappingTree& destination );
48 
49  bool getBaseMappingForContainer( const std::string& className, int containerId, MappingTree& destination );
50 
51  bool getDependentMappingsForContainer( int containerId, std::vector<MappingElement>& destination );
52 
53  bool getDependentClassesForContainer( int containerId, std::set<std::string>& list );
54 
55  bool getClassVersionListForMappingVersion( const std::string& mappingVersion, std::set<std::string>& destination );
56 
57  bool getClassVersionListForContainer( int containerId, std::map<std::string,std::string>& versionMap );
58 
59  void insertClassVersion( const Reflex::Type& dictionaryEntry, int dependencyIndex, int containerId, const std::string& mappingVersion, bool asBase=false );
60 
61  void insertClassVersion( const std::string& className, const std::string& classVersion, int dependencyIndex, int containerId, const std::string& mappingVersion, bool asBase=false );
62 
63  void setMappingVersionForClass( const Reflex::Type& dictionaryEntry, int containerId, const std::string& mappingVersion , bool dependency=false);
64 
65  void storeMapping( const MappingTree& mappingStructure );
66 
67  bool getMappingVersionsForContainer( int containerId, std::set<std::string>& versionList );
68 
69  const std::set<std::string>& versions();
70 
71  void clear();
72 
73  private:
74  void buildElement( MappingElement& parentElement, const std::string& scopeName,
75  std::map<std::string,std::vector<MappingRawElement> >& innerElements );
76  void unfoldElement( const MappingElement& element, MappingRawData& destination );
77 
78  private:
79 
83  std::set<std::string> m_versions;
84  bool m_isLoaded;
86 
87  };
88 
89 }
90 
91 #endif
NamedSequence m_mappingSequence
MappingDatabase(IDatabaseSchema &schema)
Constructor.
bool getDependentMappingsForContainer(int containerId, std::vector< MappingElement > &destination)
bool getBaseMappingForContainer(const std::string &className, int containerId, MappingTree &destination)
bool getClassVersionListForMappingVersion(const std::string &mappingVersion, std::set< std::string > &destination)
void setMappingVersionForClass(const Reflex::Type &dictionaryEntry, int containerId, const std::string &mappingVersion, bool dependency=false)
void buildElement(MappingElement &parentElement, const std::string &scopeName, std::map< std::string, std::vector< MappingRawElement > > &innerElements)
void insertClassVersion(const Reflex::Type &dictionaryEntry, int dependencyIndex, int containerId, const std::string &mappingVersion, bool asBase=false)
void unfoldElement(const MappingElement &element, MappingRawData &destination)
std::string newMappingVersionForDependentClass(const std::string &containerName, const std::string &className)
bool getMappingVersionsForContainer(int containerId, std::set< std::string > &versionList)
void storeMapping(const MappingTree &mappingStructure)
bool getMappingForContainer(const Reflex::Type &containerClass, int containerId, MappingTree &destination)
~MappingDatabase()
Destructor.
bool getClassVersionListForContainer(int containerId, std::map< std::string, std::string > &versionMap)
static std::string versionOfClass(const Reflex::Type &dictionary)
std::string newMappingVersionForContainer(const std::string &className)
bool getDependentClassesForContainer(int containerId, std::set< std::string > &list)
bool getMappingByVersion(const std::string &version, MappingTree &destination)
const std::set< std::string > & versions()
std::set< std::string > m_versions
IDatabaseSchema & m_schema
The schema in use.
void removeMapping(const std::string &version)
std::string className(const T &t)
Definition: ClassName.h:30
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run