xtd 0.2.0
Loading...
Searching...
No Matches
system

Definition

Contains system classes.

Modules

 collections
 Contains collections definitions.
 
 configuration
 Contains configuration definitions.
 
 diagnostics
 Contains diagnostics definitions.
 
 io
 Contains io definitions.
 
 media
 Contains media definitions.
 
 network
 Contains network definitions.
 
 security
 Contains the underlying structure of the security system, including base classes for permissions.
 
 strings
 Contains mutable and immutable texts as a sequence of UTF-8, UTF-16 and TD-32 code units.
 
 synthesis
 Contains classes for initializing and configuring a speech synthesis engine, for creating prompts, for generating speech, for responding to events, and for modifying voice characteristics.
 
 text
 Contains text definitions.
 
 threading
 Contains threading definitions.
 
 timers
 Contains timers definitions.
 
 web
 Contains web definitions.
 

Classes

class  xtd::any_object
 Represent a polymorphic wrapper capable of holding any type. More...
 
class  xtd::array< type_t, rank_, allocator_t >
 Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays. More...
 
class  xtd::array< type_t, 1, allocator_t >
 Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays. More...
 
class  xtd::array< type_t, 2, allocator_t >
 Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays. More...
 
class  xtd::array< type_t, 3, allocator_t >
 Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays. More...
 
class  xtd::array_abstract_object
 Abstract object that represent array. More...
 
class  xtd::array<>
 Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays. More...
 
class  xtd::basic_array< type_t, allocator_t >
 Base object that represent array. More...
 
class  xtd::basic_string< char_t, traits_t, allocator_t >
 Represents text as a sequence of character units. More...
 
class  xtd::bit_converter
 Converts base data types to an std::vector of bytes, and an std::vector of bytes to base data types. More...
 
class  xtd::box< type_t >
 Represents a boxed object. More...
 
class  xtd::box_char< type_t >
 Represents a boxed char object. More...
 
class  xtd::box_floating_point< type_t >
 Represents a boxed floating point object. More...
 
class  xtd::box_integer< type_t >
 Represents a boxed integer object. More...
 
class  xtd::console
 Represents the standard input, output, and error streams for console applications. More...
 
class  xtd::convert
 Represents API to convert base type code. More...
 
class  xtd::convert_pointer
 Represents API to convert pointers. More...
 
class  xtd::convert_string
 Represents API to convert string containers. More...
 
class  xtd::date_time
 Represents an instant in time, typically expressed as a date and time of day. More...
 
class  xtd::delegate< result_t(arguments_t...)>
 Represents a delegate, which is a data structure that refers to a static method or to a class instance && an instance method of that class. More...
 
class  xtd::enum_object< enum_t >
 Provides the base class for enumerations. More...
 
class  xtd::enum_object< std::nullptr_t >
 Provides the base class for enumerations. More...
 
struct  xtd::enum_register< enum_t >
 Provides the registration struct for enumerations. More...
 
struct  xtd::enum_set_attribute< enum_t >
 Provides the set attribute struct for enumerations. More...
 
class  xtd::environment
 The environment class. More...
 
struct  xtd::guid
 Represents a globally unique identifier (GUID). A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated. More...
 
class  xtd::hash_code
 Combines the hash code for multiple values into a single hash code. More...
 
class  xtd::math
 Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions. More...
 
class  xtd::memory_information
 Represents information about the memory. This class is static. More...
 
class  xtd::object
 Supports all classes in the xtd class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all classes in the xtd. It is the root of the type hierarchy. More...
 
class  xtd::random
 Represents a pseudo-random number generator, a device that produces a sequence of numbers that meet certain statistical requirements for randomness. More...
 
class  xtd::runtime::exception_services::exception_dispatch_info
 Represents an exception whose state is captured at a certain point in code. More...
 
class  xtd::startup
 Defines the xtd::startup object that can be used in the main method to safely call the application's main entry point. More...
 
class  xtd::text::basic_string_builder< char_t, traits_t, allocator_t >
 Represents a mutable string of characters. This class cannot be inherited. More...
 
struct  xtd::time_span
 Represents a time interval. More...
 
class  xtd::time_zone_info
 Represents any time zone in the world. More...
 
class  xtd::time_zone_info::transition_time
 Provides information about a specific time change, such as the change from daylight saving time to standard time or vice versa, in a particular time zone. More...
 
class  xtd::time_zone_info::adjustement_rule
 Provides information about a time zone adjustment, such as the transition to and from daylight saving time. More...
 
class  xtd::translator
 Represents translator class. This class cannot be inherited. More...
 
class  xtd::type_object
 Represents type declarations: class types, interface types, array types, value types, enumeration types, type parameters, generic type definitions, and open or closed constructed generic types. More...
 
class  xtd::uri
 Provides an object representation of a uniform resource identifier (URI) and easy access to the parts of the URI. More...
 
class  xtd::version
 Represents the version number of an assembly, operating system, or the xtd. This class cannot be inherited. More...
 

Typedefs

using xtd::boolean_object = box< bool >
 Represent a boxed bool.
 
using xtd::size_object = box_integer< size_t >
 Represent a boxed size_t.
 

Functions

template<typename type_t >
auto xtd::boxing (const type_t &value) noexcept
 Allows to box an object.
 
