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 00011 namespace risc { 00012 00013 class Function: public Definition { 00014 00015 public: 00016 00020 explicit Function(SgFunctionDefinition *ast_node, Type type = FunctionType); 00021 00026 SgFunctionDefinition* get_ast_node(); 00027 00031 virtual std::string get_ast_type_name(); 00032 00036 std::string get_name(); 00037 00044 int starting_id_; 00045 00046 /************** Added by Guantao Liu 08/28/2015 **************/ 00051 SgNode* starting_node_; 00052 00056 void set_starting_node(SgNode*); 00057 00058 /**************** End Guantao Liu 08/28/2015 ****************/ 00059 00060 private: 00064 Function(const Function &f); 00065 }; 00066 00067 typedef std::vector<Function*> FunctionVector; 00068 typedef std::vector<Function*>::iterator FunctionVectorIter; 00069 typedef std::vector<Function*>::const_iterator FunctionVectorConstIter; 00070 00071 }; // end namespace risc 00072 00073 #endif /* FUNCTION_H_INCLUDED_ */ 00074 00075 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */