GCC Middle and Back End API Reference
diagnostics::column_policy Class Reference

#include <context.h>

Collaboration diagram for diagnostics::column_policy:

Public Member Functions

 column_policy (const context &dc)
int converted_column (expanded_location s) const
label_text get_location_text (const expanded_location &s, bool show_column, bool colorize) const
int get_tabstop () const

Private Attributes

file_cachem_file_cache
column_options m_column_options

Detailed Description

A bundle of state for determining column numbers in diagnostics
(tab stops, whether to start at 0 or 1, etc).
Uses a file_cache to handle tabs.   

Constructor & Destructor Documentation

◆ column_policy()

diagnostics::column_policy::column_policy ( const context & dc)

References m_column_options, and m_file_cache.

Member Function Documentation

◆ converted_column()

int diagnostics::column_policy::converted_column ( expanded_location s) const
Given an expanded_location, convert the column (which is in 1-based bytes)
to the requested units and origin.  Return -1 if the column is
invalid (<= 0).   

References m_column_options, and m_file_cache.

Referenced by get_location_text(), and diagnostics::html_builder::make_element_for_diagnostic().

◆ get_location_text()

label_text diagnostics::column_policy::get_location_text ( const expanded_location & s,
bool show_column,
bool colorize ) const

◆ get_tabstop()

int diagnostics::column_policy::get_tabstop ( ) const
inline

References m_column_options.

Field Documentation

◆ m_column_options

column_options diagnostics::column_policy::m_column_options
private

◆ m_file_cache

file_cache& diagnostics::column_policy::m_file_cache
private

Referenced by column_policy(), and converted_column().


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