CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
cookie_collection.h
1
2#pragma once
3
4#include <system/collections/icollection.h>
5#include <system/collections/ienumerator.h>
6#include <system/collections/list.h>
7#include <system/shared_ptr.h>
8
9#include <net/cookie.h>
10
11namespace System { namespace Net {
12
17class ASPOSECPP_SHARED_CLASS CookieCollection : public System::Collections::Generic::ICollection<System::SharedPtr<System::Net::Cookie>>
18{
23
25 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
27 ASPOSECPP_SHARED_RTTI_INFO_DECL();
28
29public:
31 enum class Stamp
32 {
34 Check = 0,
36 Set = 1,
38 SetToUnused = 2,
40 SetToMaxUsed = 3
41 };
42
43public:
45 ASPOSECPP_SHARED_API int32_t get_Count() const override;
51 ASPOSECPP_SHARED_API bool get_IsOtherVersionSeen();
52
54 ASPOSECPP_SHARED_API CookieCollection();
55
59 ASPOSECPP_SHARED_API System::SharedPtr<Cookie> idx_get(int32_t index);
63 ASPOSECPP_SHARED_API System::SharedPtr<Cookie> idx_get(String name);
64
67 ASPOSECPP_SHARED_API void Add(const System::SharedPtr<Cookie>& cookie) override;
72 ASPOSECPP_SHARED_API bool Remove(const System::SharedPtr<Cookie>& cookie) override;
76 ASPOSECPP_SHARED_API bool Contains(const System::SharedPtr<Cookie>& cookie) const override;
78 ASPOSECPP_SHARED_API void Clear() override;
79
82 ASPOSECPP_SHARED_API void Add(System::SharedPtr<CookieCollection> cookies);
86 ASPOSECPP_SHARED_API DateTime TimeStamp(CookieCollection::Stamp how);
91 ASPOSECPP_SHARED_API int32_t InternalAdd(System::SharedPtr<Cookie> cookie, bool isStrict);
95 ASPOSECPP_SHARED_API int32_t IndexOf(System::SharedPtr<Cookie> cookie);
98 ASPOSECPP_SHARED_API void RemoveAt(int32_t idx);
101
103 ASPOSECPP_SHARED_API System::Details::VirtualizedIteratorBase<System::SharedPtr<Cookie>>* virtualizeBeginIterator() override;
105 ASPOSECPP_SHARED_API System::Details::VirtualizedIteratorBase<System::SharedPtr<Cookie>>* virtualizeEndIterator() override;
107 ASPOSECPP_SHARED_API System::Details::VirtualizedIteratorBase<System::SharedPtr<Cookie>>* virtualizeBeginConstIterator() const override;
109 ASPOSECPP_SHARED_API System::Details::VirtualizedIteratorBase<System::SharedPtr<Cookie>>* virtualizeEndConstIterator() const override;
110
111private:
115 DateTime _timeStamp;
118 bool _hasOtherVersions;
119
122 bool get_IsSynchronized();
124 System::SharedPtr<Object> get_SyncRoot() const;
125
127 void CopyTo(System::ArrayPtr<System::SharedPtr<Cookie>> array, int32_t arrayIndex) override;
128};
129
130}} // namespace System::Net
Interface of collection of elements. Objects of this class should only be allocated using System::Mak...
Definition: icollection.h:20
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
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