Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

int Impala::Util::PropertySet::Diff ( const PropertySet arg  )  const [inline]

Definition at line 191 of file PropertySet.h.

References GetIndexOfName(), GetName(), GetValue(), ILOG_DEBUG, ILOG_ERROR, and Size().

Referenced by Impala::Application::Repository::DoDiffScoreFile().

00192     {
00193         if (Size() != arg->Size())
00194         {
00195             ILOG_ERROR("Diff: Size differs: " << Size() << " vs " <<
00196                        arg->Size());
00197             return 1;
00198         }
00199         int nDiff = 0;
00200         for (int i=0 ; i<Size() ; i++)
00201         {
00202             String name = GetName(i);
00203             int argIndex = arg->GetIndexOfName(name);
00204             if (argIndex == arg->Size())
00205             {
00206                 ILOG_DEBUG("arg doesn't have " << name);
00207                 nDiff++;
00208                 continue;
00209             }
00210             String value = GetValue(i);
00211             String argValue = arg->GetValue(argIndex);
00212             if (value != argValue)
00213             {
00214                 ILOG_DEBUG("prop " << name << " differs " << value <<
00215                            " vs " << argValue);
00216                 nDiff++;
00217             }
00218         }
00219         if (nDiff > 0)
00220             ILOG_ERROR("Found " << nDiff << " differences");
00221         return nDiff;
00222     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:24:19 2011 for ImpalaSrc by  doxygen 1.5.1