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