PLCnext API Documentation  22.9.0.33
Classes | Public Types | Public Member Functions | List of all members
Arp::Plc::Commons::Meta::StructNavigator Class Reference

Navigates the children of a struct More...

#include <StructNavigator.hpp>

Classes

class  Enumerator
 IEnumerator of DataInfos of a struct More...
 

Public Types

using Ptr = std::shared_ptr< StructNavigator >
 std::shared_ptr to StructNavigator More...
 

Public Member Functions

 StructNavigator (const TypeIdentifier &typeId, ITypeNavigator &typeNavigator, bool isChanging)
 Constructs an StructNavigator instance. More...
 
 StructNavigator (const StructNavigator &arg)=default
 Copy constructor. More...
 
 StructNavigator (StructNavigator &&arg)=default
 Move constructor. More...
 
StructNavigatoroperator= (const StructNavigator &arg)=default
 Copy assignment operator. More...
 
StructNavigatoroperator= (StructNavigator &&arg)=default
 Move assignment operator. More...
 
 ~StructNavigator (void)=default
 Destructs this instance and frees all resources. More...
 
Enumerator GetEnumerator (const byte *address)
 Gets an IEnumerator based on an address More...
 
Enumerator GetEnumerator (const DataInfo &dataInfo)
 Gets an IEnumerator based on a DataInfo object More...
 
size_t GetOffset (const String &fieldName)
 Gets the offset of a field in the struct More...
 

Detailed Description

Navigates the children of a struct

Member Typedef Documentation

◆ Ptr

std::shared_ptr to StructNavigator

Constructor & Destructor Documentation

◆ StructNavigator() [1/3]

Arp::Plc::Commons::Meta::StructNavigator::StructNavigator ( const TypeIdentifier typeId,
ITypeNavigator typeNavigator,
bool  isChanging 
)

Constructs an StructNavigator instance.

Parameters
typeIdTypeIdentifier of the navigated struct
typeNavigatorReference to the ITypeNavigator to get infoprmation about the type
isChangingtrue, if the background domain should be used, otherwise uses the foreground domain

◆ StructNavigator() [2/3]

Arp::Plc::Commons::Meta::StructNavigator::StructNavigator ( const StructNavigator arg)
default

Copy constructor.

◆ StructNavigator() [3/3]

Arp::Plc::Commons::Meta::StructNavigator::StructNavigator ( StructNavigator &&  arg)
default

Move constructor.

◆ ~StructNavigator()

Arp::Plc::Commons::Meta::StructNavigator::~StructNavigator ( void  )
default

Destructs this instance and frees all resources.

Member Function Documentation

◆ GetEnumerator() [1/2]

StructNavigator::Enumerator Arp::Plc::Commons::Meta::StructNavigator::GetEnumerator ( const byte address)
inline

Gets an IEnumerator based on an address

Parameters
addressAddress of the struct to navigate
Returns
IEnumerator of DataInfos over the struct's children

◆ GetEnumerator() [2/2]

StructNavigator::Enumerator Arp::Plc::Commons::Meta::StructNavigator::GetEnumerator ( const DataInfo dataInfo)
inline

Gets an IEnumerator based on a DataInfo object

Parameters
dataInfoDataInfo of the struct to navigate
Returns
IEnumerator of DataInfos over the struct's children

◆ GetOffset()

size_t Arp::Plc::Commons::Meta::StructNavigator::GetOffset ( const String fieldName)

Gets the offset of a field in the struct

Parameters
fieldNamename of the field
Returns
Offset of the field inside the struct

◆ operator=() [1/2]

StructNavigator& Arp::Plc::Commons::Meta::StructNavigator::operator= ( const StructNavigator arg)
default

Copy assignment operator.

◆ operator=() [2/2]

StructNavigator& Arp::Plc::Commons::Meta::StructNavigator::operator= ( StructNavigator &&  arg)
default

Move assignment operator.


The documentation for this class was generated from the following file: