CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
ilist.h
1
2#ifndef _aspose_system_collections_ilist_h_
3#define _aspose_system_collections_ilist_h_
4
5#include <system/collections/icollection.h>
6#include <system/exceptions.h>
7#include <initializer_list>
8
9namespace System {
10namespace Collections {
11namespace Generic {
12
18template<typename T>
19class ASPOSECPP_SHARED_CLASS IList : public System::Collections::Generic::ICollection<T>
20{
22 RTTI_INFO_TEMPLATE_CLASS(System::Collections::Generic::IList<T>, System::BaseTypesInfo<System::Collections::Generic::ICollection<T>>);
23
24public:
30 typedef T ValueType;
31
35 virtual int IndexOf(const T& item) const = 0;
39 virtual void Insert(int index, const T& item) = 0;
42 virtual void RemoveAt(int index) = 0;
43
47 virtual T idx_get(int index) const = 0;
51 virtual void idx_set(int index, T value) = 0;
52
56 {
57 return false;
58 }
59
62 virtual void _add_range(std::initializer_list<T> range)
63 {
64 for (const auto& item : range)
65 {
66 this->Add(item);
67 }
68 }
69};
70
71} // namespace Generic
72} // namespace Collections
73} // namespace System
74
75#endif // _aspose_system_collections_ilist_h_
Interface of collection of elements. Objects of this class should only be allocated using System::Mak...
Definition: icollection.h:20
Interface of indexed container of elements. Objects of this class should only be allocated using Syst...
Definition: ilist.h:20
virtual void Insert(int index, const T &item)=0
Inserts element into specified position, shifting other elements.
virtual void idx_set(int index, T value)=0
Sets element at specified index.
virtual void RemoveAt(int index)=0
Removes element at specified index.
virtual int IndexOf(const T &item) const =0
Gets index of first appearance of item in container.
ICollection< T > BaseType
Base type.
Definition: ilist.h:26
T ValueType
Value type.
Definition: ilist.h:30
virtual T idx_get(int index) const =0
Gets element at specified index.
virtual void _add_range(std::initializer_list< T > range)
Adds a range of elements to the collection.
Definition: ilist.h:62
IList< T > ThisType
This type.
Definition: ilist.h:28
bool get_IsFixedSize()
Checks whether the collection is of fixed size.
Definition: ilist.h:55
Definition: db_command.h:9