MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / _BlockInfo

Class _BlockInfo

rtpose_wrapper/scripts/cpp_lint.py:1755–1789  ·  view source on GitHub ↗

Stores information about a generic block of code.

Source from the content-addressed store, hash-verified

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

Callers 1

UpdateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected