MCPcopy Create free account
hub / github.com/SIPp/sipp / __init__

Method __init__

cpplint.py:1397–1419  ·  view source on GitHub ↗
(self, name, class_or_struct, clean_lines, linenum)

Source from the content-addressed store, hash-verified

1395 """Stores information about a class."""
1396
1397 def __init__(self, name, class_or_struct, clean_lines, linenum):
1398 _BlockInfo.__init__(self, False)
1399 self.name = name
1400 self.starting_linenum = linenum
1401 self.is_derived = False
1402 if class_or_struct == 'struct':
1403 self.access = 'public'
1404 else:
1405 self.access = 'private'
1406
1407 # Try to find the end of the class. This will be confused by things like:
1408 # class A {
1409 # } *x = { ...
1410 #
1411 # But it's still good enough for CheckSectionSpacing.
1412 self.last_line = 0
1413 depth = 0
1414 for i in range(linenum, clean_lines.NumLines()):
1415 line = clean_lines.elided[i]
1416 depth += line.count('{') - line.count('}')
1417 if not depth:
1418 self.last_line = i
1419 break
1420
1421 def CheckBegin(self, filename, clean_lines, linenum, error):
1422 # Look for a bare ':'

Callers

nothing calls this directly

Calls 2

NumLinesMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected