ObjectPairRefineConsumer.cpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2004 CSIRO ICT Centre
00003  *
00004  * $Id: ObjectPairRefineConsumer.cpp 1809 2006-02-10 15:10:00Z rsc $
00005  */
00006 
00007 /* This is a simple point pair consumer that prints out the results of
00008  * a refine stage. */
00009 
00010 #include <iostream>
00011 #include "String.h"
00012 
00013 #include "Refine.h"
00014 #include "ObjectPairRefineConsumer.h"
00015 #include "ObjectPairWriter.h"
00016 
00017 
00018 ObjectPairRefineConsumer::ObjectPairRefineConsumer(String const & name,
00019                                                    Refine * refine)
00020     : ObjectPairConsumer(name),
00021       m_refine(refine)
00022 {}
00023 
00024 bool ObjectPairRefineConsumer::report(Object const * redObject,
00025                                       Object const * blueObject)
00026 {
00027   m_count++;
00028 
00029   return m_refine->refine(redObject, blueObject);
00030 }
00031 
00032 void ObjectPairRefineConsumer::finished()
00033 {
00034 #ifndef SILENT
00035   std::cout << getName() << ": processed " << m_count
00036             << " candidate pairs for further refinement." << std::endl;
00037 #endif
00038   m_refine->finished();
00039 }
00040 
Generated on Mon Oct 4 10:39:55 2010 for Matching.kdevelop by  doxygen 1.6.3