RStudio Launcher Plugin SDK  1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
Public Member Functions | List of all members
rstudio::launcher_plugins::ErrorLocation Class Reference

Class which represents the location of an error. More...

#include <Error.hpp>

Public Member Functions

 ErrorLocation ()
 Default constructor.
 
 ErrorLocation (const ErrorLocation &in_other)
 Copy constructor. More...
 
 ErrorLocation (ErrorLocation &&in_other) noexcept
 Move constructor. More...
 
 ErrorLocation (const char *in_function, const char *in_file, long in_line)
 Constructor. More...
 
ErrorLocationoperator= (const ErrorLocation &in_other)
 Assignment operator. More...
 
bool operator== (const ErrorLocation &in_location) const
 Equality comparison operator. More...
 
std::string asString () const
 Formats the error location as a string. More...
 
const std::string & getFile () const
 Gets the file where the error occurred. More...
 
const std::string & getFunction () const
 Gets the function where the error occurred. More...
 
long getLine () const
 Gets the line where the error occurred. More...
 
bool hasLocation () const
 Checks whether the location is set. More...
 

Detailed Description

Class which represents the location of an error.

Constructor & Destructor Documentation

◆ ErrorLocation() [1/3]

rstudio::launcher_plugins::ErrorLocation::ErrorLocation ( const ErrorLocation in_other)

Copy constructor.

Parameters
in_otherThe error location to move to this.

◆ ErrorLocation() [2/3]

rstudio::launcher_plugins::ErrorLocation::ErrorLocation ( ErrorLocation &&  in_other)
noexcept

Move constructor.

Parameters
in_otherThe error location to move to this.

◆ ErrorLocation() [3/3]

rstudio::launcher_plugins::ErrorLocation::ErrorLocation ( const char *  in_function,
const char *  in_file,
long  in_line 
)

Constructor.

Parameters
in_functionThe function in which the error occurred.
in_fileThe file in which the error occurred.
in_lineThe line at which the error occurred.

Member Function Documentation

◆ asString()

std::string rstudio::launcher_plugins::ErrorLocation::asString ( ) const

Formats the error location as a string.

Returns
The error location formatted as a string.

◆ getFile()

const std::string& rstudio::launcher_plugins::ErrorLocation::getFile ( ) const

Gets the file where the error occurred.

Returns
The file where the error occurred.

◆ getFunction()

const std::string& rstudio::launcher_plugins::ErrorLocation::getFunction ( ) const

Gets the function where the error occurred.

Returns
The function where the error occurred.

◆ getLine()

long rstudio::launcher_plugins::ErrorLocation::getLine ( ) const

Gets the line where the error occurred.

Returns
The line where the error occurred.

◆ hasLocation()

bool rstudio::launcher_plugins::ErrorLocation::hasLocation ( ) const

Checks whether the location is set.

Returns
True if a location has been set; false otherwise.

◆ operator=()

ErrorLocation& rstudio::launcher_plugins::ErrorLocation::operator= ( const ErrorLocation in_other)

Assignment operator.

Parameters
in_otherThe location to copy to this location.
Returns
A reference to this location.

◆ operator==()

bool rstudio::launcher_plugins::ErrorLocation::operator== ( const ErrorLocation in_location) const

Equality comparison operator.

Parameters
in_locationThe location to compare this location with.
Returns
True if in_location is the same as this location; false otherwise.

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