xtd 0.2.0
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
46 source_location& operator =(const source_location& other);
48
50
55 xtd::size column() const noexcept;
59 const xtd::string& file_name() const noexcept;
62 const xtd::string& function_name() const noexcept;
66 xtd::size line() const noexcept;
68
70
72 xtd::string to_string() const noexcept override;
74
76
85 static source_location current(const __xtd_source_location__& value = __xtd_source_location__::current()) noexcept;
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}
Contains __xtd_debugbreak definition.
const xtd::string & function_name() const noexcept
Gets the name of the function associated with the position represented by this object,...
xtd::size line() const noexcept
Gets the line number represented by this object.
xtd::string to_string() const noexcept override
Returns a xtd::string that represents the current object.
xtd::size column() const noexcept
Gets the column number represented by this object.
source_location()
Initializes a new instance of the xtd::diagnostics::source_location class.
const xtd::string & file_name() const noexcept
Gets the name of the current source file represented by this object, represented as a null-terminated...
static source_location current(const __xtd_source_location__ &value=__xtd_source_location__::current()) noexcept
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:44
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:58
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.