xtd 0.2.0
Loading...
Searching...
No Matches
collections

Definition

Contains collections definitions.

Classes

class  xtd::forms::layout::arranged_element_collection< type_t, sorter_t >
 Represents a collection of objects. More...
 

Typedefs

using xtd::collections::any_pair = std::pair< std::any, std::any >
 Implements a std::pair with the key and the value strongly typed to be std::any.
 
using xtd::collections::specialized::string_map = std::map< xtd::ustring, xtd::ustring >
 Implements a std::map with the key and the value strongly typed to be strings.
 
using xtd::collections::specialized::string_pair = std::pair< xtd::ustring, xtd::ustring >
 Implements a std::pair with the key and the value strongly typed to be strings.
 
using xtd::collections::specialized::string_vector = std::vector< xtd::ustring >
 Represents a collection of strings.
 
using xtd::collections::vector_list = std::vector< std::any >
 Represents a collection of std::any.
 

Typedef Documentation

◆ any_pair

using xtd::collections::any_pair = typedef std::pair<std::any, std::any>

#include <xtd.core/include/xtd/collections/any_pair.h>

Implements a std::pair with the key and the value strongly typed to be std::any.

using any_pair = std::pair<std::any, std::any>
std::pair< std::any, std::any > any_pair
Implements a std::pair with the key and the value strongly typed to be std::any.
Definition any_pair.h:20
Header
#include <xtd/collections/any_pair>
Namespace
xtd::collections
Library
xtd.core

◆ string_map

#include <xtd.core/include/xtd/collections/specialized/string_map.h>

Implements a std::map with the key and the value strongly typed to be strings.

using string_map = std::map<xtd::ustring, xtd::ustring>
std::map< xtd::ustring, xtd::ustring > string_map
Implements a std::map with the key and the value strongly typed to be strings.
Definition string_map.h:25
Header
#include <xtd/collections/specialized/string_map>
Namespace
xtd::collections
Library
xtd.core

◆ string_pair

#include <xtd.core/include/xtd/collections/specialized/string_pair.h>

Implements a std::pair with the key and the value strongly typed to be strings.

using string_pair = std::pair<xtd::ustring, xtd::ustring>
std::pair< xtd::ustring, xtd::ustring > string_pair
Implements a std::pair with the key and the value strongly typed to be strings.
Definition string_pair.h:25
Header
#include <xtd/collections/specialized/string_pair>
Namespace
xtd::collections
Library
xtd.core

◆ string_vector

#include <xtd.core/include/xtd/collections/specialized/string_vector.h>

Represents a collection of strings.

using string_vector = std::vector<xtd::ustring>
std::vector< xtd::ustring > string_vector
Represents a collection of strings.
Definition string_vector.h:25
Header
#include <xtd/collections/specialized/string_vector>
Namespace
xtd::collections
Library
xtd.core

◆ vector_list

using xtd::collections::vector_list = typedef std::vector<std::any>

#include <xtd.core/include/xtd/collections/vector_list.h>

Represents a collection of std::any.

using vector_list = std::vector<std::any>
std::vector< std::any > vector_list
Represents a collection of std::any.
Definition vector_list.h:23
Header
#include <xtd/collections/vector_list>
Namespace
xtd::collections
Library
xtd.core
Examples
The following example shows hows to use xtd::collections::vector_list.
#include <xtd/collections/vector_list>
#include <xtd/console>
using namespace std;
using namespace xtd;
using namespace xtd::collections;
template<typename collection_t>
void print_values(const collection_t& my_list) {
for (auto obj : my_list)
console::write(" {0}", obj);
}
auto main()->int {
// Creates and initializes a new vector_list.
vector_list my_vl;
my_vl.emplace_back("Hello");
my_vl.emplace_back("World");
my_vl.emplace_back("!");
// Displays the properties and values of the vector_list.
console::write_line(" size: {0}", my_vl.size());
console::write_line(" Capacity: {0}", my_vl.capacity());
console::write(" Values:");
print_values(my_vl);
}
// This code can produces the following output :
//
// my_vl
// size: 3
// Capacity: 4
// Values: Hello World !
Represents the standard input, output, and error streams for console applications.
Definition console.h:33
static void write(arg_t &&value)
Writes the text representation of the specified value to the standard output stream.
Definition console.h:409
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.h:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10