Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the call stack for the current thread.
Public Fields | |
| static constexpr xtd::size | OFFSET_UNKNOWN |
| Defines the value that is returned from the get_offset() method when the offset is unknown. This field is constant. | |
| static stack_frame | empty () noexcept |
| Return an empty stack frame. | |
Public Constructors | |
| stack_frame () | |
| Initializes a new instance of the xtd::diagnostics::stack_frame class. | |
| stack_frame (xtd::size skip_frame) | |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that corresponds to a frame above the current stack frame. | |
| stack_frame (bool need_file_info) | |
| Initializes a new instance of the xtd::diagnostics::stack_frame class, optionally capturing source information. | |
| stack_frame (xtd::size skip_frame, bool need_file_info) | |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that corresponds to a frame above the current stack frame, optionally capturing source information. | |
| stack_frame (const xtd::string &file_name, xtd::size line_number) | |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, and line number. | |
| stack_frame (const xtd::string &file_name, xtd::size line_number, const xtd::string &method_name) | |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and method name. | |
| stack_frame (const xtd::string &file_name, xtd::size line_number, const xtd::string &method_name, xtd::size column_number) | |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and column number. | |
| stack_frame (const xtd::string &file_name, xtd::size line_number, xtd::size column_number) | |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and column number. | |
| stack_frame (const xtd::string &file_name, xtd::size line_number, const xtd::string &method_name, xtd::size column_number, xtd::size offset) | |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, method name, column number, and offset. | |
| stack_frame (const xtd::diagnostics::source_location &source_location) | |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given source location. | |
| stack_frame (const xtd::diagnostics::source_location &source_location, xtd::size offset) | |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given given source location, and offset. | |
| stack_frame (xtd::null_ptr frame) | |
| Initializes a new empty instance of the xtd::diagnostics::stack_frame. | |
Public Methods | |
| bool | equals (const xtd::object &obj) const noexcept override |
| Indicates whether the current xtd::diagnostic::stack_frame is equal to another xtd::diagnostic::stack_frame. | |
| bool | equals (const stack_frame &other) const noexcept override |
| Indicates whether the current xtd::diagnostic::stack_frame is equal to another xtd::diagnostic::stack_frame. | |
| xtd::size | get_hash_code () const noexcept override |
| Serves as a hash function for a particular type. | |
| virtual xtd::size | get_file_column_number () const noexcept |
| Gets the column number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. | |
| virtual xtd::size | get_file_line_number () const noexcept |
| Gets the line number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. | |
| virtual const xtd::string & | get_file_name () const noexcept |
| Gets the file name that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. | |
| virtual const xtd::string & | get_method () const noexcept |
| Gets the method in which the frame is executing. | |
| virtual xtd::size | get_native_offset () const noexcept |
| Gets the offset from the start of the native code for the method that is being executed. | |
| virtual xtd::size | get_offset () const noexcept |
| Gets the offset from the start of the code for the method that is being executed. | |
| xtd::string | to_string () const noexcept override |
| Builds a readable representation of the stack trace. | |
Public Static Methods | |
| static stack_frame | current (const xtd::diagnostics::source_location &value=xtd::diagnostics::source_location::current()) noexcept |
| Crates a new xtd::diagnostics::stack_frame object corresponding to the location of the call site. | |
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual type_object | get_type () const noexcept |
| Gets the type of the current instance. | |
| template<class object_t> | |
| xtd::unique_ptr_object< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object. | |
| virtual bool | equals (const stack_frame &) const noexcept=0 |
| Indicates whether the current object is equal to another object of the same type. | |
| template<class object_a_t, class object_b_t> | |
| static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal. | |
| template<class object_a_t, class object_b_t> | |
| static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are the same instance. | |
| xtd::diagnostics::stack_frame::stack_frame | ( | ) |
Initializes a new instance of the xtd::diagnostics::stack_frame class.
|
explicit |
Initializes a new instance of the xtd::diagnostics::stack_frame class that corresponds to a frame above the current stack frame.
| skip_frame | The number of frames up the stack to skip. |
|
explicit |
Initializes a new instance of the xtd::diagnostics::stack_frame class, optionally capturing source information.
| need_file_info | true to capture the file name, line number, and column number of the stack frame; otherwise, false. |
| xtd::diagnostics::stack_frame::stack_frame | ( | xtd::size | skip_frame, |
| bool | need_file_info ) |
Initializes a new instance of the xtd::diagnostics::stack_frame class that corresponds to a frame above the current stack frame, optionally capturing source information.
| skip_frame | The number of frames up the stack to skip. |
| need_file_info | true to capture the file name, line number, and column number of the stack frame; otherwise, false. |
| xtd::diagnostics::stack_frame::stack_frame | ( | const xtd::string & | file_name, |
| xtd::size | line_number ) |
Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, and line number.
| file_name | The file name. |
| line_number | The line number in the specified file. |
| xtd::diagnostics::stack_frame::stack_frame | ( | const xtd::string & | file_name, |
| xtd::size | line_number, | ||
| const xtd::string & | method_name ) |
Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and method name.
| file_name | The file name. |
| line_number | The line number in the specified file. |
| method_name | The method name. |
| xtd::diagnostics::stack_frame::stack_frame | ( | const xtd::string & | file_name, |
| xtd::size | line_number, | ||
| const xtd::string & | method_name, | ||
| xtd::size | column_number ) |
Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and column number.
| file_name | The file name. |
| line_number | The line number in the specified file. |
| method_name | The method name. |
| offset | The offset from the code for the method that is being executed. |
| xtd::diagnostics::stack_frame::stack_frame | ( | const xtd::string & | file_name, |
| xtd::size | line_number, | ||
| xtd::size | column_number ) |
Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and column number.
| file_name | The file name. |
| line_number | The line number in the specified file. |
| method_name | The method name. |
| column_number | The column number in the specified file. |
| xtd::diagnostics::stack_frame::stack_frame | ( | const xtd::string & | file_name, |
| xtd::size | line_number, | ||
| const xtd::string & | method_name, | ||
| xtd::size | column_number, | ||
| xtd::size | offset ) |
Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, method name, column number, and offset.
| file_name | The file name. |
| line_number | The line number in the specified file. |
| method_name | The method name. |
| column_number | The column number in the specified file. |
| offset | The offset from the code for the method that is being executed. |
| xtd::diagnostics::stack_frame::stack_frame | ( | const xtd::diagnostics::source_location & | source_location | ) |
Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given source location.
| source_location | The source location caontaing the file name, the line number, the method name, and the column number. |
| xtd::diagnostics::stack_frame::stack_frame | ( | const xtd::diagnostics::source_location & | source_location, |
| xtd::size | offset ) |
Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given given source location, and offset.
| source_location | The source location caontaing the file name, the line number, the method name, and the column number. |
| offset | The offset from the code for the method that is being executed. |
| xtd::diagnostics::stack_frame::stack_frame | ( | xtd::null_ptr | frame | ) |
Initializes a new empty instance of the xtd::diagnostics::stack_frame.
| frame | nullptr. |
|
staticnoexcept |
Return an empty stack frame.
|
overridevirtualnoexcept |
Indicates whether the current xtd::diagnostic::stack_frame is equal to another xtd::diagnostic::stack_frame.
| obj | An object to compare with this object. |
true if the current object is equal to the other parameter; otherwise, false. Reimplemented from xtd::object.
|
overridenoexcept |
Indicates whether the current xtd::diagnostic::stack_frame is equal to another xtd::diagnostic::stack_frame.
| other | An object to compare with this object. |
true if the current object is equal to the other parameter; otherwise, false.
|
overridevirtualnoexcept |
Serves as a hash function for a particular type.
Reimplemented from xtd::object.
|
virtualnoexcept |
Gets the column number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable.
|
virtualnoexcept |
Gets the line number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable.
|
virtualnoexcept |
Gets the file name that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable.
|
virtualnoexcept |
Gets the method in which the frame is executing.
|
virtualnoexcept |
Gets the offset from the start of the native code for the method that is being executed.
|
virtualnoexcept |
Gets the offset from the start of the code for the method that is being executed.
|
overridevirtualnoexcept |
Builds a readable representation of the stack trace.
Reimplemented from xtd::object.
|
staticnoexcept |
Crates a new xtd::diagnostics::stack_frame object corresponding to the location of the call site.
__LINE__ and __FILE__.
|
staticconstexpr |
Defines the value that is returned from the get_offset() method when the offset is unknown. This field is constant.
std::numeric_limits<xtd::size>::max().