00001 00012 #ifndef SYMBOL_FUNCTORS_H 00013 #define SYMBOL_FUNCTORS_H 00014 00015 #include "symbol.h" 00016 00018 struct less_by_file_loc { 00019 bool operator()(sample_entry const * lhs, 00020 sample_entry const * rhs) const { 00021 return lhs->file_loc < rhs->file_loc; 00022 } 00023 00024 bool operator()(symbol_entry const * lhs, 00025 symbol_entry const * rhs) const { 00026 return lhs->sample.file_loc < rhs->sample.file_loc; 00027 } 00028 }; 00029 00030 00032 struct less_symbol { 00033 // implementation compare by id rather than by string 00034 bool operator()(symbol_entry const & lhs, 00035 symbol_entry const & rhs) const; 00036 }; 00037 00038 #endif /* SYMBOL_FUNCTORS_H */