|
BOSS 8.0.0
BESIII Offline Software System
|
Source context for Issue. More...
#include <Context.h>
Public Member Functions | |
| Context (const std::string &filename, int line_number, const std::string &function_name, const std::string &compiler_name, const std::string &compiler_version, const std::string &compilation_time, const std::string &compilation_date, const std::string &package) | |
| const std::string & | file () const throw () |
| int | line () const throw () |
| const std::string & | function () const throw () |
| const std::string & | position () const |
| const std::string & | compiler () const |
| const std::string & | compilation () const |
| const std::string & | package_name () const throw () |
| int | stack_frames () const throw () |
| const std::string & | stack_frame (int i) const |
| std::vector< std::string > | qualifiers () const throw () |
| Context (const std::string &filename, int line_number, const std::string &function_name, const std::string &compiler_name, const std::string &compiler_version, const std::string &compilation_time, const std::string &compilation_date, const std::string &package) | |
| const std::string & | file () const throw () |
| int | line () const throw () |
| const std::string & | function () const throw () |
| const std::string & | position () const |
| const std::string & | compiler () const |
| const std::string & | compilation () const |
| const std::string & | package_name () const throw () |
| int | stack_frames () const throw () |
| const std::string & | stack_frame (int i) const |
| std::vector< std::string > | qualifiers () const throw () |
| Context (const std::string &filename, int line_number, const std::string &function_name, const std::string &compiler_name, const std::string &compiler_version, const std::string &compilation_time, const std::string &compilation_date, const std::string &package) | |
| const std::string & | file () const throw () |
| int | line () const throw () |
| const std::string & | function () const throw () |
| const std::string & | position () const |
| const std::string & | compiler () const |
| const std::string & | compilation () const |
| const std::string & | package_name () const throw () |
| int | stack_frames () const throw () |
| const std::string & | stack_frame (int i) const |
| std::vector< std::string > | qualifiers () const throw () |
Static Public Member Functions | |
| static const Context * | empty () |
| static std::string & | host_type () |
| type of target host | |
| static int | debug_level () |
| static void | add_qualifier (const std::string &qualif) |
| static const Context * | empty () |
| static std::string & | host_type () |
| type of target host | |
| static int | debug_level () |
| static void | add_qualifier (const std::string &qualif) |
| static const Context * | empty () |
| static std::string & | host_type () |
| type of target host | |
| static int | debug_level () |
| static void | add_qualifier (const std::string &qualif) |
Static Protected Member Functions | |
| static void | build_host_type () |
| static void | build_host_type () |
| static void | build_host_type () |
Protected Attributes | |
| std::string | m_file_name |
| int | m_line_number |
| std::string | m_function_name |
| std::string | m_compiler_name |
| std::string | m_compiler_version |
| std::string | m_compilation_date |
| std::string | m_compilation_time |
| std::string | m_package_name |
| std::string | m_compiler |
| std::string | m_position |
| std::string | m_compilation |
| std::vector< std::string > | m_stack_frames |
Static Protected Attributes | |
| static Context * | empty_instance = 0 |
| static std::string | s_host_type |
| static std::vector< std::string > | default_qualifiers |
Source context for Issue.
This class encapsulates Context information for an issue. The context of an issue is the location in the code the issue was constructed. The context acts as an encapsulator for compilator generted information like:
The current context can be obtained using the macro ERS_HERE An empty context can be obtained using the macro ERS_EMPTY
Definition at line 41 of file Event/ers/include/ers/Context.h.
| ers::Context::Context | ( | const std::string & | filename, |
| int | line_number, | ||
| const std::string & | function_name, | ||
| const std::string & | compiler_name, | ||
| const std::string & | compiler_version, | ||
| const std::string & | compilation_time, | ||
| const std::string & | compilation_date, | ||
| const std::string & | package_name ) |
Constructor - defines an Issue context. This constructor should generally not be called directly, instead use the macro ERS_HERE.
| filename | name of the source code file |
| line_number | line_number in the source code |
| function_name | name of the function - either pretty printed or not |
| compiler_name | name of the compiler |
| compiler_version | version of the compiler |
| compilation_time | time of the compilation |
| compilation_date | date of the compilation |
Definition at line 73 of file Context.cxx.
Referenced by empty().
| ers::Context::Context | ( | const std::string & | filename, |
| int | line_number, | ||
| const std::string & | function_name, | ||
| const std::string & | compiler_name, | ||
| const std::string & | compiler_version, | ||
| const std::string & | compilation_time, | ||
| const std::string & | compilation_date, | ||
| const std::string & | package ) |
| ers::Context::Context | ( | const std::string & | filename, |
| int | line_number, | ||
| const std::string & | function_name, | ||
| const std::string & | compiler_name, | ||
| const std::string & | compiler_version, | ||
| const std::string & | compilation_time, | ||
| const std::string & | compilation_date, | ||
| const std::string & | package ) |
|
static |
Definition at line 58 of file Context.cxx.
Referenced by main().
|
static |
|
static |
|
staticprotected |
stack frames
Definition at line 184 of file Context.cxx.
Referenced by host_type().
|
staticprotected |
stack frames
|
staticprotected |
stack frames
| const std::string & ers::Context::compilation | ( | ) | const |
Pretty printed compilation time description
Definition at line 164 of file Context.cxx.
Referenced by compilation().
| const std::string & ers::Context::compilation | ( | ) | const |
| const std::string & ers::Context::compilation | ( | ) | const |
| const std::string & ers::Context::compiler | ( | ) | const |
Pretty printed compiler name
Definition at line 146 of file Context.cxx.
Referenced by compiler().
| const std::string & ers::Context::compiler | ( | ) | const |
| const std::string & ers::Context::compiler | ( | ) | const |
|
static |
Gives the current debug level
Definition at line 50 of file Context.cxx.
Referenced by ers::Issue::insert().
|
static |
|
static |
|
static |
Returns the empty instance
Definition at line 27 of file Context.cxx.
Referenced by empty().
|
static |
|
static |
| const std::string & ers::Context::file | ( | ) | const | |||
| throw | ( | ) | ||||
The source code file name
Definition at line 102 of file Context.cxx.
| const std::string & ers::Context::file | ( | ) | const | |||
| throw | ( | ) | ||||
| const std::string & ers::Context::file | ( | ) | const | |||
| throw | ( | ) | ||||
| const std::string & ers::Context::function | ( | ) | const | |||
| throw | ( | ) | ||||
Name of the function containing the context
Definition at line 114 of file Context.cxx.
Referenced by function(), and ers::NotImplemented::NotImplemented().
| const std::string & ers::Context::function | ( | ) | const | |||
| throw | ( | ) | ||||
| const std::string & ers::Context::function | ( | ) | const | |||
| throw | ( | ) | ||||
|
static |
type of target host
Tries to gues the host name
Definition at line 41 of file Context.cxx.
|
static |
type of target host
|
static |
type of target host
| int ers::Context::line | ( | ) | const | |||
| throw | ( | ) | ||||
The line number in the source code
Definition at line 108 of file Context.cxx.
Referenced by line().
| int ers::Context::line | ( | ) | const | |||
| throw | ( | ) | ||||
| int ers::Context::line | ( | ) | const | |||
| throw | ( | ) | ||||
| const std::string & ers::Context::package_name | ( | ) | const | |||
| throw | ( | ) | ||||
Definition at line 180 of file Context.cxx.
Referenced by Context(), and package_name().
| const std::string & ers::Context::package_name | ( | ) | const | |||
| throw | ( | ) | ||||
| const std::string & ers::Context::package_name | ( | ) | const | |||
| throw | ( | ) | ||||
| const std::string & ers::Context::position | ( | ) | const |
Pretty printed code position format: file_name:line_number (function_name)
Definition at line 124 of file Context.cxx.
Referenced by position().
| const std::string & ers::Context::position | ( | ) | const |
| const std::string & ers::Context::position | ( | ) | const |
| std::vector< std::string > ers::Context::qualifiers | ( | ) | const | |||
| throw | ( | ) | ||||
Returns the set of qualifiers associated with context At the moment, this includes the default qualifiers plus the package
Definition at line 228 of file Context.cxx.
Referenced by qualifiers().
| std::vector< std::string > ers::Context::qualifiers | ( | ) | const | |||
| throw | ( | ) | ||||
| std::vector< std::string > ers::Context::qualifiers | ( | ) | const | |||
| throw | ( | ) | ||||
| const std::string & ers::Context::stack_frame | ( | int | i | ) | const |
Definition at line 219 of file Context.cxx.
Referenced by stack_frame().
| const std::string & ers::Context::stack_frame | ( | int | i | ) | const |
| const std::string & ers::Context::stack_frame | ( | int | i | ) | const |
| int ers::Context::stack_frames | ( | ) | const | |||
| throw | ( | ) | ||||
Definition at line 215 of file Context.cxx.
Referenced by stack_frames().
| int ers::Context::stack_frames | ( | ) | const | |||
| throw | ( | ) | ||||
| int ers::Context::stack_frames | ( | ) | const | |||
| throw | ( | ) | ||||
|
staticprotected |
vector of default qualifiers
Definition at line 45 of file Event/ers/include/ers/Context.h.
Referenced by add_qualifier(), and qualifiers().
|
staticprotected |
Definition at line 43 of file Event/ers/include/ers/Context.h.
Referenced by empty().
|
mutableprotected |
compilation (cache)
Definition at line 56 of file Event/ers/include/ers/Context.h.
Referenced by compilation().
|
protected |
compilation date
Definition at line 51 of file Event/ers/include/ers/Context.h.
Referenced by compilation(), and Context().
|
protected |
compilation time
Definition at line 52 of file Event/ers/include/ers/Context.h.
Referenced by compilation(), and Context().
|
mutableprotected |
compilation string (cache)
Definition at line 54 of file Event/ers/include/ers/Context.h.
Referenced by compiler().
|
protected |
compiler name
Definition at line 49 of file Event/ers/include/ers/Context.h.
Referenced by compiler(), and Context().
|
protected |
compiler version
Definition at line 50 of file Event/ers/include/ers/Context.h.
Referenced by compiler(), and Context().
|
protected |
source file-name
Definition at line 46 of file Event/ers/include/ers/Context.h.
Referenced by Context(), file(), and position().
|
protected |
source function name (can be pretty printed or not)
Definition at line 48 of file Event/ers/include/ers/Context.h.
Referenced by Context(), function(), and position().
|
protected |
source line-number
Definition at line 47 of file Event/ers/include/ers/Context.h.
Referenced by Context(), line(), and position().
|
protected |
Definition at line 53 of file Event/ers/include/ers/Context.h.
Referenced by Context(), package_name(), position(), and qualifiers().
|
mutableprotected |
code position (cache)
Definition at line 55 of file Event/ers/include/ers/Context.h.
Referenced by position().
|
protected |
Definition at line 57 of file Event/ers/include/ers/Context.h.
Referenced by Context(), stack_frame(), and stack_frames().
|
staticprotected |
host_type
Definition at line 44 of file Event/ers/include/ers/Context.h.
Referenced by build_host_type(), and host_type().