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
00014 StringUtility::FileNameLibrary get_library(Sg_File_Info* X);
00015
00016
00017
00018 struct UserSpaceFilter:
00019 public std::unary_function<bool,SgFunctionDeclaration*> {
00020
00021 bool operator() (SgFunctionDeclaration* node) const
00022 {
00023 if(node->get_definingDeclaration()) {
00024
00025 if(get_library(node->get_definingDeclaration()->get_file_info()) ==
00026 "User") {
00027
00028 return true;
00029 }
00030 }
00031
00032 if(get_library(node->get_file_info()) == "User") {
00033
00034 return true;
00035 } else {
00036 return false;
00037 }
00038 }
00039 };
00040
00041 }
00042
00043 }
00044
00045 #endif
00046
00047