cprover
source_locationt Class Reference

#include <source_location.h>

+ Inheritance diagram for source_locationt:
+ Collaboration diagram for source_locationt:

Public Member Functions

 source_locationt ()
 
std::string as_string () const
 
std::string as_string_with_cwd () const
 
const irep_idtget_file () const
 
const irep_idtget_working_directory () const
 
const irep_idtget_line () const
 
const irep_idtget_column () const
 
const irep_idtget_function () const
 
const irep_idtget_property_id () const
 
const irep_idtget_property_class () const
 
const irep_idtget_comment () const
 
const irep_idtget_case_number () const
 
const irep_idtget_java_bytecode_index () const
 
const irep_idtget_basic_block_covered_lines () const
 
void set_file (const irep_idt &file)
 
void set_working_directory (const irep_idt &cwd)
 
void set_line (const irep_idt &line)
 
void set_line (unsigned line)
 
void set_column (const irep_idt &column)
 
void set_column (unsigned column)
 
void set_function (const irep_idt &function)
 
void set_property_id (const irep_idt &property_id)
 
void set_property_class (const irep_idt &property_class)
 
void set_comment (const irep_idt &comment)
 
void set_case_number (const irep_idt &number)
 
void set_java_bytecode_index (const irep_idt &index)
 
void set_basic_block_covered_lines (const irep_idt &covered_lines)
 
void set_hide ()
 
bool get_hide () const
 
bool is_built_in () const
 
void merge (const source_locationt &from)
 Set all unset source-location fields in this object to their values in 'from'. More...
 
optionalt< std::string > full_path () const
 Get a path to the file, including working directory. More...
 
- Public Member Functions inherited from irept
bool is_nil () const
 
bool is_not_nil () const
 
 irept (const irep_idt &_id)
 
 irept ()
 
 irept (const irept &irep)
 
 irept (irept &&irep)
 
ireptoperator= (const irept &irep)
 
ireptoperator= (irept &&irep)
 
 ~irept ()
 
const irep_idtid () const
 
const std::string & id_string () const
 
void id (const irep_idt &_data)
 
const ireptfind (const irep_namet &name) const
 
ireptadd (const irep_namet &name)
 
ireptadd (const irep_namet &name, const irept &irep)
 
const std::string & get_string (const irep_namet &name) const
 
const irep_idtget (const irep_namet &name) const
 
bool get_bool (const irep_namet &name) const
 
signed int get_int (const irep_namet &name) const
 
unsigned int get_unsigned_int (const irep_namet &name) const
 
std::size_t get_size_t (const irep_namet &name) const
 
long long get_long_long (const irep_namet &name) const
 
void set (const irep_namet &name, const irep_idt &value)
 
void set (const irep_namet &name, const irept &irep)
 
void set (const irep_namet &name, const long long value)
 
void remove (const irep_namet &name)
 
void move_to_sub (irept &irep)
 
void move_to_named_sub (const irep_namet &name, irept &irep)
 
bool operator== (const irept &other) const
 
bool operator!= (const irept &other) const
 
void swap (irept &irep)
 
bool operator< (const irept &other) const
 defines ordering on the internal representation More...
 
bool ordering (const irept &other) const
 defines ordering on the internal representation More...
 
int compare (const irept &i) const
 defines ordering on the internal representation More...
 
void clear ()
 
void make_nil ()
 
subtget_sub ()
 
const subtget_sub () const
 
named_subtget_named_sub ()
 
const named_subtget_named_sub () const
 
named_subtget_comments ()
 
const named_subtget_comments () const
 
std::size_t hash () const
 
std::size_t full_hash () const
 
bool full_eq (const irept &other) const
 
std::string pretty (unsigned indent=0, unsigned max_indent=0) const
 
const dtread () const
 
dtwrite ()
 

Static Public Member Functions

static bool is_built_in (const std::string &s)
 
static const source_locationtnil ()
 

Protected Member Functions

std::string as_string (bool print_cwd) const
 
- Protected Member Functions inherited from irept
void detach ()
 

Additional Inherited Members

- Public Types inherited from irept
typedef std::vector< ireptsubt
 
typedef std::map< irep_namet, ireptnamed_subt
 
- Static Protected Member Functions inherited from irept
static bool is_comment (const irep_namet &name)
 
static void remove_ref (dt *old_data)
 
static void nonrecursive_destructor (dt *old_data)
 Does the same as remove_ref, but using an explicit stack instead of recursion. More...
 
- Protected Attributes inherited from irept
dtdata
 
- Static Protected Attributes inherited from irept
static dt empty_d
 

Detailed Description

Definition at line 20 of file source_location.h.

Constructor & Destructor Documentation

◆ source_locationt()

source_locationt::source_locationt ( )
inline

Definition at line 23 of file source_location.h.

Member Function Documentation

◆ as_string() [1/2]

