CifParentChild.h

Go to the documentation of this file.
00001 //$$FILE$$
00002 //$$VERSION$$
00003 //$$DATE$$
00004 //$$LICENSE$$
00005 
00006 
00014 #ifndef CIFPARENTCHILD_H
00015 #define CIFPARENTCHILD_H
00016 
00017 
00018 #include <string>
00019 #include <vector>
00020 #include <sstream>
00021 
00022 #include "ISTable.h"
00023 #include "TableFile.h"
00024 #include "CifFile.h"
00025 #include "ParentChild.h"
00026 
00027 
00028 #define JW_HACK
00029 
00030 #ifdef JW_HACK
00031 //  JW_DEBUG invokes significant debug printout associated with parent
00032 //           child checking.  Some hacks have been introduced to improve
00033 //            checking in this module.
00034 // #define JW_DEBUG 1
00035 #endif
00036 
00037 
00038 class CifParentChild : public ParentChild
00039 {
00040   public:
00041     CifParentChild(Block& block);
00042     CifParentChild(Block& block, ISTable* parChildTableP);
00043 
00044     virtual ~CifParentChild();
00045 
00046     int CheckParentChild(Block& block, ISTable& catTable,
00047       std::ostringstream& log);
00048 
00049     void WriteGroupTables(Block& block);
00050 
00051   protected:
00052     void GetParentCifItems(std::vector<std::string>& parCifItems,
00053       const std::string& cifItemName);
00054 
00055   private:
00056     ISTable* _parChildTableP;
00057 
00058     ISTable* _inParChildGroupP;
00059     ISTable* _inParChildGroupListP;
00060 
00061     void Init(Block& block);
00062 
00063     ISTable* CreateKeysTableOld(const std::vector<std::string>& cifItemNames,
00064       std::map<std::string, unsigned int>& maxKeyGroups);
00065 
00066     void FillKeysTableOld(ISTable& keysTable,
00067       const std::vector<std::string>& cifItemNames,
00068       std::map<std::string, unsigned int>& maxKeyGroups);
00069 
00070     void BuildOldTables(const std::vector<std::string>& cats,
00071       const std::vector<std::vector<std::string> >& items);
00072 
00073     void BuildNewTables(const std::vector<std::string>& cats,
00074       const std::vector<std::vector<std::string> >& items);
00075 
00076     void FilterMissingItems(std::vector<std::vector<std::string> >& parParKeys,
00077       std::vector<std::vector<std::string> >& comboComboKeys,
00078       const std::vector<std::string>& cifItemNames);
00079 
00080     unsigned int LastGroupNum(const std::string& childCat);
00081 };
00082 
00083 
00084 #endif
00085 

Generated on Thu Sep 29 09:19:18 2011 for cif-file-v1.1.0 by  doxygen 1.4.7