--- trunk/src/selection/NameFinder.hpp 2005/02/04 04:57:04 284 +++ trunk/src/selection/NameFinder.hpp 2005/12/02 15:38:03 770 @@ -43,38 +43,43 @@ #include #include #include - -#include "utils/BitSet.hpp" +#include "brains/SimInfo.hpp" +#include "utils/OOPSEBitSet.hpp" namespace oopse { -class TreeNode{ - public: - ~TreeNode(); - std::string name; - BitSet bs; - std::map children; -}; + class TreeNode{ + public: + ~TreeNode(); + std::string name; + OOPSEBitSet bs; + std::map children; + }; -class NameFinder{ - public: - NameFinder(SimInfo* info); - ~NameFinder(); - bool match(const std::string& name, BitSet& bs); + class NameFinder{ + public: + NameFinder(SimInfo* info); + ~NameFinder(); + OOPSEBitSet match(const std::string& name); - private: - void loadNames(); - void matchMolecule(const std::string& molName, BitSet& bs); - void matchStuntDouble(const std::string& molName, const std::string& sdName, BitSet& bs); - void matchRigidAtoms(const std::string& molName, const std::string& rbName, const std::string& rbAtomName, BitSet& bs); + private: + void loadNames(); + void matchMolecule(const std::string& molName, OOPSEBitSet& bs); + void matchStuntDouble(const std::string& molName, const std::string& sdName, OOPSEBitSet& bs); + void matchRigidAtoms(const std::string& molName, const std::string& rbName, const std::string& rbAtomName, OOPSEBitSet& bs); - std::vector getMatchedChildren(TreeNode* node, const std::string& name); - bool isMatched(const std::string& str, const std::string& wildcard); + void matchInternalIndex(const std::string& name, int internalIndex, OOPSEBitSet& bs); - SimInfo* info_; - int nStuntDouble_; - TreeNode* root_; -}; + TreeNode* createNode(TreeNode* parent, const std::string& name); + std::vector getMatchedChildren(TreeNode* node, const std::string& name); + bool isMatched(const std::string& str, const std::string& wildcard); + bool isInteger(const std::string str); + SimInfo* info_; + int nStuntDouble_; + TreeNode* root_; + }; + + } #endif