MDF Lib 2.2
Interface against MDF 3/4 files
Loading...
Searching...
No Matches
mdf::IChannelArray Class Referenceabstract

Defines an interface against an array (CA) block. More...

#include <ichannelarray.h>

Inheritance diagram for mdf::IChannelArray:
Collaboration diagram for mdf::IChannelArray:

Public Member Functions

virtual void Type (ArrayType type)=0
 Sets the type of array..
 
virtual ArrayType Type () const =0
 Type of array.
 
virtual void Storage (ArrayStorage storage)=0
 Storage type.
 
virtual ArrayStorage Storage () const =0
 Storage type.
 
virtual void Flags (uint32_t flags)=0
 Flags.
 
virtual uint32_t Flags () const =0
 Flags.
 
virtual size_t Dimensions () const =0
 Number of dimensions.
 
virtual void Shape (const std::vector< uint64_t > &dim_sizes)=0
 Sets the dimension and each dimension size.
 
virtual const std::vector< uint64_t > & Shape () const =0
 Returns the dimension and each dimension size.
 
virtual uint64_t DimensionSize (size_t dimension) const =0
 Returns a dimension size.
 
virtual const std::vector< double > & AxisValues () const =0
 Returns the fixed axis value list for reading only.
 
virtual std::vector< double > & AxisValues ()=0
 Returns the fixed axis value list for write.
 
virtual const std::vector< uint64_t > & CycleCounts () const =0
 Returns a list of cycle counts.
 
virtual std::vector< uint64_t > & CycleCounts ()=0
 Returns a list of cycle counts.
 
uint64_t NofArrayValues () const
 Returns the number of values in the array.
 
std::string DimensionAsString () const
 Returns the array dimensions as string ("N[2][3]")
 
virtual void ResizeArrays ()
 Converts the array link indexes into pointers.
 
const std::vector< int64_t > & DataLinks () const
 Returns a list of data kink indexes.
 
std::vector< int64_t > & DataLinks ()
 Returns a list of data kink indexes.
 
const std::vector< CaTripleReference > & DynamicSizeList () const
 Returns the dynamic size list.
 
std::vector< CaTripleReference > & DynamicSizeList ()
 Returns the dynamic size list.
 
const std::vector< CaTripleReference > & InputQuantityList () const
 Returns the input quantity list.
 
std::vector< CaTripleReference > & InputQuantityList ()
 Returns the input quantity list.
 
const CaTripleReferenceOutputQuantity () const
 Returns the output quantity reference if it exist.
 
CaTripleReferenceOutputQuantity ()
 Returns the output quantity reference if it exist.
 
const CaTripleReferenceComparisonQuantity () const
 Returns the comparison quantity list.
 
CaTripleReferenceComparisonQuantity ()
 Returns the comparison quantity list.
 
const std::vector< const IChannelConversion * > & AxisConversionList () const
 Returns the axis conversion list.
 
std::vector< const IChannelConversion * > & AxisConversionList ()
 Returns the axis conversion list.
 
const std::vector< CaTripleReference > & AxisList () const
 Returns the axis list.
 
std::vector< CaTripleReference > & AxisList ()
 Returns the axis list.
 
virtual uint64_t SumOfArray () const =0
 Summation of all array dimensions.
 
virtual uint64_t ProductOfArray () const =0
 Calculates the product of array dimension sizes.
 
- Public Member Functions inherited from mdf::IBlock
virtual ~IBlock ()=default
 Default destructor.
 
virtual int64_t Index () const =0
 File position within the file.
 
virtual std::string BlockType () const =0
 Returns the block type.
 

Protected Attributes

std::vector< int64_t > data_links_
 List of index to data blocks.
 
std::vector< CaTripleReferencedynamic_size_list_
 Dynamic size list.
 
std::vector< CaTripleReferenceinput_quantity_list_
 Input quantity list.
 
CaTripleReference output_quantity_
 Output quantity list.
 
CaTripleReference comparison_quantity_
 Comparison quantity list.
 
std::vector< const IChannelConversion * > axis_conversion_list_
 Axis_conversion list.
 
std::vector< CaTripleReferenceaxis_list_
 Axis list.
 

Detailed Description

This interface class defines an array of channel values. A channel (CN) block is defined as an array by appending a channel array (CA) block. The CN block defines an array value while the CA block defines the array dimension and its size(s).

Member Function Documentation

◆ DimensionAsString()

std::string mdf::IChannelArray::DimensionAsString ( ) const
nodiscard
Returns
Array dimension as a string.

◆ NofArrayValues()

uint64_t mdf::IChannelArray::NofArrayValues ( ) const
nodiscard
Returns
Number of values in the array

◆ ProductOfArray()

virtual uint64_t mdf::IChannelArray::ProductOfArray ( ) const
nodiscardpure virtual

Returns the product of array sizes. This defines number of values in an array sample.

Returns
Number of array values in a sample.

◆ ResizeArrays()

virtual void mdf::IChannelArray::ResizeArrays ( )
virtual

This function can be called before setting any of the link lists on the array object. It must be called later after the block have been configured i.e. sized and all flags have been set.

Note that this is a convenient function. It is possible to do it manual as well.

◆ Shape() [1/2]

virtual const std::vector< uint64_t > & mdf::IChannelArray::Shape ( ) const
nodiscardpure virtual
Returns
Array of dimension sizes.

◆ Shape() [2/2]

virtual void mdf::IChannelArray::Shape ( const std::vector< uint64_t > & dim_sizes)
pure virtual

The function sets the number of dimensions and each dimension size.

Parameters
dim_sizesArray of dimension sizes.

◆ SumOfArray()

virtual uint64_t mdf::IChannelArray::SumOfArray ( ) const
nodiscardpure virtual

Support function that summarizes the dimension sizes. This function is mainly used internally to size

Returns

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