PLCnext API Documentation 25.0.2.69
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
Arp::Plc::Commons::Meta::ArrayDimensions Class Reference

Provide array information. More...

#include <ArrayDimensions.hpp>

Public Types

using Values = std::vector< ArrayDimension >
 

Public Member Functions

 ArrayDimensions (void)=default
 Constructs an ArrayDimension instance.
 
 ArrayDimensions (size_t count)
 Constructs an ArrayDimension instance.
 
 ArrayDimensions (const ArrayDimension &entry)
 Constructs an ArrayDimension instance.
 
 ArrayDimensions (const Values &values)
 Constructs an ArrayDimension instance.
 
 ArrayDimensions (const std::initializer_list< int > &dimensions)
 Constructs an ArrayDimension instance.
 
 ArrayDimensions (const std::initializer_list< ArrayDimension > &entries)
 Constructs an ArrayDimension instance.
 
 ArrayDimensions (const ArrayDimensions &arg)=default
 Copy constructor.
 
 ArrayDimensions (ArrayDimensions &&arg) noexcept=default
 Move constructor.
 
ArrayDimensionsoperator= (const ArrayDimensions &arg)=default
 Copy assignment operator.
 
ArrayDimensionsoperator= (ArrayDimensions &&arg) noexcept=default
 Move assignment operator.
 
 ~ArrayDimensions (void) noexcept=default
 Destructs this instance and frees all resources.
 
ArrayDimensionoperator[] (size_t index)
 
const ArrayDimensionoperator[] (size_t index) const
 
bool IsEmpty (void) const
 
size_t GetCount (void) const
 Get the number of array dimensions for this vector element. More...
 
const Values & GetValues (void) const
 
size_t GetCacheSize (void) const
 Get the cache size More...
 
size_t GetDimensionsProduct (void) const
 Gets the element count total. More...
 
void Append (const ArrayDimension &dimension)
 

Static Public Attributes

static const ArrayDimensions Empty
 

Protected Member Functions

void EraseFrontDimension (void)
 

Friends

class ArrayNavigator
 

Detailed Description

Provide array information.

Member Function Documentation

◆ GetCacheSize()

size_t Arp::Plc::Commons::Meta::ArrayDimensions::GetCacheSize ( void  ) const

Get the cache size

Returns
Number of using cache size

◆ GetCount()

size_t Arp::Plc::Commons::Meta::ArrayDimensions::GetCount ( void  ) const

Get the number of array dimensions for this vector element.

Returns
Number of array dimensions.

◆ GetDimensionsProduct()

size_t Arp::Plc::Commons::Meta::ArrayDimensions::GetDimensionsProduct ( void  ) const

Gets the element count total.

Returns
Inner product of all dimensions which is the total of all elements in the array.

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