Program Listing for File CPPAstInterface.h#
↰ Return to documentation for file (src/midend/astUtil/astInterface/CPPAstInterface.h)
#ifndef CPPAST_INTERFACE
#define CPPAST_INTERFACE
#include "AstInterface.h"
class CPPAstInterface : public AstInterface
{
public:
CPPAstInterface(AstInterfaceImpl* _impl) : AstInterface(_impl) {}
CPPAstInterface(AstInterface& fa) : AstInterface(fa) {}
bool IsMemberAccess( const AstNodePtr& n, AstNodePtr* obj = 0,
std::string* fieldname = 0);
//Check if $_s$ is a method call; if yes, grab relevant info.
bool IsMemberFunctionCall( const AstNodePtr& n,
AstNodePtr* obj = 0,
std::string* funcname = 0,
AstNodePtr* access = 0,
AstInterface::AstNodeList* args = 0);
AstNodePtr CreateFieldRef(std::string classname, std::string fieldname);
AstNodePtr CreateMethodRef(std::string classname, std::string methodname, bool addIfNotFound);
AstNodePtr CreateFunctionCall( const AstNodePtr& func,
const AstInterface::AstNodeList& args);
bool IsPointerVariable( const AstNodePtr& n);
AstNodePtr GetVarScope( const AstNodePtr& n);
bool IsPlusPlus( const AstNodePtr& s, AstNodePtr* opd = 0);
};
#endif