00001 00014 #include "UnknownLoc.hpp" 00015 #include <OpenAnalysis/Location/LocationVisitor.hpp> 00016 00017 namespace OA { 00018 00019 static bool debug = false; 00020 00021 void UnknownLoc::acceptVisitor(LocationVisitor& pVisitor) 00022 { 00023 OA_DEBUG_CTRL_MACRO("DEBUG_UnknownLoc:ALL", debug); 00024 pVisitor.visitUnknownLoc(*this); 00025 } 00026 00027 OA_ptr<Location> UnknownLoc::getBaseLoc() 00028 { 00029 OA_ptr<Location> retval; 00030 retval = new UnknownLoc(); 00031 return retval; 00032 } 00033 00034 00040 bool UnknownLoc::operator<(Location& other) 00041 { 00042 if(getOrder() < other.getOrder()) { return true; } 00043 else if(getOrder() > other.getOrder()) { return false; } 00044 00045 // if execution gets here then we're comparing two instances of the same 00046 // class 00047 return false; 00048 } 00049 00050 00051 bool UnknownLoc::operator==(Location& other) 00052 { 00053 if(getOrder() != other.getOrder()) { return false; } 00054 00055 // if execution gets here then we're comparing two instances of the same 00056 // class 00057 if (other.isaUnknown()) { 00058 return true; 00059 } else { 00060 return false; 00061 } 00062 } 00063 00064 void UnknownLoc::output(IRHandlesIRInterface& pIR) 00065 { 00066 sOutBuild->objStart("UnknownLoc"); 00067 sOutBuild->objEnd("UnknownLoc"); 00068 } 00069 00070 00071 void UnknownLoc::dump(std::ostream& os) 00072 { 00073 os << "UnknownLoc" << std::endl; 00074 } 00075 00076 00077 void UnknownLoc::dump(std::ostream& os, OA_ptr<IRHandlesIRInterface> pIR) 00078 { 00079 dump(os); 00080 } 00081 00082 std::string UnknownLoc::toString(OA_ptr<IRHandlesIRInterface> pIR) 00083 { 00084 std::ostringstream oss; 00085 oss << "UnknownLoc"; 00086 return oss.str(); 00087 } 00088 00089 } // end namespace
1.6.1