00001 #ifndef FILE_CLASSIFIER_H_INCLUDED_
00002 #define FILE_CLASSIFIER_H_INCLUDED_
00003
00004 #include "rose.h"
00005
00006 namespace risc
00007 {
00008
00009 namespace tools
00010 {
00011
00012 StringUtility::FileNameLibrary get_library(int file_id);
00013 StringUtility::FileNameLibrary get_library(Sg_File_Info* X);
00014
00015 struct UserSpaceFilter:
00016 public std::unary_function<bool,SgFunctionDeclaration*> {
00017
00018 bool operator() (SgFunctionDeclaration* node) const
00019 {
00020 if(node->get_definingDeclaration()) {
00021
00022 if(get_library(node->get_definingDeclaration()->get_file_info()) ==
00023 "User") {
00024
00025 return true;
00026 }
00027 }
00028
00029 if(get_library(node->get_file_info()) == "User") {
00030
00031 return true;
00032 } else {
00033 return false;
00034 }
00035 }
00036 };
00037
00038 }
00039
00040 }
00041
00042 #endif
00043
00044