XlationCtxt.h

Go to the documentation of this file.
00001 // -*-Mode: C++;-*-
00002 // $Header: /Volumes/cvsrep/developer/OpenADFortTk/src/lib/support/XlationCtxt.h,v 1.2 2003/10/01 16:31:45 eraxxon Exp $
00003 
00004 // * BeginCopyright *********************************************************
00005 // *********************************************************** EndCopyright *
00006 
00007 //***************************************************************************
00008 //
00009 // File:
00010 //   $Source: /Volumes/cvsrep/developer/OpenADFortTk/src/lib/support/XlationCtxt.h,v $
00011 //
00012 // Purpose:
00013 //   Represents the context in which translation of WHIRL->XAIF occurs. 
00014 //
00015 // Description:
00016 //   [The set of functions, macros, etc. defined in the file]
00017 //
00018 //***************************************************************************
00019 
00020 #ifndef XlationCtxt_INCLUDED
00021 #define XlationCtxt_INCLUDED
00022 
00023 //************************** System Include Files ***************************
00024 
00025 #include <iostream>
00026 
00027 #include <inttypes.h>
00028 
00029 //************************** Open64 Include Files ***************************
00030 
00031 //*************************** User Include Files ****************************
00032 
00033 //************************** Forward Declarations ***************************
00034 
00035 //***************************************************************************
00036 
00037 //***************************************************************************
00038 // CtxtFlags
00039 //***************************************************************************
00040 
00041 // CtxtFlags: represents the current context
00042 class CtxtFlags {
00043 public: 
00044   CtxtFlags();
00045   virtual ~CtxtFlags();
00046 
00047   // -------------------------------------------------------
00048   // Flags for context
00049   // -------------------------------------------------------
00050 
00051   // Tests to see if *all* of the specified flags are set
00052   bool AreFlags(uint32_t f) const { return ((flags & f) == f); }
00053   
00054   // Tests to see if *any* of the specified flags are set
00055   bool IsAnyFlag(uint32_t f) const { return (flags & f); }
00056 
00057   void SetFlags(uint32_t f)       { flags = flags | f; }
00058   void ResetFlags(uint32_t f)     { flags = flags & ~f; }
00059   
00060   virtual void Dump(std::ostream& o = std::cerr) const;
00061   virtual void DDump() const;
00062   
00063 private:
00064   uint32_t flags;
00065   
00066 };
00067 
00068 //***************************************************************************
00069 
00070 #endif /* XlationCtxt_INCLUDED */

Generated on Fri Jul 24 04:29:08 2009 for OpenADFortTk (extended to Open64) by  doxygen 1.5.7.1