PLCnext API Documentation 25.6.0.37
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Arp::Io::Commons::Configuration::TicStructDefinition Class Reference

This class is used to read a entity of the type 'IO:StructDefinition' from a TIC file. More...

#include <TicStructDefinition.hpp>

Inheritance diagram for Arp::Io::Commons::Configuration::TicStructDefinition:
Inheritance graph

Public Types

using Ptr = std::shared_ptr< TicStructDefinition >
 
using BitSize = Arp::Plc::Meta::Commons::BitSize
 
using TypeDefinition = Arp::Plc::Meta::Commons::Io::TypeDefinition
 
- Public Types inherited from Arp::Io::Commons::Configuration::TicBase
using Ptr = std::shared_ptr< TicBase >
 
using ChildPtr = ITicSerializable::Ptr
 
using ChildElements = std::vector< ChildPtr >
 
- Public Types inherited from Arp::Io::Commons::Configuration::ITicSerializable
using Ptr = std::shared_ptr< ITicSerializable >
 

Public Member Functions

 TicStructDefinition (void)
 The default constructor.
 
 TicStructDefinition (const TicStructDefinition &arg)=delete
 
 TicStructDefinition (TicStructDefinition &&arg) noexcept
 The default move constructor. More...
 
TicStructDefinitionoperator= (const TicStructDefinition &arg)=delete
 
TicStructDefinitionoperator= (TicStructDefinition &&arg) noexcept
 The default move-assignment operator. More...
 
 ~TicStructDefinition (void) override
 The default destructor.
 
const StringGetTypeName () const
 Returns the name of the struct. More...
 
BitSize GetLength () const
 Returns the total length of the structure More...
 
TypeDefinition CreateTypeDefinition () const
 Creates an instance of type TypeDefinition More...
 
bool TryReadAttribute (TicReader &reader, const String &attributeName) final
 This operation is called every time an attribute is read. More...
 
bool TryCreateElement (const String &elementName, ChildPtr &result) final
 Factory method to create child elements. More...
 
void OnReadEnd (void) override
 Validates the content of the current element. More...
 
Impl & GetImpl (void)
 For internal use only. More...
 
const Impl & GetImpl (void) const
 
- Public Member Functions inherited from Arp::Io::Commons::Configuration::TicBase
 TicBase (const TicBase &arg)=delete
 
 TicBase (TicBase &&arg) noexcept
 Default move constructor.
 
TicBaseoperator= (const TicBase &arg)=delete
 
TicBaseoperator= (TicBase &&arg) noexcept
 Default move-assignment operator.
 
 ~TicBase (void) override
 Default destructor.
 
 TicBase (void)
 Default constructor.
 
const ChildElements & GetChildElements (void) const
 Returns all childs of this element. More...
 
void ReadTic (TicReader &reader) final
 This operation shall be implemented by all classes which should read its context from Tic files. More...
 
void WriteTic (TicWriter &writer) final
 This method is currently not implemented and should not be used. More...
 
virtual bool TryReadAttribute (TicReader &reader, const String &attributeName)
 This operation is called every time an attribute is read. More...
 
virtual bool TryCreateElement (const String &elementName, ChildPtr &result)
 Factory method to create child elements. More...
 
virtual bool TryReadCustomAttribute (TicReader &reader, const String &attributeName)
 This operation is called every time an attribute is read. More...
 
virtual bool TryCreateCustomElement (const String &elementName, ChildPtr &result)
 Factory method to create child elements. More...
 
virtual void OnReadEnd (void)
 Validates the content of the current element. More...
 
Impl & GetImpl (void)
 For internal use only.
 
const Impl & GetImpl (void) const
 
- Public Member Functions inherited from Arp::Io::Commons::Configuration::ITicSerializable
 ITicSerializable (void)=default
 Constructs an ITicSerializable instance.
 
 ITicSerializable (const ITicSerializable &arg)=default
 Copy constructor.
 
 ITicSerializable (ITicSerializable &&arg) noexcept=default
 Move constructor.
 
ITicSerializableoperator= (const ITicSerializable &arg)=default
 Copy-assignment operator.
 
ITicSerializableoperator= (ITicSerializable &&arg) noexcept=default
 Move-assignment operator.
 
virtual ~ITicSerializable (void)=default
 Destructs this instance and frees all resources.
 
virtual void ReadTic (TicReader &reader)=0
 This operation shall be implemented to read the content from Tic documents. More...
 
virtual void WriteTic (TicWriter &writer)=0
 This operation shall be implemented to write the content to Tic documents. More...
 

Static Public Member Functions

static const char * GetTicElementName (void)
 

Detailed Description

This class is used to read a entity of the type 'IO:StructDefinition' from a TIC file.

The entity IO:StructDefinition contains the definition of a custom struct. The struct definition defines an explicit layout. All field definitions data sizes must fit into the total length.

Constructor & Destructor Documentation

◆ TicStructDefinition()

Arp::Io::Commons::Configuration::TicStructDefinition::TicStructDefinition ( TicStructDefinition &&  arg)
defaultnoexcept

The default move constructor.

Parameters
argThe argument to move.

Member Function Documentation

◆ CreateTypeDefinition()

TicStructDefinition::TypeDefinition Arp::Io::Commons::Configuration::TicStructDefinition::CreateTypeDefinition ( ) const

Creates an instance of type TypeDefinition

Returns
Created TypeDefinition

◆ GetImpl()

const TicStructDefinition::Impl & Arp::Io::Commons::Configuration::TicStructDefinition::GetImpl ( void  )

For internal use only.

Returns
The impl instance.

◆ GetLength()

TicStructDefinition::BitSize Arp::Io::Commons::Configuration::TicStructDefinition::GetLength ( void  ) const

Returns the total length of the structure

Bit granular data structure lengths are currently not supported.

Returns
Length

◆ GetTypeName()

const String & Arp::Io::Commons::Configuration::TicStructDefinition::GetTypeName ( ) const

Returns the name of the struct.

Returns
Name

◆ OnReadEnd()

void Arp::Io::Commons::Configuration::TicStructDefinition::OnReadEnd ( void  )
overridevirtual

Validates the content of the current element.

Reimplemented from Arp::Io::Commons::Configuration::TicBase.

◆ operator=()

TicStructDefinition & Arp::Io::Commons::Configuration::TicStructDefinition::operator= ( TicStructDefinition &&  arg)
defaultnoexcept

The default move-assignment operator.

Parameters
argThe argument to move.
Returns
This instance.

◆ TryCreateElement()

bool Arp::Io::Commons::Configuration::TicStructDefinition::TryCreateElement ( const String elementName,
ChildPtr &  result 
)
finalvirtual

Factory method to create child elements.

Reimplemented from Arp::Io::Commons::Configuration::TicBase.

◆ TryReadAttribute()

bool Arp::Io::Commons::Configuration::TicStructDefinition::TryReadAttribute ( TicReader reader,
const String attributeName 
)
finalvirtual

This operation is called every time an attribute is read.

Reimplemented from Arp::Io::Commons::Configuration::TicBase.


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