Keywords are predefined, reserved identifiers that have special meanings to the compiler.
Macros | |
| #define | export_ |
| Define shared library export. | |
| #define | block_scope_ |
| The specified expression is cleared automatically when the scope is ended. | |
| #define | call_once_ |
| The xtd keyword call_once_ can be used to execute a routine exactly once. This can be used to initialise data in a thread-safe way. | |
| #define | core_export_ |
| Define shared library export. | |
| #define | delegate_ |
| The declaration of a delegate type is similar to a method signature. It has a return value and any number of parameters of any type. | |
| #define | enum_ut_(namespace_name, enum_t, underlying_t, ...) |
| Provides the registration struct for enum with specified underlying type. | |
| #define | enum_(namespace_name, enum_t, ...) |
| Provides the registration struct for enum. | |
| #define | enum_class_ut_(namespace_name, enum_class_t, underlying_t, ...) |
| Provides the registration struct for enum class with specified underlying type. | |
| #define | enum_class_(namespace_name, enum_class_t, ...) |
| Provides the registration struct for enum class. | |
| #define | enum_struct_ut_(namespace_name, enum_struct_t, underlying_t, ...) |
| Provides the registration struct for enum with specified underlying type. | |
| #define | enum_struct_(namespace_name, enum_struct_t, ...) |
| Provides the registration struct for enum struct. | |
| #define | flags_attribute_(namespace_name, enum_type) |
| Provides the set attribute struct for enumerations helper. | |
| #define | foreach_(item, ...) |
| The foreach_ keyword executes a statement or a block of statements for each element in an instance of the type that implements the xtd::collections::ienumerable or xtd::collections::generic::ienumerable <type_t> interfaces. | |
| #define | interface_ |
| This keyword is use to represent an interface. | |
| #define | lock_(object) |
| The lock_ keyword marks a statement block as a critical section by obtaining the mutual-exclusion lock for a given object, executing a statement, and then releasing the lock. The following example includes a lock statement. | |
| #define | lock_guard_(object) |
| The lock_guard_ keyword marks a statement block_guard as a critical section by obtaining the mutual-exclusion lock_guard for a given object, executing a statement, and then releasing the lock_guard. The following example includes a lock_guard statement. | |
| #define | nameof_(...) |
| Used to obtain the simple (unqualified) string name of a variable, type, or member. | |
| #define | assembly_company_(company) |
| Creates the assembly company information. Must be called once in your application. | |
| #define | assembly_configuration_(configuration) |
| Creates the assembly configuration information. Must be called once in your application. | |
| #define | assembly_copyright_(copyright) |
| Creates the assembly copoyright information. Must be called once in your application. | |
| #define | assembly_culture_(culture) |
| Creates the assembly culture information. Must be called once in your application. | |
| #define | assembly_description_(description) |
| Creates the assembly description information. Must be called once in your application. | |
| #define | assembly_file_version_(version) |
| Creates the assembly file version information. Must be called once in your application. | |
| #define | assembly_guid_(guid) |
| Creates the assembly guid information. Must be called once in your application. | |
| #define | assembly_identifier_(identifier) |
| Creates the assembly identifier information. Must be called once in your application. | |
| #define | assembly_name_(name) |
| Creates the assembly name information. Must be called once in your application. | |
| #define | assembly_product_(product) |
| Creates the assembly product information. Must be called once in your application. | |
| #define | assembly_title_(title) |
| Creates the assembly title information. Must be called once in your application. | |
| #define | assembly_trademark_(trademark) |
| Creates the assembly trademark information. Must be called once in your application. | |
| #define | assembly_version_(version) |
| Creates the assembly version information. Must be called once in your application. | |
| #define | scope_exit_ |
| Nowadays, every C++ developer is familiar with the Resource Acquisition Is Initialization (RAII) technique. It binds resource acquisition and release to initialization and destruction of a variable that holds the resource. There are times when writing a special class for such a variable is not worth the effort. This is when xtd scope_exit_ comes into play. scope_exit_ is always executed at the end of the scope. | |
| #define | scope_fail_ |
| Nowadays, every C++ developer is familiar with the Resource Acquisition Is Initialization (RAII) technique. It binds resource acquisition and release to initialization and destruction of a variable that holds the resource. There are times when writing a special class for such a variable is not worth the effort. This is when xtd scope_fail_ comes into play. scope_fail_ is executed only if an exception is in progress. | |
| #define | scope_success_ |
| Nowadays, every C++ developer is familiar with the Resource Acquisition Is Initialization (RAII) technique. It binds resource acquisition and release to initialization and destruction of a variable that holds the resource. There are times when writing a special class for such a variable is not worth the effort. This is when xtd scope_success_ comes into play. scope_success_ is executed only if no exception. | |
| #define | self_ |
| The self_ expression is a reference value expression whose value is the reference of the implicit object parameter (the object on which the non-static member function (up to C++23) implicit object member function (since C++23) is called). | |
| #define | sizeof_ |
| Used to obtain the size in bytes of the object representation of type or expression. | |
| #define | startup_(main_method) |
| Defines the entry point to be called when the application loads. Generally this is set either to the main form in your application or to the main procedure that should run when the application starts. | |
| #define | static_ |
| This keyword is use to represent a static object. A static object can't be instantiated (constructors are deleted). | |
| #define | typeof_ |
| Used to obtain the type object of a specified type or object. | |
| #define | using_(...) |
| The specified expression is cleared automatically when the scope is ended. | |
| #define | drawing_export_ |
| Define shared library export. | |
| #define | forms_export_ |
| Define shared library export. | |
| #define | tunit_export_ |
| Define shared library export. | |
Public Static Methods | |
| static auto | xtd::reflection::assembly_name_attribute::create (const string &name) -> assembly_name_attribute |
| Creates the assembly name information. Must be called once in your application. | |
| #define export_ |
| #define block_scope_ |
#include <block_scope.hpp>
The specified expression is cleared automatically when the scope is ended.
| #define call_once_ |
#include <call_once.hpp>
The xtd keyword call_once_ can be used to execute a routine exactly once. This can be used to initialise data in a thread-safe way.
| #define core_export_ |
| #define delegate_ |
#include <delegate.hpp>
The declaration of a delegate type is similar to a method signature. It has a return value and any number of parameters of any type.
| #define enum_ut_ | ( | namespace_name, | |
| enum_t, | |||
| underlying_t, | |||
| ... ) |
#include <enum.hpp>
Provides the registration struct for enum with specified underlying type.
| namespace_name | The name of the the namespace. Empty if no namespace. |
| enum_type | The name of the enum. |
| underlying_type | The underying type. |
| ... | The enumeration list. |
| #define enum_ | ( | namespace_name, | |
| enum_t, | |||
| ... ) |
#include <enum.hpp>
Provides the registration struct for enum.
| namespace_name | The name of the the namespace. Empty if no namespace. |
| enum_type | The name of the enum. |
| ... | The enumeration list. |
| #define enum_class_ut_ | ( | namespace_name, | |
| enum_class_t, | |||
| underlying_t, | |||
| ... ) |
#include <enum_class.hpp>
Provides the registration struct for enum class with specified underlying type.
| namespace_name | The name of the the namespace. Empty if no namespace. |
| enum_class_type | The name of the enum class. |
| underlying_type | The underying type. |
| ... | The enumeration list. |
| #define enum_class_ | ( | namespace_name, | |
| enum_class_t, | |||
| ... ) |
#include <enum_class.hpp>
Provides the registration struct for enum class.
| namespace_name | The name of the the namespace. Empty if no namespace. |
| enum_class_type | The name of the enum class. |
| ... | The enumeration list. |
| #define enum_struct_ut_ | ( | namespace_name, | |
| enum_struct_t, | |||
| underlying_t, | |||
| ... ) |
#include <enum_struct.hpp>
Provides the registration struct for enum with specified underlying type.
| namespace_name | The name of the the namespace. Empty if no namespace. |
| enum_struct_type | The name of the enum struct. |
| underlying_type | The underying type. |
| ... | The enumeration list. |
| #define enum_struct_ | ( | namespace_name, | |
| enum_struct_t, | |||
| ... ) |
#include <enum_struct.hpp>
Provides the registration struct for enum struct.
| namespace_name | The name of the the namespace. Empty if no namespace. |
| enum_struct_type | The name of the enum struct. |
| ... | The enumeration list. |
| #define flags_attribute_ | ( | namespace_name, | |
| enum_type ) |
#include <flags_attribute.hpp>
Provides the set attribute struct for enumerations helper.
| namespace_name | The name of the the namespace. Empty if no namespace. |
| enum_type | The name of the enum flags. |
| Operator | Name |
|---|---|
| ^= | Bitwise XOR assignment |
| &= | Bitwise AND assignment |
| |= | Bitwise OR assignment |
| += | Addition assignment |
| -= | Subtraction assignment |
| Bitwise XOR | |
| & | Bitwise AND |
| | | Bitwise OR |
| + | Addition |
| - | Subtraction |
| ~ | Bitwise NOT |
| #define foreach_ | ( | item, | |
| ... ) |
#include <foreach.hpp>
The foreach_ keyword executes a statement or a block of statements for each element in an instance of the type that implements the xtd::collections::ienumerable or xtd::collections::generic::ienumerable <type_t> interfaces.
| #define interface_ |
#include <interface.hpp>
This keyword is use to represent an interface.
| #define lock_ | ( | object | ) |
#include <lock.hpp>
The lock_ keyword marks a statement block as a critical section by obtaining the mutual-exclusion lock for a given object, executing a statement, and then releasing the lock. The following example includes a lock statement.
For more information, see Thread Synchronization.
| #define lock_guard_ | ( | object | ) |
#include <lock_guard.hpp>
The lock_guard_ keyword marks a statement block_guard as a critical section by obtaining the mutual-exclusion lock_guard for a given object, executing a statement, and then releasing the lock_guard. The following example includes a lock_guard statement.
For more information, see Thread Synchronization.
| #define nameof_ | ( | ... | ) |
#include <nameof.hpp>
Used to obtain the simple (unqualified) string name of a variable, type, or member.
When reporting errors in code, hooking up model-view-controller (MVC) links, firing property changed events, etc., you often want to capture the string name of a method. Using nameof helps keep your code valid when renaming definitions. Before, you had to use string literals to refer to definitions, which is brittle when renaming code elements because tools do not know to check these string literals.
A nameof expression has this form:
| #define assembly_company_ | ( | company | ) |
#include <assembly_company_attribute.hpp>
Creates the assembly company information. Must be called once in your application.
| company | The company information. |
| #define assembly_configuration_ | ( | configuration | ) |
#include <assembly_configuration_attribute.hpp>
Creates the assembly configuration information. Must be called once in your application.
| configuration | The configuration information. |
| #define assembly_copyright_ | ( | copyright | ) |
#include <assembly_copyright_attribute.hpp>
Creates the assembly copoyright information. Must be called once in your application.
| copyright | The copyright information. |
| #define assembly_culture_ | ( | culture | ) |
#include <assembly_culture_attribute.hpp>
Creates the assembly culture information. Must be called once in your application.
| culture | The culture information. |
| #define assembly_description_ | ( | description | ) |
#include <assembly_description_attribute.hpp>
Creates the assembly description information. Must be called once in your application.
| description | The description information. |
| #define assembly_file_version_ | ( | version | ) |
#include <assembly_file_version_attribute.hpp>
Creates the assembly file version information. Must be called once in your application.
| version | The file version information. |
| #define assembly_guid_ | ( | guid | ) |
#include <assembly_guid_attribute.hpp>
Creates the assembly guid information. Must be called once in your application.
| guid | The guid information. |
| #define assembly_identifier_ | ( | identifier | ) |
#include <assembly_identifier_attribute.hpp>
Creates the assembly identifier information. Must be called once in your application.
| identifier | The identifier information. |
| #define assembly_name_ | ( | name | ) |
#include <assembly_name_attribute.hpp>
Creates the assembly name information. Must be called once in your application.
| name | The name information. |
| #define assembly_product_ | ( | product | ) |
#include <assembly_product_attribute.hpp>
Creates the assembly product information. Must be called once in your application.
| product | The product information. |
| #define assembly_title_ | ( | title | ) |
#include <assembly_title_attribute.hpp>
Creates the assembly title information. Must be called once in your application.
| title | The title information. |
| #define assembly_trademark_ | ( | trademark | ) |
#include <assembly_trademark_attribute.hpp>
Creates the assembly trademark information. Must be called once in your application.
| trademark | The trademark information. |
| #define assembly_version_ | ( | version | ) |
#include <assembly_version_attribute.hpp>
Creates the assembly version information. Must be called once in your application.
| version | The version information. |
| #define scope_exit_ |
#include <scope_exit.hpp>
Nowadays, every C++ developer is familiar with the Resource Acquisition Is Initialization (RAII) technique. It binds resource acquisition and release to initialization and destruction of a variable that holds the resource. There are times when writing a special class for such a variable is not worth the effort. This is when xtd scope_exit_ comes into play. scope_exit_ is always executed at the end of the scope.
| #define scope_fail_ |
#include <scope_fail.hpp>
Nowadays, every C++ developer is familiar with the Resource Acquisition Is Initialization (RAII) technique. It binds resource acquisition and release to initialization and destruction of a variable that holds the resource. There are times when writing a special class for such a variable is not worth the effort. This is when xtd scope_fail_ comes into play. scope_fail_ is executed only if an exception is in progress.
| #define scope_success_ |
#include <scope_success.hpp>
Nowadays, every C++ developer is familiar with the Resource Acquisition Is Initialization (RAII) technique. It binds resource acquisition and release to initialization and destruction of a variable that holds the resource. There are times when writing a special class for such a variable is not worth the effort. This is when xtd scope_success_ comes into play. scope_success_ is executed only if no exception.
| #define self_ |
#include <self.hpp>
The self_ expression is a reference value expression whose value is the reference of the implicit object parameter (the object on which the non-static member function (up to C++23) implicit object member function (since C++23) is called).
| #define sizeof_ |
#include <sizeof.hpp>
Used to obtain the size in bytes of the object representation of type or expression.
| #define startup_ | ( | main_method | ) |
#include <startup.hpp>
Defines the entry point to be called when the application loads. Generally this is set either to the main form in your application or to the main procedure that should run when the application starts.
| main_method | The main method. |
| #define static_ |
#include <static.hpp>
This keyword is use to represent a static object. A static object can't be instantiated (constructors are deleted).
| #define typeof_ |
#include <typeof.hpp>
Used to obtain the type object of a specified type or object.
| #define using_ | ( | ... | ) |
#include <using.hpp>
The specified expression is cleared automatically when the scope is ended.
| #define drawing_export_ |
| #define forms_export_ |
| #define tunit_export_ |
|
static |
#include <assembly_name_attribute.hpp>
Creates the assembly name information. Must be called once in your application.
| name | The name information. |