template<typename type_t , typename ... args_t>
box< type_t > xtd::boxing (args_t &&...args) noexcept
 Allows to box an object.
 
template<class type_t , class function_t >
void xtd::register_any_stringer (const function_t &func)
 Register an any stringer method for a specified type.
 
template<typename type_t >
type_t xtd::unboxing (const xtd::box< type_t > &value) noexcept
 Allows to unbox an object.
 

Typedef Documentation

◆ boolean_object

using xtd::boolean_object = typedef box<bool>

#include <xtd.core/include/xtd/boolean_object.hpp>

Represent a boxed bool.

Header
#include <xtd/boolean_object>
Namespace
xtd
Library
xtd.core
Examples
The following example shows how to create and use xtd::boolean_object.
auto stringer = [](const object& value) {return value.to_string();};
bool unboxed_object = true;
boolean_object boxed_object = unboxed_bool;
auto result = stringer(boxed_object);
console::write_line("result = {}", result); // Display: result = true;
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
box< bool > boolean_object
Represent a boxed bool.
Definition boolean_object.hpp:29

◆ size_object

using xtd::size_object = typedef box_integer<size_t>

#include <xtd.core/include/xtd/size_object.hpp>

Represent a boxed size_t.

Namespace
xtd
Library
xtd.core
Examples
The following example shows how to create and use xtd::size_object.
auto stringer = [](const object& value) {return value.to_string();};
size_t unboxed_object = 42;
size_object boxed_object = unboxed_object;
auto result = stringer(boxed_object);
console::write_line("result = {}", result); // Display: result = 42;
box_integer< size_t > size_object
Represent a boxed size_t.
Definition size_object.hpp:25

Function Documentation

◆ boxing() [1/2]

template<typename type_t >
auto xtd::boxing ( const type_t &  value)
inlinenoexcept

#include <xtd.core/include/xtd/boxing.hpp>

Allows to box an object.

Parameters
valueValue used to initialize object.
Returns
Boxed object.
Remarks
The boxed object must implement operator == and operator < because a xtd::box implement xtd::icomparable and xtd::iequatable interfaces.
Header
#include <xtd/boxing>
Namespace
xtd
Library
xtd.core
Remarks
For more information about types, see Native types, boxing and unboxing.

◆ boxing() [2/2]

template<typename type_t , typename ... args_t>
box< type_t > xtd::boxing ( args_t &&...  args)
inlinenoexcept

#include <xtd.core/include/xtd/boxing.hpp>

Allows to box an object.

Parameters
...argsParams used to initialize object.
Returns
Boxed object.
Remarks
The boxed object must implement operator == and operator < because a xtd::box implement xtd::icomparable and xtd::iequatable interfaces.
Header
#include <xtd/boxing>
Namespace
xtd
Library
xtd.core
Remarks
For more information about types, see Native types, boxing and unboxing.

◆ register_any_stringer()

template<class type_t , class function_t >
void xtd::register_any_stringer ( const function_t &  func)
inline

#include <xtd.core/include/xtd/register_any_stringer.hpp>

Register an any stringer method for a specified type.

Parameters
funcFunction to register any stringer for specified type.
Namespace
xtd
Library
xtd.core
Examples
Show how to register your own class.
#include <xtd/console>
#include <xtd/environment>
#include <xtd/register_any_stringer>
#include <xtd/string>
#include <xtd/unregister_any_stringer>
using namespace xtd;
class character {
public:
character(const string& name, const string& rank) noexcept : name_(name), rank_(rank) {}
const string& name() const noexcept {return name_;}
const string& rank() const noexcept {return rank_;}
string to_string() const noexcept {return name_ + " (" + rank_ + ")";}
private:
string name_;
string rank_;
};
auto main() -> int {
auto value = std::make_any<int>(42);
value = std::make_any<string>("Star Trek: The Next Generation");
value = std::make_any<character>("Jean-Luc Picard", "Captain");
console::out << "Before register_any_stringer : " << string::format("{}", value) << environment::new_line;
register_any_stringer<character>([](auto value) {return value.to_string();});
console::out << "After register_any_stringer : " << string::format("{}", value) << environment::new_line;
unregister_any_stringer<character>();
console::out << "After unregister_any_stringer : " << string::format("{}", value) << environment::new_line;
}
// This code produces the following output :
//
// 42
// Star Trek: The Next Generation
// Before register_any_stringer : (unregistered)
// After register_any_stringer : Jean-Luc Picard (Captain)
// After unregister_any_stringer : (unregistered)
static std::ostream out
Gets the standard output stream. A std::basic_ostream<char_t> that represents the standard output str...
Definition console.hpp:52
static xtd::string new_line() noexcept
Gets the newline string defined for this environment.
static basic_string format(const basic_string< char > &fmt, args_t &&... args)
Writes the text representation of the specified arguments list, to string using the specified format ...
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition to_string.hpp:41
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10

◆ unboxing()

template<typename type_t >
type_t xtd::unboxing ( const xtd::box< type_t > &  value)
inlinenoexcept

#include <xtd.core/include/xtd/unboxing.hpp>

Allows to unbox an object.

Parameters
valueObject to box.
Returns
Unboxed object.
Header
#include <xtd/unboxing>
Namespace
xtd
Library
xtd.core
Remarks
For more information about types, see Native types, boxing and unboxing.