CountDFSet.cpp

Go to the documentation of this file.
00001 
00015 #include "CountDFSet.hpp"
00016 #include <Utils/Util.hpp>
00017 
00018 namespace OA {
00019   namespace DataFlow {
00020 
00021 static bool debug = false;
00022 
00023 
00024 CountDFSet::CountDFSet() : mCount(0)
00025 { 
00026     OA_DEBUG_CTRL_MACRO("DEBUG_CountDFSet:ALL", debug);
00027 }
00028 
00029 CountDFSet::CountDFSet(int count) : mCount(count)
00030 { 
00031 }
00032 
00033 CountDFSet::CountDFSet(const CountDFSet &other) : mCount(other.mCount)
00034 { 
00035 }
00036 
00037 
00038 OA_ptr<DataFlowSet> CountDFSet::clone()
00039 { 
00040   OA_ptr<CountDFSet> retval;
00041   retval = new CountDFSet(*this); 
00042   return retval; 
00043 }
00044   
00045 // param for these can't be const because will have to 
00046 // dynamic cast to specific subclass
00047 bool CountDFSet::operator ==(DataFlowSet &other) const
00048 { 
00049     CountDFSet& recastOther 
00050         = dynamic_cast<CountDFSet&>(other);
00051     return mCount == recastOther.mCount; 
00052 }
00053 
00054 bool CountDFSet::operator !=(DataFlowSet &other) const
00055 { 
00056     CountDFSet& recastOther 
00057         = dynamic_cast<CountDFSet&>(other);
00058     return mCount != recastOther.mCount; 
00059 }
00060 
00061 
00062 void CountDFSet::dump(std::ostream &os)
00063 {
00064     os << "CountDFSet: mCount = " << mCount << std::endl;
00065 }
00066 
00067 
00068 void CountDFSet::dump(std::ostream &os, OA_ptr<IRHandlesIRInterface> ir)
00069 {
00070     os << "CountDFSet: mCount = " << mCount << std::endl;
00071 }
00072 
00073   } // end of DataFlow namespace
00074 } // end of OA namespace
00075