Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DbiDemoData3.cxx File Reference

#include "TObject.h"
#include "DatabaseInterface/test/DbiDemoData3.h"
#include "MessageService/MsgService.h"
#include "DatabaseInterface/DbiResultSet.h"
#include "DatabaseInterface/DbiOutRowStream.h"
#include "DatabaseInterface/DbiValidityRec.h"
#include <cmath>
#include "DatabaseInterface/DbiResultPtr.tpl"
#include "DatabaseInterface/DbiWriter.tpl"

Go to the source code of this file.

Functions

 CVSID ("$Id: DbiDemoData3.cxx,v 1.24 2008/03/05 06:59:21 west Exp $\n \ CVSID_DBIRESULTPTR ")
template<class T>
void CompareValue (const T &thisValue, const T &thatValue, const char *name, bool printDiff, bool &matchedSofar)
template<class T>
void CompareValuewithTol (const T &thisValue, const T &thatValue, const char *name, bool printDiff, bool &matchedSofar, float tol)


Function Documentation

template<class T>
void CompareValue const T &  thisValue,
const T &  thatValue,
const char *  name,
bool  printDiff,
bool &  matchedSofar
[static]
 

Definition at line 115 of file DbiDemoData3.cxx.

References MSG.

Referenced by DbiDemoData3::Compare().

00119                                                     {
00120   
00121     if ( thisValue == thatValue ) return;
00122     if ( printDiff ) {
00123       if ( matchedSofar ) 
00124           MSG("Dbi",Msg::kInfo) << "Mismatch between DbiDemoData3 objects:-\n";
00125       MSG("Dbi",Msg::kInfo) << "   member " << name  << " this: " << thisValue << endl;
00126       MSG("Dbi",Msg::kInfo) << "   member " << name  << " that: " << thatValue << endl;
00127   
00128     }
00129     matchedSofar = false;
00130   }

template<class T>
void CompareValuewithTol const T &  thisValue,
const T &  thatValue,
const char *  name,
bool  printDiff,
bool &  matchedSofar,
float  tol
[static]
 

Definition at line 131 of file DbiDemoData3.cxx.

References MSG.

Referenced by DbiDemoData3::Compare().

00136                                            {
00137 
00138     float diff =  fabs(thisValue - thatValue)
00139                  /(fabs(thisValue) + fabs(thatValue));  
00140     if ( diff <= tol ) return;
00141     if ( printDiff ) {
00142       if ( matchedSofar ) 
00143         MSG("Dbi",Msg::kInfo) << "Mismatch between DbiDemoData3 objects:-\n" << setprecision(22);
00144       MSG("Dbi",Msg::kInfo) << "   member " << name  << " this: " << thisValue << endl;
00145       MSG("Dbi",Msg::kInfo) << "   member " << name  << " that: " << thatValue 
00146                           << " % difference: " << diff << endl;
00147     }
00148     matchedSofar = false;
00149   }

CVSID "$Id: DbiDemoData3 cxx,
v 1.24 2008/03/05 06:59:21 west Exp $\n\CVSID_DBIRESULTPTR" 
 


Generated on Mon Feb 15 11:07:56 2010 for loon by  doxygen 1.3.9.1