OpenADFortTk (basic)
src/lib/support/Symbol.h
Go to the documentation of this file.
00001 // -*-Mode: C++;-*-
00002 // $Header: /m_home/m_utkej/Argonne/cvs2svn/cvs/OpenADFortTk/src/lib/support/Symbol.h,v 1.1 2007-10-08 18:28:33 utke Exp $
00003 
00004 #ifndef Symbol_H 
00005 #define Symbol_H
00006 
00007 #include "Open64IRInterface/Open64BasicTypes.h"
00008 #include "WhirlIDMaps.h"
00009 
00010 namespace fortTkSupport { 
00011 
00012   class Symbol {
00013   public:
00014     Symbol();
00015     Symbol(const ST* st, WNId wnid, bool act);
00016     virtual ~Symbol();
00017   
00018     // -------------------------------------------------------
00019   
00020     // Return the WHIRL symbol
00021     ST* GetST() const { return st; }
00022     void SetST(const ST* x) { st = const_cast<ST*>(x); }
00023   
00024     // -------------------------------------------------------
00025   
00026     bool IsPathCollapsed() { return wnid != 0; }
00027 
00028     WNId GetPathVorlage() { return wnid; }
00029     void SetPathVorlage(WNId x) { wnid = x; }
00030   
00031     // -------------------------------------------------------
00032   
00033     // Is the symbol active in the AD sense
00034     bool IsActive() const { return active; }
00035     void SetActive(bool act) { active = act; }
00036   
00037     virtual void Dump(std::ostream& o = std::cerr) const;
00038     virtual void DDump() const;
00039 
00040   private:
00041     // These could make sense, but I just haven't implemented them yet
00042     Symbol(const Symbol& x) { }
00043     Symbol& operator=(const Symbol& x) { return *this; }
00044 
00045   private:
00046     ST* st;     // 
00047     WNId wnid;  // for a scalarized symbol
00048     bool active;
00049   };
00050 
00051 }
00052 
00053 #endif 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines