CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
ienumerator_ng.h
1#pragma once
2
3#include <system/object.h>
4#include <system/shared_ptr.h>
5#include <defines.h>
6#include <system/exceptions.h>
7#include <system/idisposable.h>
8
9namespace System {
10namespace Collections {
11
17class ASPOSECPP_SHARED_CLASS IEnumerator: virtual public IDisposable, virtual public Object
18{
20 RTTI_INFO_TEMPLATE_CLASS(System::Collections::IEnumerator, System::BaseTypesInfo<System::Object>);
21public:
24
25 // There no need to define an empty virtual dtor, virtual dtor for inheritance already defined in the Object class
28 virtual const SharedPtr<System::Object>& Current() const { return get_Current(); }
31 virtual const SharedPtr<System::Object>& get_Current() const = 0;
35 virtual bool MoveNext() = 0;
37 virtual void Reset() { throw System::NotImplementedException(); }
38};
39
40} // namespace Collections
41} // namespace System
Interface of enumerator which can be used to iterate through some elements. Objects of this class sho...
Definition: ienumerator_ng.h:18
virtual void Reset()
Resets enumerator to position before first element.
Definition: ienumerator_ng.h:37
virtual const SharedPtr< System::Object > & get_Current() const =0
Gets current element.
virtual bool MoveNext()=0
Moves enumerator to the next element. If no element was referenced before, sets reference to the firs...
virtual const SharedPtr< System::Object > & Current() const
Gets current element.
Definition: ienumerator_ng.h:28
Defines method that releases resources owned by the current object. Objects of this class should only...
Definition: idisposable.h:30
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: db_command.h:9