DynAST.h File Reference

#include <vector>
#include <string>
#include <sstream>
#include <iostream>
#include "util.h"
#include "boost/enable_shared_from_this.hpp"

Go to the source code of this file.

Data Structures

class  Dyninst::AST
class  Dyninst::ASTVisitor

Namespaces

namespace  Dyninst
namespace  Dyninst::DataflowAPI

Defines

#define AST_H
#define DEF_AST_LEAF_TYPE(name, type)
#define DEF_AST_INTERNAL_TYPE(name, type)

Define Documentation

#define AST_H

Definition at line 32 of file DynAST.h.

#define DEF_AST_INTERNAL_TYPE ( name,
type   ) 

Definition at line 113 of file DynAST.h.

#define DEF_AST_LEAF_TYPE ( name,
type   ) 
Value:
class name : public AST {                       \
 public:                                \
 typedef boost::shared_ptr<name> Ptr;           \
 static Ptr create(type t) { return Ptr(new name(t)); }         \
 virtual ~name() {};                            \
 virtual const std::string format() const {             \
   std::stringstream ret;                       \
   ret << "<" << t_ << ">";                     \
   return ret.str();                            \
 }                                  \
 virtual AST::Ptr accept(ASTVisitor *v) { return v->visit(this); }  \
 virtual ID getID() const { return V_##name; }              \
  static Ptr convert(AST::Ptr a) {                  \
  return ((a->getID() == V_##name) ? boost::static_pointer_cast<name>(a) : Ptr()); \
  }                                 \
  const type &val() const { return t_; }                \
 private:                               \
 name(type t) : t_(t) {};                       \
 virtual bool isStrictEqual(const AST &rhs) const {         \
   const name &other(dynamic_cast<const name&>(rhs));           \
   return t_ == other.t_;                       \
 }                                  \
 const type t_;                             \
 };                                 \

Definition at line 87 of file DynAST.h.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1