webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Public Attributes | List of all members
webkitpy.style.checkers.cpp._IncludeState Class Reference
Inheritance diagram for webkitpy.style.checkers.cpp._IncludeState:

Public Member Functions

def __init__ (self)
 
def visited_primary_section (self)
 
def visited_soft_link_section (self)
 
def check_next_include_order (self, header_type, filename, file_is_header, primary_header_exists)
 

Public Attributes

 header_types
 

Detailed Description

Tracks line numbers for includes, and the order in which includes appear.

As a dict, an _IncludeState object serves as a mapping between include
filename and line number on which that file was included.

Call check_next_include_order() once for each header in the file, passing
in the type constants defined above. Calls in an illegal order will
raise an _IncludeError with an appropriate error message.

Constructor & Destructor Documentation

◆ __init__()

def webkitpy.style.checkers.cpp._IncludeState.__init__ (   self)

Member Function Documentation

◆ check_next_include_order()

def webkitpy.style.checkers.cpp._IncludeState.check_next_include_order (   self,
  header_type,
  filename,
  file_is_header,
  primary_header_exists 
)
Returns a non-empty error message if the next header is out of order.

This function also updates the internal state to be ready to check
the next include.

Args:
  header_type: One of the _XXX_HEADER constants defined above.
  filename: The name of the current file.
  file_is_header: Whether the file that owns this _IncludeState is itself a header
  primary_header_exists: Whether the primary header file actually exists on disk

Returns:
  The empty string if the header is in the right order, or an
  error message describing what's wrong.

◆ visited_primary_section()

def webkitpy.style.checkers.cpp._IncludeState.visited_primary_section (   self)

◆ visited_soft_link_section()

def webkitpy.style.checkers.cpp._IncludeState.visited_soft_link_section (   self)

Member Data Documentation

◆ header_types

webkitpy.style.checkers.cpp._IncludeState.header_types

The documentation for this class was generated from the following file: