PLCnext API Documentation 25.6.0.37
|
This class is used to read a entity of the type 'IO:FieldDefinition' from an TIC file. More...
#include <TicFieldDefinition.hpp>
Public Types | |
using | Ptr = std::shared_ptr< TicFieldDefinition > |
using | DataType = Arp::Plc::Meta::Commons::DataType |
using | BitSize = Arp::Plc::Meta::Commons::BitSize |
using | ChildTypeDefinition = Arp::Plc::Meta::Commons::Io::ChildTypeDefinition |
![]() | |
using | Ptr = std::shared_ptr< TicBase > |
using | ChildPtr = ITicSerializable::Ptr |
using | ChildElements = std::vector< ChildPtr > |
![]() | |
using | Ptr = std::shared_ptr< ITicSerializable > |
Public Member Functions | |
TicFieldDefinition (void) | |
The default constructor. | |
TicFieldDefinition (const TicFieldDefinition &arg)=delete | |
TicFieldDefinition (TicFieldDefinition &&arg) noexcept | |
The default move constructor. More... | |
TicFieldDefinition & | operator= (const TicFieldDefinition &arg)=delete |
TicFieldDefinition & | operator= (TicFieldDefinition &&arg) noexcept |
The default move-assignment operator. More... | |
~TicFieldDefinition (void) override | |
The default destructor. | |
const String & | GetFieldName () const |
Returns the name of the field. More... | |
DataType | GetDataType () const |
Returns the field data type More... | |
const String & | GetTypeName () const |
Returns the type name of the struct type. Only allowed for DataType::Struct. More... | |
uint32 | GetArrayElementCount () const |
Returns the array element count. Optional. More... | |
BitSize | GetOffset () const |
Returns the offset of the field inside the struct definition. More... | |
ChildTypeDefinition | CreateChildTypeDefinition () const |
Creates an instance of type ChildTypeDefinition 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 |
![]() | |
TicBase (const TicBase &arg)=delete | |
TicBase (TicBase &&arg) noexcept | |
Default move constructor. | |
TicBase & | operator= (const TicBase &arg)=delete |
TicBase & | operator= (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 |
![]() | |
ITicSerializable (void)=default | |
Constructs an ITicSerializable instance. | |
ITicSerializable (const ITicSerializable &arg)=default | |
Copy constructor. | |
ITicSerializable (ITicSerializable &&arg) noexcept=default | |
Move constructor. | |
ITicSerializable & | operator= (const ITicSerializable &arg)=default |
Copy-assignment operator. | |
ITicSerializable & | operator= (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) |
This class is used to read a entity of the type 'IO:FieldDefinition' from an TIC file.
The entity IO:FieldDefinition defines a field of a custom data structure. The data type can be a FDCML type or another custom type. In this case, the optional attribute 'TypeName' must be used. The offset specifies the explicit position in the data structure. The offset and the length of the data type together must be less than or equal to the length of the structure.
|
defaultnoexcept |
The default move constructor.
arg | The argument to move. |
TicFieldDefinition::ChildTypeDefinition Arp::Io::Commons::Configuration::TicFieldDefinition::CreateChildTypeDefinition | ( | ) | const |
Creates an instance of type ChildTypeDefinition
uint32 Arp::Io::Commons::Configuration::TicFieldDefinition::GetArrayElementCount | ( | ) | const |
Returns the array element count. Optional.
TicFieldDefinition::DataType Arp::Io::Commons::Configuration::TicFieldDefinition::GetDataType | ( | void | ) | const |
Returns the field data type
const String & Arp::Io::Commons::Configuration::TicFieldDefinition::GetFieldName | ( | ) | const |
Returns the name of the field.
const TicFieldDefinition::Impl & Arp::Io::Commons::Configuration::TicFieldDefinition::GetImpl | ( | void | ) |
For internal use only.
TicFieldDefinition::BitSize Arp::Io::Commons::Configuration::TicFieldDefinition::GetOffset | ( | void | ) | const |
Returns the offset of the field inside the struct definition.
const String & Arp::Io::Commons::Configuration::TicFieldDefinition::GetTypeName | ( | ) | const |
Returns the type name of the struct type. Only allowed for DataType::Struct.
Bit granular data types like BitstringX are currently not supported.
|
overridevirtual |
Validates the content of the current element.
Reimplemented from Arp::Io::Commons::Configuration::TicBase.
|
defaultnoexcept |
The default move-assignment operator.
arg | The argument to move. |
|
finalvirtual |
Factory method to create child elements.
Reimplemented from Arp::Io::Commons::Configuration::TicBase.
|
finalvirtual |
This operation is called every time an attribute is read.
Reimplemented from Arp::Io::Commons::Configuration::TicBase.