4 #ifndef loop_adapter_INCLUDED
5 #define loop_adapter_INCLUDED
12 #include "abstract_handle.h"
25 virtual std::string getFileName()
const;
27 virtual std::string toString()
const;
28 virtual size_t getNumbering(
const abstract_node* another_node)
const;
29 virtual bool operator == (
const abstract_node & x)
const;
31 std::vector<MyLoop*> getChildren()
const {
return mNode->children;};
37 extern std::map<std::string, AbstractHandle::abstract_node*> file_node_map;
43 fileNode(std::string name):mfileName(name){ file_node_map[name]=
this;};
47 virtual std::string
getName()
const;
49 virtual std::string toString()
const;
50 virtual std::string getFileName()
const;
51 virtual bool operator == (
const abstract_node & x)
const;
54 void setMLoops(std::vector<MyLoop*> myloops ){mLoops = myloops;}
55 std::vector<MyLoop*> getMLoops()
const {
return mLoops;}
58 std::string mfileName;
59 std::vector<MyLoop*> mLoops;
virtual AbstractHandle::abstract_node * getFileNode() const
Get the start source file position of the construct Get the abstract node for file containing the cur...
MyLoop * getNode() const
Get the raw IR node associated with the current abstract node.
virtual AbstractHandle::abstract_node * findNode(std::string construct_type_str, AbstractHandle::specifier mspecifier) const
Find a node of a given type, it also matches the specifier.
source position information:
virtual AbstractHandle::abstract_node * findNode(std::string construct_type_str, AbstractHandle::specifier mspecifier) const
Find a node of a given type, it also matches the specifier.
virtual bool hasSourcePos() const
If the node has meaningful line and column numbers associated with a file.
virtual std::string getConstructTypeName() const
Get the construct' s type name, like function.
construct specifier could be used to specify a construct by name, position, numbering, labels, etc (e_name, foo) (e_position, 15)
virtual std::string getConstructTypeName() const
Get the construct' s type name, like function.
virtual bool hasName() const
If the node has legal names defined by language standards.
virtual std::string getName() const
Get the name of the construct if it is named, like function name.
virtual AbstractHandle::abstract_node * getParent() const
Get parent node, used for generate parent handle automatically.
Users should provide a concrete node implementation especially a constructor/builder to avoid duplica...