Public Types | Public Member Functions | Private Attributes
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>

Inheritance diagram for ecl::blueprints::ConstantArray< Type, Size >:
Inheritance graph
[legend]

List of all members.

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

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 458 of file array_no_mem_check.hpp.


Member Typedef Documentation

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 463 of file array_no_mem_check.hpp.


Constructor & Destructor Documentation

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 472 of file array_no_mem_check.hpp.

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

Definition at line 474 of file array_no_mem_check.hpp.


Member Function Documentation

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 496 of file array_no_mem_check.hpp.

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 486 of file array_no_mem_check.hpp.


Member Data Documentation

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

Definition at line 501 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 Thu Jun 6 2019 21:17:43