libzypp 17.31.23
zypp::exception_detail::CodeLocation Struct Reference

Keep FILE, FUNCTION and LINE. More...

#include <base/Exception.h>

Public Member Functions

 CodeLocation ()
 Ctor.
 
 CodeLocation (const std::string &file_r, const std::string &func_r, unsigned line_r)
 Ctor.
 
std::string asString () const
 Location as string.
 

Private Attributes

std::string _file
 
std::string _func
 
unsigned _line
 

Friends

std::ostream & operator<< (std::ostream &str, const CodeLocation &obj)
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const CodeLocation &obj)
 Stream output.
 

Detailed Description

Keep FILE, FUNCTION and LINE.

Construct it using the ZYPP_EX_CODELOCATION macro.

Definition at line 34 of file Exception.h.

Constructor & Destructor Documentation

◆ CodeLocation() [1/2]

zypp::exception_detail::CodeLocation::CodeLocation ( )
inline

Ctor.

Definition at line 39 of file Exception.h.

◆ CodeLocation() [2/2]

zypp::exception_detail::CodeLocation::CodeLocation ( const std::string &  file_r,
const std::string &  func_r,
unsigned  line_r 
)
inline

Ctor.

Definition at line 44 of file Exception.h.

Member Function Documentation

◆ asString()

std::string zypp::exception_detail::CodeLocation::asString ( ) const

Location as string.

Definition at line 30 of file Exception.cc.

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream &  str,
const CodeLocation obj 
)
friend

Definition at line 38 of file Exception.cc.

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream &  str,
const CodeLocation obj 
)
related

Stream output.

Definition at line 38 of file Exception.cc.

Member Data Documentation

◆ _file

std::string zypp::exception_detail::CodeLocation::_file
private

Definition at line 54 of file Exception.h.

◆ _func

std::string zypp::exception_detail::CodeLocation::_func
private

Definition at line 55 of file Exception.h.

◆ _line

unsigned zypp::exception_detail::CodeLocation::_line
private

Definition at line 56 of file Exception.h.


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