MCPcopy Create free account
hub / github.com/BVLC/caffe / _BlockInfo

Class _BlockInfo

scripts/cpp_lint.py:1759–1793  ·  view source on GitHub ↗

Stores information about a generic block of code.

Source from the content-addressed store, hash-verified

1757
1758
1759class _BlockInfo(object):
1760 """Stores information about a generic block of code."""
1761
1762 def __init__(self, seen_open_brace):
1763 self.seen_open_brace = seen_open_brace
1764 self.open_parentheses = 0
1765 self.inline_asm = _NO_ASM
1766
1767 def CheckBegin(self, filename, clean_lines, linenum, error):
1768 """Run checks that applies to text up to the opening brace.
1769
1770 This is mostly for checking the text after the class identifier
1771 and the "{", usually where the base class is specified. For other
1772 blocks, there isn't much to check, so we always pass.
1773
1774 Args:
1775 filename: The name of the current file.
1776 clean_lines: A CleansedLines instance containing the file.
1777 linenum: The number of the line to check.
1778 error: The function to call with any errors found.
1779 """
1780 pass
1781
1782 def CheckEnd(self, filename, clean_lines, linenum, error):
1783 """Run checks that applies to text after the closing brace.
1784
1785 This is mostly used for checking end of namespace comments.
1786
1787 Args:
1788 filename: The name of the current file.
1789 clean_lines: A CleansedLines instance containing the file.
1790 linenum: The number of the line to check.
1791 error: The function to call with any errors found.
1792 """
1793 pass
1794
1795
1796class _ClassInfo(_BlockInfo):

Callers 1

UpdateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected