-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename xtd::linq::enumerable_collection to __opaque_xtd_linq_enumerab…
…le_collection__
- Loading branch information
1 parent
a8e2b1c
commit 68b2ca1
Showing
5 changed files
with
53 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,24 @@ | ||
/// @file | ||
/// @brief Contains xtd::linq::enumerable_collection <type_t> struct. | ||
/// @brief Contains __opaque_xtd_linq_enumerable_collection__ <type_t> struct. | ||
/// @copyright Copyright (c) 2025 Gammasoft. All rights reserved. | ||
#pragma once | ||
#include "../collections/generic/helpers/allocator.hpp" | ||
#include "../collections/generic/extensions/enumerable.hpp" | ||
#include "../collections/generic/enumerator.hpp" | ||
#include "../new_ptr.hpp" | ||
#include <limits> | ||
#include <vector> | ||
|
||
/// @brief The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more. | ||
namespace xtd { | ||
/// @cond | ||
namespace collections::generic { | ||
template<typename type_t> | ||
class ienumerable; | ||
} | ||
/// @endcond | ||
|
||
/// @brief Provides classes and interfaces that support queries that use Language-Integrated Query (LINQ). | ||
namespace linq { | ||
/// @cond | ||
class enumerable; | ||
/// @endcond | ||
|
||
/// @brief Represent an enumerable collection. | ||
/// @par Definition | ||
/// ```cpp | ||
/// template<typename type_t> | ||
/// struct enumerable_collection : xtd::collections::generic::ienumerable<type_t>; | ||
/// ``` | ||
/// @par Header | ||
/// ```cpp | ||
/// #include <xtd/linq/enumerable_collection | ||
/// ``` | ||
/// @par Namespace | ||
/// xtd::linq | ||
/// @par Library | ||
/// xtd.core | ||
/// @ingroup xtd_core linq | ||
template<typename type_t> | ||
struct enumerable_collection : xtd::collections::generic::ienumerable<type_t> { | ||
xtd::collections::generic::enumerator<type_t> get_enumerator() const override { | ||
return xtd::collections::generic::enumerator<>::create(items); | ||
} | ||
/// @cond | ||
namespace xtd::linq { | ||
class enumerable; | ||
}; | ||
|
||
private: | ||
friend class xtd::linq::enumerable; | ||
enumerable_collection() = default; | ||
std::vector<type_t> items; | ||
}; | ||
template<typename type_t> | ||
struct __opaque_xtd_linq_enumerable_collection__ : xtd::collections::generic::ienumerable<type_t> { | ||
xtd::collections::generic::enumerator<type_t> get_enumerator() const override { | ||
return xtd::collections::generic::enumerator<>::create(items); | ||
} | ||
} | ||
|
||
private: | ||
friend class xtd::linq::enumerable; | ||
__opaque_xtd_linq_enumerable_collection__() = default; | ||
std::vector<type_t> items; | ||
}; | ||
/// @endcond |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters