- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Descriptors/AtomDescriptor.cpp
r7a1ce5 r24a5e0 19 19 using namespace std; 20 20 21 typedef map<int,atom*> atoms_t; 22 typedef atoms_t::iterator atoms_iter_t; 21 typedef World::AtomSet::iterator atoms_iter_t; 23 22 24 23 /************************ Forwarding object **************************************/ … … 68 67 } 69 68 70 atoms_t& AtomDescriptor_impl::getAtoms(){69 World::AtomSet& AtomDescriptor_impl::getAtoms(){ 71 70 return World::get()->atoms; 72 71 } 73 72 74 73 atom* AtomDescriptor_impl::find() { 75 atoms_t atoms = getAtoms();74 World::AtomSet atoms = getAtoms(); 76 75 atoms_iter_t res = find_if(atoms.begin(),atoms.end(),boost::bind(&AtomDescriptor_impl::predicate,this,_1)); 77 76 return (res!=atoms.end())?((*res).second):0; … … 80 79 vector<atom*> AtomDescriptor_impl::findAll() { 81 80 vector<atom*> res; 82 atoms_t atoms = getAtoms();81 World::AtomSet atoms = getAtoms(); 83 82 atoms_iter_t iter; 84 83 for(iter=atoms.begin();iter!=atoms.end();++iter) { … … 98 97 {} 99 98 100 bool AtomAllDescriptor_impl::predicate(std::pair< int,atom*>){99 bool AtomAllDescriptor_impl::predicate(std::pair<atomId_t,atom*>){ 101 100 return true; 102 101 } … … 112 111 {} 113 112 114 bool AtomNoneDescriptor_impl::predicate(std::pair< int,atom*>){113 bool AtomNoneDescriptor_impl::predicate(std::pair<atomId_t,atom*>){ 115 114 return false; 116 115 } … … 130 129 {} 131 130 132 bool AtomAndDescriptor_impl::predicate(std::pair< int,atom*> atom){131 bool AtomAndDescriptor_impl::predicate(std::pair<atomId_t,atom*> atom){ 133 132 return lhs->predicate(atom) && rhs->predicate(atom); 134 133 } … … 146 145 } 147 146 148 bool AtomOrDescriptor_impl::predicate(std::pair< int,atom*> atom){147 bool AtomOrDescriptor_impl::predicate(std::pair<atomId_t,atom*> atom){ 149 148 return lhs->predicate(atom) || rhs->predicate(atom); 150 149 } … … 166 165 } 167 166 168 bool AtomNotDescriptor_impl::predicate(std::pair< int,atom*> atom){167 bool AtomNotDescriptor_impl::predicate(std::pair<atomId_t,atom*> atom){ 169 168 return !(arg->predicate(atom)); 170 169 }
Note:
See TracChangeset
for help on using the changeset viewer.