Public Types

Assignment< Array, i > Class Template Reference

Convenience class to allow using the comma operator for assigning a sequence of elements to a given array-like class. More...

#include <ocean/eagle/Assignment.hpp>

List of all members.

Public Types


Detailed Description

template<class Array, int i>
class Assignment< Array, i >

Convenience class to allow using the comma operator for assigning a sequence of elements to a given array-like class.

This class does not provide an essential functionality, but is more for an easier (some might even call it decadent) writing of assigning values to an array.

Parameters:
Array An array class of fixed size (i.e., it is not applicable for dynamic arrays, such as the STL vector class. Altough this could be fixed easily, that is not the purpose of this class because comma-initialization only makes real sense for arrays with size known at compile-time); it must provide members as in the following example:

struct  MyArray
{
        typedef int value_type;
        enum { SIZE = 10 };

        int&operator[](int i);
};
i The element number to start initialization with. The comma operator yields an Assignment object which refers to the same Array object, but with increased element number.

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