00001 /* $Id: CbcCompare.hpp 1286 2009-11-09 23:33:07Z EdwinStraver $ */ 00002 // Copyright (C) 2002, International Business Machines 00003 // Corporation and others. All Rights Reserved. 00004 #ifndef CbcCompare_H 00005 #define CbcCompare_H 00006 00007 class CbcCompareBase; 00008 00009 class CbcCompare { 00010 public: 00011 CbcCompareBase * test_; 00012 // Default Constructor 00013 CbcCompare () { 00014 test_ = NULL; 00015 } 00016 00017 virtual ~CbcCompare() {} 00018 00019 bool operator() (CbcNode * x, CbcNode * y) { 00020 return test_->test(x, y); 00021 } 00022 bool compareNodes (CbcNode * x, CbcNode * y) { 00023 return test_->test(x, y); 00024 } 00026 inline bool alternateTest (CbcNode * x, CbcNode * y) { 00027 return test_->alternateTest(x, y); 00028 } 00029 00031 inline CbcCompareBase * comparisonObject() const { 00032 return test_; 00033 } 00034 }; 00035 00036 #endif 00037