xtd 0.2.0
Loading...
Searching...
No Matches
source_location.hpp
Go to the documentation of this file.
1
4#pragma once
5#define __XTD_CORE_INTERNAL__
7#undef __XTD_CORE_INTERNAL__
8#include "../object.hpp"
9#include "../ptr.hpp"
10#include "../size.hpp"
11
13namespace xtd {
15 namespace diagnostics {
34 public:
36
41
48
50
55 [[nodiscard]] auto column() const noexcept -> xtd::size;
59 [[nodiscard]] auto file_name() const noexcept -> const xtd::string&;
62 [[nodiscard]] auto function_name() const noexcept -> const xtd::string&;
66 [[nodiscard]] auto line() const noexcept -> xtd::size;
68
70
72 [[nodiscard]] auto to_string() const noexcept -> xtd::string override;
74
76
85 [[nodiscard]] static auto current(const __xtd_source_location__& value = __xtd_source_location__::current()) noexcept -> xtd::diagnostics::source_location;
87
88 private:
89 source_location(const xtd::string& file, xtd::size line, const xtd::string& func, xtd::size column);
90 struct data;
91 xtd::ptr<data> data_;
92 };
93 }
94}
The xtd::diagnostics::source_location class represents certain information about the source code,...
Definition source_location.hpp:33
auto file_name() const noexcept -> const xtd::string &
Gets the name of the current source file represented by this object, represented as a null-terminated...
auto line() const noexcept -> xtd::size
Gets the line number represented by this object.
auto column() const noexcept -> xtd::size
Gets the column number represented by this object.
source_location()
Initializes a new instance of the xtd::diagnostics::source_location class.
auto function_name() const noexcept -> const xtd::string &
Gets the name of the function associated with the position represented by this object,...
auto to_string() const noexcept -> xtd::string override
Returns a xtd::string that represents the current object.
static auto current(const __xtd_source_location__ &value=__xtd_source_location__::current()) noexcept -> xtd::diagnostics::source_location
Crates a new xtd::diagnostics::source_location object corresponding to the location of the call site.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
xtd::delegate< result_t(arguments_t... arguments)> func
Represents a delegate that has variables parameters and returns a value of the type specified by the ...
Definition func.hpp:27
#define core_export_
Define shared library export.
Definition core_export.hpp:13
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
@ other
The operating system is other.
Definition platform_id.hpp:60
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201
Contains xtd::object class.
Contains xtd::ptr type.
Contains xtd::size type.