std::string source_locationt::as_string ( ) const
inline

Definition at line 27 of file source_location.h.

◆ as_string() [2/2]

std::string source_locationt::as_string ( bool  print_cwd) const
protected
parameters: print_cwd, print the absolute path to the file

Definition at line 16 of file source_location.cpp.

◆ as_string_with_cwd()

std::string source_locationt::as_string_with_cwd ( ) const
inline

Definition at line 32 of file source_location.h.

◆ full_path()

optionalt< std::string > source_locationt::full_path ( ) const

Get a path to the file, including working directory.

Returns
Full path unless the file name is empty or refers to a built-in, in which case {} is returned.

Definition at line 77 of file source_location.cpp.

◆ get_basic_block_covered_lines()

const irep_idt& source_locationt::get_basic_block_covered_lines ( ) const
inline

Definition at line 87 of file source_location.h.

◆ get_case_number()

const irep_idt& source_locationt::get_case_number ( ) const
inline

Definition at line 77 of file source_location.h.

◆ get_column()

const irep_idt& source_locationt::get_column ( ) const
inline

Definition at line 52 of file source_location.h.

◆ get_comment()

const irep_idt& source_locationt::get_comment ( ) const
inline

Definition at line 72 of file source_location.h.

◆ get_file()

const irep_idt& source_locationt::get_file ( ) const
inline

Definition at line 37 of file source_location.h.

◆ get_function()

const irep_idt& source_locationt::get_function ( ) const
inline

Definition at line 57 of file source_location.h.

◆ get_hide()

bool source_locationt::get_hide ( ) const
inline

Definition at line 163 of file source_location.h.

◆ get_java_bytecode_index()

const irep_idt& source_locationt::get_java_bytecode_index ( ) const
inline

Definition at line 82 of file source_location.h.

◆ get_line()

const irep_idt& source_locationt::get_line ( ) const
inline

Definition at line 47 of file source_location.h.

◆ get_property_class()

const irep_idt& source_locationt::get_property_class ( ) const
inline

Definition at line 67 of file source_location.h.

◆ get_property_id()

const irep_idt& source_locationt::get_property_id ( ) const
inline

Definition at line 62 of file source_location.h.

◆ get_working_directory()

const irep_idt& source_locationt::get_working_directory ( ) const
inline

Definition at line 42 of file source_location.h.

◆ is_built_in() [1/2]

static bool source_locationt::is_built_in ( const std::string &  s)
inlinestatic

Definition at line 168 of file source_location.h.

◆ is_built_in() [2/2]

bool source_locationt::is_built_in ( ) const
inline

Definition at line 175 of file source_location.h.

◆ merge()

void source_locationt::merge ( const source_locationt from)

Set all unset source-location fields in this object to their values in 'from'.

Leave set fields in this object alone.

Definition at line 65 of file source_location.cpp.

◆ nil()

static const source_locationt& source_locationt::nil ( )
inlinestatic

Definition at line 184 of file source_location.h.

◆ set_basic_block_covered_lines()

void source_locationt::set_basic_block_covered_lines ( const irep_idt covered_lines)
inline

Definition at line 153 of file source_location.h.

◆ set_case_number()

void source_locationt::set_case_number ( const irep_idt number)
inline

Definition at line 143 of file source_location.h.

◆ set_column() [1/2]

void source_locationt::set_column ( const irep_idt column)
inline

Definition at line 112 of file source_location.h.

◆ set_column() [2/2]

void source_locationt::set_column ( unsigned  column)
inline

Definition at line 117 of file source_location.h.

◆ set_comment()

void source_locationt::set_comment ( const irep_idt comment)
inline

Definition at line 137 of file source_location.h.

◆ set_file()

void source_locationt::set_file ( const irep_idt file)
inline

Definition at line 92 of file source_location.h.

◆ set_function()

void source_locationt::set_function ( const irep_idt function)
inline

Definition at line 122 of file source_location.h.

◆ set_hide()

void source_locationt::set_hide ( )
inline

Definition at line 158 of file source_location.h.

◆ set_java_bytecode_index()

void source_locationt::set_java_bytecode_index ( const irep_idt index)
inline

Definition at line 148 of file source_location.h.

◆ set_line() [1/2]

void source_locationt::set_line ( const irep_idt line)
inline

Definition at line 102 of file source_location.h.

◆ set_line() [2/2]

void source_locationt::set_line ( unsigned  line)
inline

Definition at line 107 of file source_location.h.

◆ set_property_class()

void source_locationt::set_property_class ( const irep_idt property_class)
inline

Definition at line 132 of file source_location.h.

◆ set_property_id()

void source_locationt::set_property_id ( const irep_idt property_id)
inline

Definition at line 127 of file source_location.h.

◆ set_working_directory()

void source_locationt::set_working_directory ( const irep_idt cwd)
inline

Definition at line 97 of file source_location.h.


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