CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
x509_extension_collection.h
1
2#pragma once
3
4#include <system/shared_ptr.h>
5#include <system/collections/list.h>
6#include <system/collections/base_enumerator.h>
7#include <system/collections/ienumerable.h>
8#include <system/collections/icollection.h>
9
10#include <security/cryptography/x509_certificates/x509_extension.h>
11
12namespace System { namespace Security { namespace Cryptography { namespace X509Certificates {
13
18class ASPOSECPP_SHARED_CLASS X509ExtensionCollection final
19 : public System::Collections::Generic::List<SharedPtr<X509Extension> >
20{
26 ASPOSECPP_SHARED_RTTI_INFO_DECL();
27
28public:
29 using BaseType::idx_get;
30
33
37 ASPOSECPP_SHARED_API SharedPtr<X509Extension> idx_get(const String& key) const;
38
39protected:
40 ASPOSECPP_SHARED_API ~X509ExtensionCollection() override;
41};
42
47class ASPOSECPP_SHARED_CLASS X509ExtensionEnumerator final
48 : public System::Collections::Generic::SimpleEnumerator<X509ExtensionCollection::vector_t>
49{
50public:
54 : SimpleEnumerator<X509ExtensionCollection::vector_t>(collection, collection->data())
55 {}
56
63};
64
68class ASPOSECPP_SHARED_CLASS X509ExtensionCollectionPtr : public SharedPtr<X509ExtensionCollection>
69{
70public:
77 { }
78
82 SharedPtr<X509Extension>& operator[] (int32_t idx) const
83 {
84 return (*(this->GetPointer()))[idx];
85 }
86
87 bool IsNull() const
88 {
89 return this->GetPointer() == nullptr;
90 }
91};
92
93}}}} // namespace System::Security::Cryptography::X509Certificates
Interface of enumerator which can be used to iterate through some elements. Objects of this class sho...
Definition: ienumerator.h:63
List forward declaration.
Definition: list.h:127
Iterator class for simple containers holding elements directly using rbegin() and rend() functions....
Definition: base_enumerator.h:81
Collection of extension objects. Objects of this class should only be allocated using System::MakeObj...
Definition: x509_extension_collection.h:20
SharedPtr< X509Extension > idx_get(const String &key) const
Accessor. Not implemented.
Pointer to collection of X509 extensions. This type is a pointer to manage other object's deletion....
Definition: x509_extension_collection.h:69
X509ExtensionCollectionPtr(const SharedPtr< X509ExtensionCollection > &obj)
Constructor.
Definition: x509_extension_collection.h:75
bool IsNull() const
Definition: x509_extension_collection.h:87
Enumerator to iterate through extension collection. Objects of this class should only be allocated us...
Definition: x509_extension_collection.h:49
X509ExtensionEnumerator(const SharedPtr< X509ExtensionCollection > &collection)
Creates enumerator.
Definition: x509_extension_collection.h:53
X509ExtensionEnumerator ThisType
This type.
Definition: x509_extension_collection.h:58
System::Collections::Generic::IEnumerator< SharedPtr< X509Extension > > BaseType
Parent type.
Definition: x509_extension_collection.h:60
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Definition: db_command.h:9