libyui  3.0.5
 All Classes Functions Variables Enumerations Friends
YCodeLocation Class Reference

#include <YUIException.h>

Public Member Functions

 YCodeLocation (const std::string &file_r, const std::string &func_r, int line_r)
 
 YCodeLocation ()
 
std::string file () const
 
std::string func () const
 
int line () const
 
std::string asString () const
 

Friends

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

Detailed Description

Helper class for UI exceptions: Store FILE, FUNCTION and LINE. Construct this using the YUI_EXCEPTION_CODE_LOCATION macro.

Definition at line 213 of file YUIException.h.

Constructor & Destructor Documentation

YCodeLocation::YCodeLocation ( const std::string &  file_r,
const std::string &  func_r,
int  line_r 
)
inline

Constructor. Commonly called using the YUI_EXCEPTION_CODE_LOCATION macro.

Definition at line 220 of file YUIException.h.

YCodeLocation::YCodeLocation ( )
inline

Default constructor.

Definition at line 231 of file YUIException.h.

Member Function Documentation

std::string YCodeLocation::asString ( ) const

Returns the location in normalized string format.

Definition at line 41 of file YUIException.cc.

std::string YCodeLocation::file ( ) const
inline

Returns the source file name where the exception occured.

Definition at line 238 of file YUIException.h.

std::string YCodeLocation::func ( ) const
inline

Returns the name of the function where the exception occured.

Definition at line 243 of file YUIException.h.

int YCodeLocation::line ( ) const
inline

Returns the source line number where the exception occured.

Definition at line 248 of file YUIException.h.

Friends And Related Function Documentation

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

Stream output

YCodeLocation stream output

Definition at line 56 of file YUIException.cc.


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