Public Types | Public Member Functions | Private Attributes | List of all members
ecl::blueprints::ConstantArray< Type, Size > Class Template Reference

Blueprint for instantiating/configuring an array filled with a constant. More...

#include <array_no_mem_check.hpp>

Public Types

typedef ecl::Array< Type, Size > base_type
 Abstract representation of the class to be instantiated/configured. More...
 

Public Member Functions

void apply (base_type &array) const
 
 ConstantArray (const Type &value=0)
 Constructor that properly configures/initialises the blueprint. More...
 
base_type instantiate ()
 Instantiate a copy of the object that is blueprinted. More...
 
virtual ~ConstantArray ()
 

Private Attributes

const Type & val
 

Detailed Description

template<typename Type, size_t Size>
class ecl::blueprints::ConstantArray< Type, Size >

Blueprint for instantiating/configuring an array filled with a constant.

Implements the BluePrint concept for instantiating/configuring an array filled with a constant.

See also
Array.

Definition at line 61 of file array_no_mem_check.hpp.

Member Typedef Documentation

◆ base_type

template<typename Type , size_t Size>
typedef ecl::Array<Type,Size> ecl::blueprints::ConstantArray< Type, Size >::base_type

Abstract representation of the class to be instantiated/configured.

Definition at line 471 of file array_no_mem_check.hpp.

Constructor & Destructor Documentation

◆ ConstantArray()

template<typename Type , size_t Size>
ecl::blueprints::ConstantArray< Type, Size >::ConstantArray ( const Type &  value = 0)
inline

Constructor that properly configures/initialises the blueprint.

This constructor saves the input parameters to use when generating the instance later.

Parameters
value: the constant value to fill the array with (defaults to zero).

Definition at line 480 of file array_no_mem_check.hpp.

◆ ~ConstantArray()

template<typename Type , size_t Size>
virtual ecl::blueprints::ConstantArray< Type, Size >::~ConstantArray ( )
inlinevirtual

Definition at line 482 of file array_no_mem_check.hpp.

Member Function Documentation

◆ apply()

template<typename Type , size_t Size>
void ecl::blueprints::ConstantArray< Type, Size >::apply ( base_type array) const
inline

Fill all elements of an existing array with a constant value.

Parameters
array: the array to fill.

Definition at line 504 of file array_no_mem_check.hpp.

◆ instantiate()

template<typename Type , size_t Size>
base_type ecl::blueprints::ConstantArray< Type, Size >::instantiate ( )
inline

Instantiate a copy of the object that is blueprinted.

Instantiates a new array configured with a constant value. Take care not to use this in assignment, as it will do a costly copy of the entire array. It is, however, fine to use when constructing as the copy constructor will simply use this copy for the constructing object.

Returns
Array<Type,Size> : a copy of the array.

Definition at line 494 of file array_no_mem_check.hpp.

Member Data Documentation

◆ val

template<typename Type , size_t Size>
const Type& ecl::blueprints::ConstantArray< Type, Size >::val
private

Definition at line 509 of file array_no_mem_check.hpp.


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


ecl_containers
Author(s): Daniel Stonier
autogenerated on Sun Aug 2 2020 03:12:14