8 #include "Arp/System/Core/IEnumerator.hxx" 9 #include "Arp/Plc/Commons/Meta/DataInfo.hpp" 10 #include "Arp/Plc/Commons/Meta/TypeInfo.hpp" 11 #include "Arp/Plc/Commons/Meta/ITypeNavigator.hpp" 15 namespace Arp {
namespace Plc {
namespace Commons {
namespace Meta
21 typedef std::shared_ptr<ArrayNavigator> Ptr;
34 size_t GetCurrentIndex(
void)
const;
35 size_t GetCurrentOffset(
void)
const;
36 const byte* GetCurrentAddress(
void)
const;
39 bool isFirstMove =
true;
56 size_t GetElementDataSize(
void)
const;
59 size_t GetOffset(
size_t index);
60 const byte* GetAddress(
size_t index);
65 size_t elementDataSize = 0;
68 const byte* startAddress =
nullptr;
69 bool isChanging =
false;
74 inline size_t ArrayNavigator::GetOffset(
size_t index)
76 return index * this->elementDataSize;
79 inline const byte* ArrayNavigator::GetAddress(
size_t index)
81 return this->startAddress + this->GetOffset(index);
89 return this->dataInfo;
92 inline size_t ArrayNavigator::Enumerator::GetCurrentIndex(
void)
const 97 inline size_t ArrayNavigator::Enumerator::GetCurrentOffset(
void)
const 99 return index * this->dataSize;
102 inline const byte* ArrayNavigator::Enumerator::GetCurrentAddress(
void)
const 107 inline size_t ArrayNavigator::GetElementDataSize(
void)
const 109 return this->elementDataSize;
Declares the interface of the enumerator pattern, which is leaned on .NET enumerator idiom...
Definition: IEnumerator.hxx:47
Root namespace for the PLCnext API
unsigned char byte
The Arp character type.
Definition: PrimitiveTypes.hpp:23