Class Location::Location

A location of a C/C++ artifact.

Direct supertypes

Known direct subtypes

Predicates

charLoc

Holds if this location corresponds to file f and character “offsets” start..end. Note that these are not real character offsets, because we use maxCols to find the length of the longest line and then pretend that all the lines are the same length. However, these offsets are convenient for comparing or sorting locations in a file. For an example, see subsumes.

fullLocationInfo

Holds if this element is in the specified container. The location spans column startcolumn of line startline to column endcolumn of line endline.

getContainer

Gets the container corresponding to this location.

getEndColumn

Gets the end column of this location.

getEndLine

Gets the end line of this location.

getFile

Gets the file corresponding to this location, if any.

getStartColumn

Gets the start column of this location.

getStartLine

Gets the start line of this location.

hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

isBefore

Holds if this comes on a line strictly before l.

subsumes

Holds if location l is completely contained within this one.

toString

Gets a textual representation of this element.