| 514 | self.Warning("No PrintSelf method") |
| 515 | |
| 516 | def CheckWindowsMangling(self): |
| 517 | lines = [] |
| 518 | regx1 = WindowsMangleRegEx |
| 519 | regx2 = re.compile("^.*VTK_LEGACY.*$") |
| 520 | # This version will leave out comment lines but we probably do |
| 521 | # not want to refer to mangled (hopefully deprecated) methods |
| 522 | # in comments. |
| 523 | # regx2 = re.compile("^(\\s*//|\\s*\\*|.*VTK_LEGACY).*$") |
| 524 | cc = 1 |
| 525 | for a in self.FileLines: |
| 526 | line = a.strip() |
| 527 | rm = regx1.match(line) |
| 528 | if rm: |
| 529 | arg = rm.group(1).strip() |
| 530 | if arg and not regx2.match(line): |
| 531 | lines.append(" %4d: %s" % (cc, line)) |
| 532 | cc = cc + 1 |
| 533 | if len(lines) > 0: |
| 534 | self.Print( "File: %s has windows.h mangling violations:" % self.FileName ) |
| 535 | for a in lines: |
| 536 | self.Print(a) |
| 537 | self.Error("Windows Mangling Violation - choose another name that does not conflict.") |
| 538 | |
| 539 | ## |
| 540 | parser = cli.ArgumentParser() |