All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
file_classifier.h
Go to the documentation of this file.
1 #ifndef FILE_CLASSIFIER_H_INCLUDED_
2 #define FILE_CLASSIFIER_H_INCLUDED_
3 
4 #include "rose.h"
5 
6 namespace risc
7 {
8 
9 namespace tools
10 {
11 
12 Rose::StringUtility::FileNameLibrary get_library(int file_id);
13 Rose::StringUtility::FileNameLibrary get_library(Sg_File_Info* X);
14 
16  public std::unary_function<bool,SgFunctionDeclaration*> {
17 
18  bool operator() (SgFunctionDeclaration* node) const
19  {
20  if(node->get_definingDeclaration()) {
21 
22  if(get_library(node->get_definingDeclaration()->get_file_info()) ==
23  "User") {
24 
25  return true;
26  }
27  }
28 
29  if(get_library(node->get_file_info()) == "User") {
30 
31  return true;
32  } else {
33  return false;
34  }
35  }
36 };
37 
38 } // end namespace tools
39 
40 } // end namespace risc
41 
42 #endif /* FILE_CLASSIFIER_H_INCLUDED_ */
43 
44 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
Definition: file_classifier.h:15
bool operator()(SgFunctionDeclaration *node) const
Definition: file_classifier.h:18
Rose::StringUtility::FileNameLibrary get_library(int file_id)
Definition: file_classifier.cpp:4