exphelp.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2003, Mike Van Emmerik
00003  *
00004  * See the file "LICENSE.TERMS" for information on usage and
00005  * redistribution of this file, and for a DISCLAIMER OF ALL
00006  * WARRANTIES.
00007  *
00008  */
00009 
00010 /*==============================================================================
00011  * FILE:       exphelp.h
00012  * OVERVIEW:   Element comparison functions for expressions and statements
00013  *============================================================================*/
00014 
00015 /*
00016  * $Revision: 1.6 $
00017  *
00018  * 01 Jul 05 - Mike: added header
00019  */
00020 
00021 #ifndef __EXPHELP_H__
00022 #define __EXPHELP_H__
00023 
00024 #include    <map>
00025 
00026 class Exp;
00027 class Assign;
00028 class Assignment;
00029 
00030 /*
00031  * A class for comparing Exp*s (comparing the actual expressions)
00032  * Type sensitive
00033  */
00034 class lessExpStar : public std::binary_function<Exp*, Exp*, bool> {
00035 public:
00036     bool operator()(const Exp* x, const Exp* y) const;
00037 };
00038 
00039 
00040 /*
00041  * A class for comparing Exp*s (comparing the actual expressions)
00042  * Type insensitive
00043  */
00044 class lessTI : public std::binary_function<Exp*, Exp*, bool> {
00045 public:
00046     bool operator()(const Exp* x, const Exp* y) const;
00047 };
00048 
00049 // Compare assignments by their left hand sides (only). Implemented in statement.cpp
00050 class lessAssignment : public std::binary_function<Assignment*, Assignment*, bool> {
00051 public:
00052     bool operator()(const Assignment* x, const Assignment* y) const;
00053 };
00054 
00055 // Repeat the above for Assigns; sometimes the #include ordering is such that the compiler doesn't know that an Assign
00056 // is a subclass of Assignment
00057 class lessAssign : public std::binary_function<Assign*, Assign*, bool> {
00058 public:
00059     bool operator()(const Assign* x, const Assign* y) const;
00060 };
00061 
00062 #endif      // __EXPHELP_H__

Generated on Tue Sep 19 21:18:23 2006 for Boomerang by  doxygen 1.4.6