00001 #ifndef FUNCTION_H_INCLUDED_ 00002 #define FUNCTION_H_INCLUDED_ 00003 00004 #include <vector> 00005 #include <string> 00006 00007 #include "rose.h" 00008 00009 #include "definition.h" 00010 #include "class.h" 00011 00012 namespace risc { 00013 00014 class Function: public Definition { 00015 00016 public: 00017 00021 Function(SgFunctionDefinition *ast_node, Type type = FunctionType, 00022 Class *parent = NULL); 00023 00028 SgFunctionDefinition* get_ast_node(); 00029 00033 virtual std::string get_ast_type_name(); 00034 00038 std::string get_name(); 00039 00046 int starting_id_; 00047 00052 Class *parent_; 00053 00054 /************** Added by Guantao Liu 08/28/2015 **************/ 00059 SgNode* starting_node_; 00060 00064 void set_starting_node(SgNode*); 00065 00066 /**************** End Guantao Liu 08/28/2015 ****************/ 00067 00068 private: 00072 Function(const Function &f); 00073 }; 00074 00075 typedef std::vector<Function*> FunctionVector; 00076 typedef std::vector<Function*>::iterator FunctionVectorIter; 00077 typedef std::vector<Function*>::const_iterator FunctionVectorConstIter; 00078 00079 }; // end namespace risc 00080 00081 #endif /* FUNCTION_H_INCLUDED_ */ 00082 00083 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */