xtd 0.2.0
xtd::environment::xtd_library Class Referencefinal
Inheritance diagram for xtd::environment::xtd_library:
xtd::object xtd::iequatable< xtd_library > xtd::interface xtd::extensions::equality_operators< type_t, equatable_t >

Definition

Represents a xtd library that contains name, version and paths.

Public Properties

const xtd::stringinclude_path () const noexcept
 Gets The inlcude path of the library.
 
const xtd::stringlibrary_path () const noexcept
 Gets The library path of the library.
 
const xtd::stringname () const noexcept
 Gets The name of the library.
 
const xtd::stringresources_path () const noexcept
 Gets The resource path of the library.
 
const xtd::versionversion () const noexcept
 Gets The version of the library.
 

Public Methods

bool equals (const object &other) const noexcept override
 Determines whether the specified object is equal to the current object.
 
bool equals (const xtd_library &other) const noexcept override
 
xtd::string to_string () const noexcept override
 Returns a xtd::string that represents the current object.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual xtd::size get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<class object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
- Public Member Functions inherited from xtd::iequatable< xtd_library >
virtual bool equals (const xtd_library &) const noexcept=0
 Indicates whether the current object is equal to another object of the same type.
 
- Static Public Member Functions inherited from xtd::object
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.
 

Member Function Documentation

◆ include_path()

const xtd::string & xtd::environment::xtd_library::include_path ( ) const
noexcept

Gets The inlcude path of the library.

Returns
A string that represents the include path of the library.

◆ library_path()

const xtd::string & xtd::environment::xtd_library::library_path ( ) const
noexcept

Gets The library path of the library.

Returns
A string that represents the library path of the library.

◆ name()

const xtd::string & xtd::environment::xtd_library::name ( ) const
noexcept

Gets The name of the library.

Returns
A string that represents the name of the library.

◆ resources_path()

const xtd::string & xtd::environment::xtd_library::resources_path ( ) const
noexcept

Gets The resource path of the library.

Returns
A string that represents the resource path of the library.

◆ version()

const xtd::version & xtd::environment::xtd_library::version ( ) const
noexcept

Gets The version of the library.

Returns
An xtd::version object that represents the version of the library.

◆ equals()

bool xtd::environment::xtd_library::equals ( const object obj) const
inlineoverridevirtualnoexcept

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.
Examples
The following code example compares the current instance with another object.
#include <xtd/console>
using namespace xtd;
auto main() -> int {
auto object1 = new_ptr<object>();
auto object2 = new_ptr<object>();
auto object3 = object2;
console::write_line(object1->equals(*object3));
console::write_line(*object1 == *object3);
object3 = object1;
console::write_line(object1->equals(*object3));
console::write_line(*object1 == *object3);
}
// This code produces the following output :
//
// false
// false
// true
// true
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10

Reimplemented from xtd::object.

◆ to_string()

xtd::string xtd::environment::xtd_library::to_string ( ) const
overridevirtualnoexcept

Returns a xtd::string that represents the current object.

Returns
A string that represents the current object.
Examples
The following code example demonstrates what to_string returns.
#include <xtd/xtd>
using namespace xtd;
namespace examples {
namespace object_test {
class object1 : public object {
};
}
}
auto main() -> int {
ptr<object> obj1 = new_ptr<examples::object_test::object1>();
ptr<object> obj2 = new_ptr<date_time>(1971, 1, 5, 23, 5, 0);
ptr<object> obj3 = new_ptr<boolean_object>();
}
// This code produces the following output :
//
// examples::object_test::object1
// Tue Jan 5 23:05:00 1971
// false
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:43
The xtd::shared_ptr_object is a shared pointer as std::shared_ptr.
Definition shared_ptr_object.hpp:30
xtd::string to_string() const noexcept override
Returns a xtd::string that represents the current object.

Reimplemented from xtd::object.


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