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. | |
Public Member Functions | |
void | apply (base_type &array) const |
ConstantArray (const Type &value=0) | |
Constructor that properly configures/initialises the blueprint. | |
base_type | instantiate () |
Instantiate a copy of the object that is blueprinted. | |
virtual | ~ConstantArray () |
Private Attributes | |
const Type & | val |
Blueprint for instantiating/configuring an array filled with a constant.
Implements the BluePrint concept for instantiating/configuring an array filled with a constant.
Definition at line 458 of file array_no_mem_check.hpp.
typedef ecl::Array<Type,Size> ecl::blueprints::ConstantArray< Type, Size >::base_type |
Abstract representation of the class to be instantiated/configured.
Definition at line 463 of file array_no_mem_check.hpp.
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.
value | : the constant value to fill the array with (defaults to zero). |
Definition at line 472 of file array_no_mem_check.hpp.
virtual ecl::blueprints::ConstantArray< Type, Size >::~ConstantArray | ( | ) | [inline, virtual] |
Definition at line 474 of file array_no_mem_check.hpp.
void ecl::blueprints::ConstantArray< Type, Size >::apply | ( | base_type & | array | ) | const [inline] |
Fill all elements of an existing array with a constant value.
array | : the array to fill. |
Definition at line 496 of file array_no_mem_check.hpp.
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.
Definition at line 486 of file array_no_mem_check.hpp.
const Type& ecl::blueprints::ConstantArray< Type, Size >::val [private] |
Definition at line 501 of file array_no_mem_check.hpp.