Pretty Diagnostics
Create your own pretty diagnostics
Loading...
Searching...
No Matches
pretty_diagnostics::FileGroup Class Reference

Groups LineGroups belonging to the same Source More...

#include <report.hpp>

Public Types

using MappedLineGroups = std::map< size_t, LineGroup >
 

Public Member Functions

 FileGroup (const std::shared_ptr< Source > &source, MappedLineGroups line_groups)
 Constructs a group for a source file with its line groups. More...
 
const MappedLineGroupsline_groups () const
 Returns the map of line groups. More...
 
MappedLineGroupsline_groups ()
 Returns the map of line groups. More...
 
const std::shared_ptr< Source > & source () const
 Returns the source this file group refers to. More...
 

Detailed Description

Groups LineGroups belonging to the same Source

Member Typedef Documentation

◆ MappedLineGroups

Constructor & Destructor Documentation

◆ FileGroup()

pretty_diagnostics::FileGroup::FileGroup ( const std::shared_ptr< Source > &  source,
MappedLineGroups  line_groups 
)

Constructs a group for a source file with its line groups.

Parameters
sourceBacking source for the group
line_groupsMapping from line number to line groups

Member Function Documentation

◆ line_groups() [1/2]

MappedLineGroups & pretty_diagnostics::FileGroup::line_groups ( )
inline

Returns the map of line groups.

Returns
Reference to mapped line groups

◆ line_groups() [2/2]

const MappedLineGroups & pretty_diagnostics::FileGroup::line_groups ( ) const
inline

Returns the map of line groups.

Returns
Reference to mapped line groups

◆ source()

const std::shared_ptr< Source > & pretty_diagnostics::FileGroup::source ( ) const
inline

Returns the source this file group refers to.

Returns
Shared pointer to the backing source

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