ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/selection/NameFinder.hpp
(Generate patch)

Comparing trunk/OOPSE-3.0/src/selection/NameFinder.hpp (file contents):
Revision 1967 by tim, Thu Feb 3 23:14:05 2005 UTC vs.
Revision 1968 by tim, Fri Feb 4 04:57:04 2005 UTC

# Line 42 | Line 42
42   #define SELECTION_NAMEFINDER_HPP
43   #include <set>
44   #include <string>
45 + #include <map>
46  
47   #include "utils/BitSet.hpp"
48   namespace oopse {
49  
50 < enum NameNodeType {
51 <    rootNode,
52 <    molNode,
53 <    atomNode,
54 <    rbNode,
55 <    rbAtomNode,
50 > class TreeNode{
51 >    public:
52 >        ~TreeNode();
53 >        std::string name;
54 >        BitSet bs;
55 >        std::map<std::string, TreeNode*> children;
56   };
57  
57 struct NameNode{
58    std::string name;
59    BitSet bs;
60    std::vector<NameNode*> children;
61    NameNodeType type;
62 };
63
58   class NameFinder{
59      public:
60          NameFinder(SimInfo* info);
61 +        ~NameFinder();
62          bool match(const std::string& name, BitSet& bs);
63  
64      private:
65          void loadNames();
66 <        SimInfo* info_;
66 >        void matchMolecule(const std::string& molName, BitSet& bs);
67 >        void matchStuntDouble(const std::string& molName, const std::string& sdName, BitSet& bs);
68 >        void matchRigidAtoms(const std::string& molName, const std::string& rbName, const std::string& rbAtomName, BitSet& bs);
69  
70 <        NameNode* root_;
70 >        std::vector<TreeNode*> getMatchedChildren(TreeNode* node, const std::string& name);
71 >        bool isMatched(const std::string& str, const std::string& wildcard);
72 >
73 >        SimInfo* info_;
74 >        int nStuntDouble_;
75 >        TreeNode* root_;
76   };
77  
78 +
79   }
80   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines