]> git.saurik.com Git - wxWidgets.git/blob - utils/ifacecheck/src/ifacecheck.cpp
use wxSUPPRESS_DOLOG_HIDE_WARNING to suppress warnings about hiding base class DoLog...
[wxWidgets.git] / utils / ifacecheck / src / ifacecheck.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: ifacecheck.cpp
3 // Purpose: Interface headers <=> real headers coherence checker
4 // Author: Francesco Montorsi
5 // Created: 2008/03/17
6 // RCS-ID: $Id$
7 // Copyright: (c) 2008 Francesco Montorsi
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // For compilers that support precompilation, includes "wx/wx.h".
12 #include "wx/wxprec.h"
13
14 #ifdef __BORLANDC__
15 #pragma hdrstop
16 #endif
17
18 // for all others, include the necessary headers
19 #ifndef WX_PRECOMP
20 #include "wx/app.h"
21 #include "wx/crt.h"
22 #endif
23
24 #include "wx/cmdline.h"
25 #include "wx/textfile.h"
26 #include "wx/filename.h"
27 #include "wx/stopwatch.h" // for wxGetLocalTime
28 #include "xmlparser.h"
29
30 // global verbosity flag
31 bool g_verbose = false;
32
33
34
35 // ----------------------------------------------------------------------------
36 // IfaceCheckApp
37 // ----------------------------------------------------------------------------
38
39 #define API_DUMP_FILE "dump.api.txt"
40 #define INTERFACE_DUMP_FILE "dump.interface.txt"
41
42 #define PROCESS_ONLY_OPTION "p"
43 #define USE_PREPROCESSOR_OPTION "u"
44
45 #define MODIFY_SWITCH "m"
46 #define DUMP_SWITCH "d"
47 #define HELP_SWITCH "h"
48 #define VERBOSE_SWITCH "v"
49
50 static const wxCmdLineEntryDesc g_cmdLineDesc[] =
51 {
52 { wxCMD_LINE_OPTION, USE_PREPROCESSOR_OPTION, "use-preproc",
53 "uses the preprocessor output to increase the checker accuracy",
54 wxCMD_LINE_VAL_STRING, wxCMD_LINE_NEEDS_SEPARATOR },
55 { wxCMD_LINE_OPTION, PROCESS_ONLY_OPTION, "process-only",
56 "processes only header files matching the given wildcard",
57 wxCMD_LINE_VAL_STRING, wxCMD_LINE_NEEDS_SEPARATOR },
58 { wxCMD_LINE_SWITCH, MODIFY_SWITCH, "modify",
59 "modify the interface headers to match the real ones" },
60 { wxCMD_LINE_SWITCH, DUMP_SWITCH, "dump",
61 "dump both interface and API to plain text dump.*.txt files" },
62 { wxCMD_LINE_SWITCH, HELP_SWITCH, "help",
63 "show help message", wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
64 { wxCMD_LINE_SWITCH, VERBOSE_SWITCH, "verbose",
65 "be verbose" },
66 { wxCMD_LINE_PARAM, NULL, NULL,
67 "gccXML", wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY },
68 { wxCMD_LINE_PARAM, NULL, NULL,
69 "doxygenXML", wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY },
70 wxCMD_LINE_DESC_END
71 };
72
73 class IfaceCheckLog : public wxLog
74 {
75 public:
76 IfaceCheckLog() {}
77
78 void DoLog(wxLogLevel, const wxString& msg, time_t)
79 {
80 // send all messages to stdout (normal behaviour is to sent them to stderr)
81 wxPrintf(msg);
82 wxPrintf("\n");
83 Flush();
84 }
85
86 wxSUPPRESS_DOLOG_HIDE_WARNING()
87 };
88
89 class IfaceCheckApp : public wxAppConsole
90 {
91 public:
92 // don't use builtin cmd line parsing:
93 virtual bool OnInit() { m_modify=false; return true; }
94 virtual int OnRun();
95
96 bool ParsePreprocessorOutput(const wxString& filename);
97
98 bool Compare();
99 int CompareClasses(const wxClass* iface, const wxClass* api);
100 bool FixMethod(const wxString& header, const wxMethod* iface, const wxMethod* api);
101 bool StringContainsMethodName(const wxString& str, const wxMethod* m);
102
103 void PrintStatistics(long secs);
104
105 bool IsToProcess(const wxString& headername) const
106 {
107 if (m_strToMatch.IsEmpty())
108 return true;
109 return wxMatchWild(m_strToMatch, headername, false);
110 }
111
112 protected:
113 wxXmlGccInterface m_gccInterface; // "real" headers API
114 wxXmlDoxygenInterface m_doxyInterface; // doxygen-commented headers API
115
116 // was the MODIFY_SWITCH passed?
117 bool m_modify;
118
119 // if non-empty, then PROCESS_ONLY_OPTION was passed and this is the
120 // wildcard expression to match
121 wxString m_strToMatch;
122 };
123
124 IMPLEMENT_APP_CONSOLE(IfaceCheckApp)
125
126 int IfaceCheckApp::OnRun()
127 {
128 long startTime = wxGetLocalTime(); // for timing purpose
129
130 wxCmdLineParser parser(g_cmdLineDesc, argc, argv);
131 parser.SetLogo(
132 wxString::Format("wxWidgets Interface checker utility (built %s against %s)",
133 __DATE__, wxVERSION_STRING));
134
135 // make the output more readable:
136 wxLog::SetActiveTarget(new IfaceCheckLog);
137 wxLog::DisableTimestamp();
138
139 // parse the command line...
140 bool ok = true;
141 wxString preprocFile;
142 switch (parser.Parse())
143 {
144 case 0:
145 if (parser.Found(VERBOSE_SWITCH))
146 g_verbose = true;
147
148 // IMPORTANT: parsing #define values must be done _before_ actually
149 // parsing the GCC/doxygen XML files
150 if (parser.Found(USE_PREPROCESSOR_OPTION, &preprocFile))
151 {
152 if (!ParsePreprocessorOutput(preprocFile))
153 return 1;
154 }
155
156 // in any case set basic std preprocessor #defines:
157 m_doxyInterface.AddPreprocessorValue("NULL", "0");
158
159 //g_bLogEnabled = false;
160
161 // parse the two XML files which contain the real and the doxygen interfaces
162 // for wxWidgets API:
163 if (!m_gccInterface.Parse(parser.GetParam(0)) ||
164 !m_doxyInterface.Parse(parser.GetParam(1)))
165 return 1;
166
167 // g_bLogEnabled = true;
168
169 if (parser.Found(DUMP_SWITCH))
170 {
171 wxLogMessage("Dumping real API to '%s'...", API_DUMP_FILE);
172 m_gccInterface.Dump(API_DUMP_FILE);
173
174 wxLogMessage("Dumping interface API to '%s'...", INTERFACE_DUMP_FILE);
175 m_doxyInterface.Dump(INTERFACE_DUMP_FILE);
176 }
177 else
178 {
179 if (parser.Found(MODIFY_SWITCH))
180 m_modify = true;
181
182 if (parser.Found(PROCESS_ONLY_OPTION, &m_strToMatch))
183 {
184 size_t len = m_strToMatch.Len();
185 if (m_strToMatch.StartsWith("\"") &&
186 m_strToMatch.EndsWith("\"") &&
187 len > 2)
188 m_strToMatch = m_strToMatch.Mid(1, len-2);
189 }
190
191
192 ok = Compare();
193 }
194
195 PrintStatistics(wxGetLocalTime() - startTime);
196 return ok ? 0 : 1;
197
198 default:
199 wxPrintf("\nThis utility checks that the interface XML files created by Doxygen are in\n");
200 wxPrintf("synch with the real headers (whose contents are extracted by the gcc XML file).\n\n");
201 wxPrintf("The 'gccXML' parameter should be the wxapi.xml file created by the 'rungccxml.sh'\n");
202 wxPrintf("script which resides in 'utils/ifacecheck'.\n");
203 wxPrintf("The 'doxygenXML' parameter should be the index.xml file created by Doxygen\n");
204 wxPrintf("for the wxWidgets 'interface' folder.\n\n");
205 wxPrintf("Since the gcc XML file does not contain info about #defines, if you use\n");
206 wxPrintf("the -%s option, you'll get a smaller number of false warnings.\n",
207 USE_PREPROCESSOR_OPTION);
208
209 // HELP_SWITCH was passed or a syntax error occurred
210 return 0;
211 }
212 }
213
214 bool IfaceCheckApp::Compare()
215 {
216 const wxClassArray& interfaces = m_doxyInterface.GetClasses();
217 const wxClass* c;
218 int mcount = 0, ccount = 0;
219
220 wxLogMessage("Comparing the interface API to the real API (%d classes to compare)...",
221 interfaces.GetCount());
222
223 if (!m_strToMatch.IsEmpty())
224 wxLogMessage("Processing only header files matching '%s' expression.", m_strToMatch);
225
226 for (unsigned int i=0; i<interfaces.GetCount(); i++)
227 {
228 // only compare the methods which are available for the port
229 // for which the gcc XML was produced
230 if (interfaces[i].GetAvailability() != wxPORT_UNKNOWN &&
231 (interfaces[i].GetAvailability() & m_gccInterface.GetInterfacePort()) == 0) {
232
233 if (g_verbose)
234 wxLogMessage("skipping class '%s' since it's not available for the %s port.",
235 interfaces[i].GetName(), m_gccInterface.GetInterfacePortName());
236
237 continue; // skip this method
238 }
239
240 // shorten the name of the header so the log file is more readable
241 // and also for calling IsToProcess() against it
242 wxString header = wxFileName(interfaces[i].GetHeader()).GetFullName();
243
244 if (!IsToProcess(header))
245 continue; // skip this one
246
247 wxString cname = interfaces[i].GetName();
248
249 // search in the real headers for i-th interface class; we search for
250 // both class cname and cnameBase since in wxWidgets world tipically
251 // class cname is platform-specific while the real public interface of
252 // that class is part of the cnameBase class.
253 /*c = m_gccInterface.FindClass(cname + "Base");
254 if (c) api.Add(c);*/
255
256 c = m_gccInterface.FindClass(cname);
257 if (!c)
258 {
259 // sometimes the platform-specific class is named "wxGeneric" + cname
260 // or similar:
261 c = m_gccInterface.FindClass("wxGeneric" + cname.Mid(2));
262 if (!c)
263 {
264 c = m_gccInterface.FindClass("wxGtk" + cname.Mid(2));
265 }
266 }
267
268 if (c) {
269
270 // there is a class with the same (logic) name!
271 mcount += CompareClasses(&interfaces[i], c);
272
273 } else {
274
275 wxLogMessage("%s: couldn't find the real interface for the '%s' class",
276 header, cname);
277 ccount++;
278 }
279 }
280
281 wxLogMessage("%d on a total of %d methods (%.1f%%) of the interface headers do not exist in the real headers",
282 mcount, m_doxyInterface.GetMethodCount(), (float)(100.0 * mcount/m_doxyInterface.GetMethodCount()));
283 wxLogMessage("%d on a total of %d classes (%.1f%%) of the interface headers do not exist in the real headers",
284 ccount, m_doxyInterface.GetClassesCount(), (float)(100.0 * ccount/m_doxyInterface.GetClassesCount()));
285
286 return true;
287 }
288
289 int IfaceCheckApp::CompareClasses(const wxClass* iface, const wxClass* api)
290 {
291 const wxMethod *real;
292 int count = 0;
293
294 wxASSERT(iface && api);
295
296 // shorten the name of the header so the log file is more readable
297 wxString header = wxFileName(iface->GetHeader()).GetFullName();
298
299 for (unsigned int i=0; i<iface->GetMethodCount(); i++)
300 {
301 const wxMethod& m = iface->GetMethod(i);
302
303 // only compare the methods which are available for the port
304 // for which the gcc XML was produced
305 if (m.GetAvailability() != wxPORT_UNKNOWN &&
306 (m.GetAvailability() & m_gccInterface.GetInterfacePort()) == 0) {
307
308 if (g_verbose)
309 wxLogMessage("skipping method '%s' since it's not available for the %s port.",
310 m.GetAsString(), m_gccInterface.GetInterfacePortName());
311
312 continue; // skip this method
313 }
314
315 // search in the methods of the api classes provided
316 real = api->RecursiveUpwardFindMethod(m, &m_gccInterface);
317
318 // avoid some false positives:
319 if (!real && m.ActsAsDefaultCtor())
320 {
321 // build an artificial default ctor for this class:
322 wxMethod temp(m);
323 temp.GetArgumentTypes().Clear();
324
325 // repeat search:
326 real = api->RecursiveUpwardFindMethod(temp, &m_gccInterface);
327 }
328
329 // no matches?
330 if (!real)
331 {
332 bool proceed = true;
333 wxMethodPtrArray overloads =
334 api->RecursiveUpwardFindMethodsNamed(m.GetName(), &m_gccInterface);
335
336 // avoid false positives:
337 for (unsigned int k=0; k<overloads.GetCount(); k++)
338 if (overloads[k]->MatchesExceptForAttributes(m) &&
339 m.IsDeprecated() && !overloads[k]->IsDeprecated())
340 {
341 // maybe the iface method is marked as deprecated but the
342 // real method is not?
343 wxMethod tmp(*overloads[k]);
344 tmp.SetDeprecated(true);
345
346 if (tmp == m)
347 {
348 // in this case, we can disregard this warning... the real
349 // method probably is included in WXWIN_COMPAT sections!
350 proceed = false; // skip this method
351 }
352 }
353
354 #define HACK_TO_AUTO_CORRECT_ONLY_METHOD_ATTRIBUTES 0
355 #if HACK_TO_AUTO_CORRECT_ONLY_METHOD_ATTRIBUTES
356 for (unsigned int k=0; k<overloads.GetCount(); k++)
357 if (overloads[k]->MatchesExceptForAttributes(m))
358 {
359 // fix default values of results[k]:
360 wxMethod tmp(*overloads[k]);
361 tmp.SetArgumentTypes(m.GetArgumentTypes());
362
363 // modify interface header
364 if (FixMethod(iface->GetHeader(), &m, &tmp))
365 wxLogMessage("Adjusted attributes of '%s' method", m.GetAsString());
366
367 proceed = false;
368 break;
369 }
370 #endif // HACK_TO_AUTO_CORRECT_ONLY_METHOD_ATTRIBUTES
371
372 if (proceed)
373 {
374 if (overloads.GetCount()==0)
375 {
376 wxLogMessage("%s: real '%s' class and their parents have no method '%s'",
377 header, api->GetName(), m.GetAsString());
378 // we've found no overloads
379 }
380 else
381 {
382 // first, output a warning
383 wxString warning = header;
384 if (overloads.GetCount()>1)
385 warning += wxString::Format(": in the real headers there are %d overloads of '%s' for "
386 "'%s' all with different signatures:\n",
387 overloads.GetCount(), m.GetName(), api->GetName());
388 else {
389 warning += wxString::Format(": in the real headers there is a method '%s' for '%s'"
390 " but has different signature:\n",
391 m.GetName(), api->GetName());
392 }
393
394 // get a list of the prototypes with _all_ possible attributes:
395 warning += "\tdoxy header: " + m.GetAsString(true, true, true, true);
396 for (unsigned int j=0; j<overloads.GetCount(); j++)
397 warning += "\n\treal header: " + overloads[j]->GetAsString(true, true, true, true);
398
399 wxLogWarning(warning);
400 count++;
401
402 if (overloads.GetCount()>1)
403 {
404 // TODO: decide which of these overloads is the most "similar" to m
405 // and eventually modify it
406 if (m_modify)
407 wxLogWarning("\tmanual fix is required");
408 }
409 else
410 {
411 wxASSERT(overloads.GetCount() == 1);
412
413 if (m_modify || m.IsCtor())
414 {
415 wxLogWarning("\tfixing it...");
416
417 // try to modify it!
418 FixMethod(iface->GetHeader(), &m, overloads[0]);
419 }
420 }
421 }
422
423 count++;
424 } // if (proceed)
425 }
426 }
427
428 return count;
429 }
430
431 bool IfaceCheckApp::StringContainsMethodName(const wxString& str, const wxMethod* m)
432 {
433 return str.Contains(m->GetName()) ||
434 (m->IsOperator() && str.Contains("operator"));
435 }
436
437 bool IfaceCheckApp::FixMethod(const wxString& header, const wxMethod* iface, const wxMethod* api)
438 {
439 unsigned int i,j;
440 wxASSERT(iface && api);
441
442 wxTextFile file;
443 if (!file.Open(header)) {
444 wxLogError("\tcan't open the '%s' header file.", header);
445 return false;
446 }
447
448 // GetLocation() returns the line where the last part of the prototype is placed;
449 // i.e. the line containing the semicolon at the end of the declaration.
450 int end = iface->GetLocation()-1;
451 if (end <= 0 || end >= (int)file.GetLineCount()) {
452 wxLogWarning("\tinvalid location info for method '%s': %d.",
453 iface->GetAsString(), iface->GetLocation());
454 return false;
455 }
456
457 if (!file.GetLine(end).Contains(";")) {
458 wxLogWarning("\tinvalid location info for method '%s': %d.",
459 iface->GetAsString(), iface->GetLocation());
460 return false;
461 }
462
463 // is this a one-line prototype declaration?
464 bool founddecl = false;
465 int start;
466 if (StringContainsMethodName(file.GetLine(end), iface))
467 {
468 // yes, this prototype is all on this line:
469 start = end;
470 founddecl = true;
471 }
472 else
473 {
474 start = end; // will be decremented inside the while{} loop below
475
476 // find the start point of this prototype declaration; i.e. the line
477 // containing the function name, which is also the line following
478 // the marker '*/' for the closure of the doxygen comment
479 do
480 {
481 start--; // go up one line
482
483 if (StringContainsMethodName(file.GetLine(start), iface))
484 founddecl = true;
485 }
486 while (start > 0 && !founddecl &&
487 !file.GetLine(start).Contains(";") &&
488 !file.GetLine(start).Contains("*/"));
489 }
490
491 if (start <= 0 || !founddecl)
492 {
493 wxLogError("\tcan't find the beginning of the declaration of '%s' method in '%s' header looking backwards from line %d; I arrived at %d and gave up",
494 iface->GetAsString(), header, end+1 /* zero-based => 1-based */, start);
495 return false;
496 }
497
498 // remove the old prototype
499 for (int k=start; k<=end; k++)
500 file.RemoveLine(start); // remove (end-start)-nth times the start-th line
501
502 #define INDENTATION_STR wxString(" ")
503
504 // if possible, add also the @deprecated tag in the doxygen comment if it's missing
505 int deprecationOffset = 0;
506 if (file.GetLine(start-1).Contains("*/") &&
507 (api->IsDeprecated() && !iface->IsDeprecated()))
508 {
509 file.RemoveLine(start-1);
510 file.InsertLine(INDENTATION_STR + INDENTATION_STR +
511 "@deprecated @todo provide deprecation description", start-1);
512 file.InsertLine(INDENTATION_STR + "*/", start++);
513
514 // we have added a new line in the final balance
515 deprecationOffset=1;
516 }
517
518 wxMethod tmp(*api);
519
520 // discard gcc XML argument names and replace them with those parsed from doxygen XML;
521 // in this way we should avoid introducing doxygen warnings about cases where the argument
522 // 'xx' of the prototype is called 'yy' in the function's docs.
523 const wxArgumentTypeArray& doxygenargs = iface->GetArgumentTypes();
524 const wxArgumentTypeArray& realargs = api->GetArgumentTypes();
525 if (realargs.GetCount() == doxygenargs.GetCount())
526 {
527 for (j=0; j<doxygenargs.GetCount(); j++)
528 if (doxygenargs[j]==realargs[j])
529 {
530 realargs[j].SetArgumentName(doxygenargs[j].GetArgumentName());
531
532 if (realargs[j].GetDefaultValue().IsNumber() &&
533 doxygenargs[j].GetDefaultValue().StartsWith("wx"))
534 realargs[j].SetDefaultValue(doxygenargs[j].GetDefaultValue());
535 }
536
537 tmp.SetArgumentTypes(realargs);
538 }
539
540 #define WRAP_COLUMN 80
541
542 wxArrayString toinsert;
543 toinsert.Add(INDENTATION_STR + tmp.GetAsString() + ";");
544
545 int nStartColumn = toinsert[0].Find('(');
546 wxASSERT(nStartColumn != wxNOT_FOUND);
547
548 // wrap lines too long at comma boundaries
549 for (i=0; i<toinsert.GetCount(); i++)
550 {
551 size_t len = toinsert[i].Len();
552 if (len > WRAP_COLUMN)
553 {
554 wxASSERT(i == toinsert.GetCount()-1);
555
556 // break this line
557 wxString tmpleft = toinsert[i].Left(WRAP_COLUMN);
558 int comma = tmpleft.Find(',', true /* from end */);
559 if (comma == wxNOT_FOUND)
560 break; // break out of the for cycle...
561
562 toinsert.Add(wxString(' ', nStartColumn+1) +
563 toinsert[i].Right(len-comma-2)); // exclude the comma and the space after it
564 toinsert[i] = tmpleft.Left(comma+1); // include the comma
565 }
566 }
567
568 // insert the new lines
569 for (i=0; i<toinsert.GetCount(); i++)
570 file.InsertLine(toinsert[i], start+i);
571
572 // now save the modification
573 if (!file.Write()) {
574 wxLogError("\tcan't save the '%s' header file.", header);
575 return false;
576 }
577
578 // how many lines did we add/remove in total?
579 int nOffset = toinsert.GetCount() + deprecationOffset - (end-start+1);
580 if (nOffset == 0)
581 return false;
582
583 if (g_verbose)
584 wxLogMessage("\tthe final row offset for following methods is %d lines.", nOffset);
585
586 // update the other method's locations for those methods which belong to the modified header
587 // and are placed _below_ the modified method
588 wxClassPtrArray cToUpdate = m_doxyInterface.FindClassesDefinedIn(header);
589 for (i=0; i < cToUpdate.GetCount(); i++)
590 {
591 for (j=0; j < cToUpdate[i]->GetMethodCount(); j++)
592 {
593 wxMethod& m = cToUpdate[i]->GetMethod(j);
594 if (m.GetLocation() > iface->GetLocation())
595 {
596 // update the location of this method
597 m.SetLocation(m.GetLocation()+nOffset);
598 }
599 }
600 }
601
602 return true;
603 }
604
605 bool IfaceCheckApp::ParsePreprocessorOutput(const wxString& filename)
606 {
607 wxTextFile tf;
608 if (!tf.Open(filename)) {
609 wxLogError("can't open the '%s' preprocessor output file.", filename);
610 return false;
611 }
612
613 size_t useful = 0;
614 for (unsigned int i=0; i < tf.GetLineCount(); i++)
615 {
616 const wxString& line = tf.GetLine(i);
617 wxString defnameval = line.Mid(8); // what follows the "#define " string
618
619 // the format of this line should be:
620 // #define DEFNAME DEFVALUE
621 if (!line.StartsWith("#define ")) {
622 wxLogError("unexpected content in '%s' at line %d.", filename, i+1);
623 return false;
624 }
625
626 if (defnameval.Contains(" "))
627 {
628 // get DEFNAME
629 wxString defname = defnameval.BeforeFirst(' ');
630 if (defname.Contains("("))
631 continue; // this is a macro, skip it!
632
633 // get DEFVAL
634 wxString defval = defnameval.AfterFirst(' ').Strip(wxString::both);
635 if (defval.StartsWith("(") && defval.EndsWith(")"))
636 defval = defval.Mid(1, defval.Len()-2);
637
638 // store this pair in the doxygen interface, where it can be useful
639 m_doxyInterface.AddPreprocessorValue(defname, defval);
640 useful++;
641 }
642 else
643 {
644 // it looks like the format of this line is:
645 // #define DEFNAME
646 // we are not interested to symbols #defined to nothing,
647 // so we just ignore this line.
648 }
649 }
650
651 wxLogMessage("Parsed %d preprocessor #defines from '%s' which will be used later...",
652 useful, filename);
653
654 return true;
655 }
656
657 void IfaceCheckApp::PrintStatistics(long secs)
658 {
659 // these stats, for what regards the gcc XML, are all referred to the wxWidgets
660 // classes only!
661
662 wxLogMessage("wx real headers contains declaration of %d classes (%d methods)",
663 m_gccInterface.GetClassesCount(), m_gccInterface.GetMethodCount());
664 wxLogMessage("wx interface headers contains declaration of %d classes (%d methods)",
665 m_doxyInterface.GetClassesCount(), m_doxyInterface.GetMethodCount());
666
667 // build a list of the undocumented wx classes
668 wxString list;
669 int undoc = 0;
670 const wxClassArray& arr = m_gccInterface.GetClasses();
671 for (unsigned int i=0; i<arr.GetCount(); i++) {
672 if (m_doxyInterface.FindClass(arr[i].GetName()) == NULL) {
673 list += arr[i].GetName() + ", ";
674 undoc++;
675 }
676 }
677
678 list.RemoveLast();
679 list.RemoveLast();
680
681 wxLogMessage("the list of the %d undocumented wx classes is: %s", undoc, list);
682 wxLogMessage("total processing took %d seconds.", secs);
683 }
684