xtd 0.2.0
Loading...
Searching...
No Matches
xtd::reflection::assembly_identifier_attribute Class Referencefinal
Inheritance diagram for xtd::reflection::assembly_identifier_attribute:
xtd::attribute xtd::iequatable< xtd::reflection::assembly_identifier_attribute > xtd::object xtd::interface xtd::extensions::equality_operators< xtd::reflection::assembly_identifier_attribute, iequatable< xtd::reflection::assembly_identifier_attribute > >

Definition

Specifies the identifier of the assembly being attributed.

class core_export_ assembly_identifier_attribute final : public xtd::attribute, public xtd::iequatable<xtd::reflection::assembly_identifier_attribute>;
Represents the base class for custom attributes.
Definition attribute.hpp:25
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
assembly_identifier_attribute(const string &identifier)
Initializes a new instance of the xtd::reflection::assembly_identifier_attribute class.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
Inheritance
xtd::objectxtd::attributextd::reflection::assembly_identifier_attribute
Header
#include <xtd/reflection/assembly_identifier_attribute>
Namespace
xtd::reflection
Library
xtd.core

Protected Member Functions

auto get_type_id () const noexcept -> xtd::sptr< xtd::object > override
 When implemented in a derived class, gets a unique identifier for this attribute.
 attribute ()=default
 Initializes a new instance of the attribute class.

Public Constructors

 assembly_identifier_attribute (const string &identifier)
 Initializes a new instance of the xtd::reflection::assembly_identifier_attribute class.

Public Properties

auto identifier () const noexcept -> const xtd::string &
 Gets identifier information.

Public Methods

auto equals (const object &obj) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto equals (const assembly_identifier_attribute &other) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto get_hash_code () const noexcept -> xtd::size override
 Serves as a hash function for a particular type.
static auto create (const string &identifier) -> assembly_identifier_attribute
 Creates the assembly identifier information. Must be called once in your application.

Additional Inherited Members

auto type_id () const noexcept -> xtd::sptr< object >
 When implemented in a derived class, gets a unique identifier for this attribute.
 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 xtd::string to_string () const
 Returns a xtd::string that represents the current 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.

Constructor & Destructor Documentation

◆ assembly_identifier_attribute()

xtd::reflection::assembly_identifier_attribute::assembly_identifier_attribute ( const string & identifier)
explicit

Initializes a new instance of the xtd::reflection::assembly_identifier_attribute class.

Parameters
identifierThe identifier information.

Member Function Documentation

◆ identifier()

auto xtd::reflection::assembly_identifier_attribute::identifier ( ) const -> const xtd::string &
nodiscardnoexcept

Gets identifier information.

Returns
A string containing the identifier information.

◆ equals() [1/2]

auto xtd::reflection::assembly_identifier_attribute::equals ( const object & obj) const -> bool
nodiscardoverridevirtualnoexcept

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.

Reimplemented from xtd::object.

◆ equals() [2/2]

auto xtd::reflection::assembly_identifier_attribute::equals ( const assembly_identifier_attribute & other) const -> bool
nodiscardoverridevirtualnoexcept

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

Parameters
otherThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

Implements xtd::iequatable< xtd::reflection::assembly_identifier_attribute >.

◆ get_hash_code()

auto xtd::reflection::assembly_identifier_attribute::get_hash_code ( ) const -> xtd::size
nodiscardoverridevirtualnoexcept

Serves as a hash function for a particular type.

Returns
A hash code for the current object.

Reimplemented from xtd::object.

◆ create()

auto xtd::reflection::assembly_identifier_attribute::create ( const string & identifier) -> assembly_identifier_attribute
static

Creates the assembly identifier information. Must be called once in your application.

Remarks
Use this keyword if you create create assembly informations manually.
Use CMake assembly macro if you want create assembly informations with CMake scripts.
Parameters
identifierThe identifier information.
Examples
The following example shows how to use assembly information manually.
#include <xtd/xtd>
class form1 : public form {
public:
static auto main() {
application::run(form1 {});
}
form1() {
text("Form with manual assembly info");
controls().add_range({company, product, version, company_name, product_name, product_version});
client_size({350, 105});
company.auto_size(true);
company.text("Company name");
company.location({10, 10});
company.text_align(content_alignment::middle_left);
product.auto_size(true);
product.text("Product name");
product.location({10, 40});
product.text_align(content_alignment::middle_left);
version.auto_size(true);
version.text("Product version");
version.location({10, 70});
version.text_align(content_alignment::middle_left);
company_name.text(application::company_name());
company_name.read_only(true);
company_name.location({120, 10});
company_name.width(220);
product_name.text(application::product_name());
product_name.read_only(true);
product_name.location({120, 40});
product_name.width(220);
product_version.text(application::product_version());
product_version.read_only(true);
product_version.location({120, 70});
product_version.width(220);
}
private:
label company;
label product;
label version;
text_box company_name;
text_box product_name;
text_box product_version;
};
startup_(form1::main);
Represents the version number of an assembly, operating system, or the xtd. This class cannot be inhe...
Definition version.hpp:115
@ text_box
The system-defined color of the accent color (macos specific. On other platform is same as window).
Definition known_color.hpp:501
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:284
xtd::forms::style_sheets::control label
The label data allows you to specify the box of a label control.
Definition label.hpp:25
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:17
#pragma region xtd generated code
// This code was generated by CMake script.
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
// Remarks : If this file was manually created, you need re-run cmake generator after creating
// or modifying any parameter bellow.
#include <xtd/reflection/assembly_info>
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
assembly_title_("Forms with manual assembly information");
assembly_description_("This example shows how to use xtd assembly informations");
assembly_company_("Gammasoft");
assembly_product_("form_with_manual_assembly_info");
assembly_copyright_("Copyright © Gammasoft 2024");
// The following GUID is for the ID of the typelib if this project is exposed to COM
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// In not specify or empty or "*" the cmake project version is used.
#pragma endregion
#define assembly_product_(product)
Creates the assembly product information. Must be called once in your application.
Definition assembly_product_attribute.hpp:103
#define assembly_title_(title)
Creates the assembly title information. Must be called once in your application.
Definition assembly_title_attribute.hpp:103
#define assembly_description_(description)
Creates the assembly description information. Must be called once in your application.
Definition assembly_description_attribute.hpp:107
#define assembly_culture_(culture)
Creates the assembly culture information. Must be called once in your application.
Definition assembly_culture_attribute.hpp:103
#define assembly_version_(version)
Creates the assembly version information. Must be called once in your application.
Definition assembly_version_attribute.hpp:108
#define assembly_trademark_(trademark)
Creates the assembly trademark information. Must be called once in your application.
Definition assembly_trademark_attribute.hpp:101
#define assembly_company_(company)
Creates the assembly company information. Must be called once in your application.
Definition assembly_company_attribute.hpp:103
#define assembly_configuration_(configuration)
Creates the assembly configuration information. Must be called once in your application.
Definition assembly_configuration_attribute.hpp:103
#define assembly_copyright_(copyright)
Creates the assembly copoyright information. Must be called once in your application.
Definition assembly_copyright_attribute.hpp:103

◆ get_type_id()

auto xtd::reflection::assembly_identifier_attribute::get_type_id ( ) const -> xtd::sptr< xtd::object >
nodiscardoverrideprotectedvirtualnoexcept

When implemented in a derived class, gets a unique identifier for this attribute.

Remarks
As implemented, this identifier is merely the Type of the attribute. However, it is intended that the unique identifier be used to identify two attributes of the same type.

Implements xtd::attribute.


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