PLCnext API Documentation 25.0.2.69
Public Types | Public Member Functions | Friends | List of all members
Arp::Io::Commons::Data::BufferInfo Class Reference

This class is used to store buffer parameters which are be used to create io buffer objects. More...

#include <BufferInfo.hpp>

Public Types

using Ptr = std::shared_ptr< BufferInfo >
 
using BufferSize = size_t
 

Public Member Functions

 BufferInfo (const BufferInfo &arg)
 Default copy constructor.
 
 BufferInfo (BufferInfo &&arg) noexcept
 Default move constructor.
 
BufferInfooperator= (const BufferInfo &arg)
 Default assignment operator.
 
BufferInfooperator= (BufferInfo &&arg) noexcept
 Default move-assignment operator.
 
 ~BufferInfo (void)
 Default destructor.
 
 BufferInfo (void)
 Default constructor.
 
 BufferInfo (const String &name, BufferSize size=0, BufferType type=BufferType::Data, Endianness endianness=Endianness::None)
 Constructs an BufferInfo instance. More...
 
const StringGetName (void) const
 Returns the buffer name. More...
 
BufferSize GetSize (void) const
 Returns the buffer size. More...
 
BufferType GetType (void) const
 Returns the buffer kind. More...
 
Endianness GetEndianness (void) const
 Returns the buffer endianness. More...
 
Impl & GetImpl (void)
 For internal use only.
 
const Impl & GetImpl (void) const
 

Friends

ARP_EXPORT friend bool operator== (const BufferInfo &lhs, const BufferInfo &rhs)
 Compares two buffer infos on equality. More...
 

Detailed Description

This class is used to store buffer parameters which are be used to create io buffer objects.

Constructor & Destructor Documentation

◆ BufferInfo()

Arp::Io::Commons::Data::BufferInfo::BufferInfo ( const String name,
BufferSize  size = 0,
BufferType  type = BufferType::Data,
Endianness  endianness = Endianness::None 
)
explicit

Constructs an BufferInfo instance.

Parameters
nameName of the buffer
sizeSize of the buffer
typeBufferKindKind of the buffer
endiannessEndiannessEndianness of the buffer data. If the endianness is set to None, the DataManager will use the default endianness of the IO component.

Member Function Documentation

◆ GetEndianness()

Endianness Arp::Io::Commons::Data::BufferInfo::GetEndianness ( void  ) const

Returns the buffer endianness.

Returns
The data endianness of the buffer

◆ GetName()

const String & Arp::Io::Commons::Data::BufferInfo::GetName ( void  ) const

Returns the buffer name.

Returns
The name of the buffer

◆ GetSize()

BufferInfo::BufferSize Arp::Io::Commons::Data::BufferInfo::GetSize ( void  ) const

Returns the buffer size.

Returns
The size of the buffer

◆ GetType()

BufferType Arp::Io::Commons::Data::BufferInfo::GetType ( void  ) const

Returns the buffer kind.

Returns
The kind of the buffer

Friends And Related Function Documentation

◆ operator==

ARP_EXPORT friend bool operator== ( const BufferInfo lhs,
const BufferInfo rhs 
)
friend

Compares two buffer infos on equality.

Parameters
lhsThe left operand to compare.
rhsThe right operand to compare.
Returns
true on equality, otherwise false.

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