Partial template specialization for N = 0. More...
#include <FixedArray0.h>
Public Types | |
STL container requirements. | |
| typedef Types::value_type | value_type |
| The element type of the array. | |
| typedef Types::parameter_type | parameter_type |
| The parameter type for the value type. | |
| typedef Types::pointer | pointer |
| A pointer to an array element. | |
| typedef Types::const_pointer | const_pointer |
| A const pointer to an array element. | |
| typedef Types::iterator | iterator |
| An iterator in the array. | |
| typedef Types::const_iterator | const_iterator |
| A const iterator in the array. | |
| typedef Types::reference | reference |
| A reference to an array element. | |
| typedef Types::const_reference | const_reference |
| A const reference to an array element. | |
| typedef Types::size_type | size_type |
| The size type is a signed integer. | |
| typedef Types::difference_type | difference_type |
| Pointer difference type. | |
Public Member Functions | |
Constructors etc. | |
| FixedArray () | |
| Default constructor. Leave the data uninitialized. | |
| ~FixedArray () | |
| Trivial destructor. | |
| FixedArray (const FixedArray &x) | |
| Copy constructor. | |
| template<typename T2 > | |
| FixedArray (const FixedArray< 0, T2 > &x) | |
| Copy constructor for a FixedArray of different type. | |
| FixedArray (parameter_type x) | |
| Constructor. Specify the component. | |
| FixedArray (const void *vp) | |
| Constructor. Initialize from a C array. | |
Assignment operators. | |
| FixedArray & | operator= (const FixedArray &x) |
| Assignment operator. | |
| FixedArray & | operator= (parameter_type x) |
| Assignment operator. Assign from a value. | |
| template<typename T2 > | |
| FixedArray & | operator= (const FixedArray< 0, T2 > &x) |
| Assignment operator for a FixedArray of different type. | |
| template<typename T2 , bool A> | |
| FixedArray & | operator= (const Array< 1, T2, A > &x) |
| Assignment operator for an Array. | |
Accessors. | |
| const_iterator | begin () const |
| Return a const_iterator to the beginning of the data. | |
| const_iterator | end () const |
| Return a const_iterator to the end of the data. | |
| const_pointer | data () const |
| Return a const_pointer to the data. | |
| template<typename EqualityComparable > | |
| bool | has (const EqualityComparable &x) const |
Return true if this array has the element x. | |
| bool | is_sorted () const |
| Return true. | |
| template<class StrictWeakOrdering > | |
| bool | is_sorted (StrictWeakOrdering comp) const |
| Return true. | |
Manipulators. | |
| iterator | begin () |
| Return an iterator to the beginning of the data. | |
| iterator | end () |
| Return an iterator to the end of the data. | |
| pointer | data () |
| Return a pointer to the data. | |
| void | swap (FixedArray &x) |
| Swaps data with another FixedArray of the same size and type. | |
| void | negate () |
| Negate each component. | |
| void | fill (parameter_type value) |
Fill the array with the given value. | |
| template<typename InputIterator > | |
| void | copy (InputIterator start, InputIterator finish) |
| Copy the specified range into the array. | |
| void | sort () |
| Sort the elements of the array. | |
| template<class StrictWeakOrdering > | |
| void | sort (StrictWeakOrdering comp) |
| Sort the elements of the array. | |
Assignment operators with scalar operand. | |
| FixedArray & | operator+= (parameter_type x) |
| Add x to each component. | |
| FixedArray & | operator-= (parameter_type x) |
| Subtract x from each component. | |
| FixedArray & | operator*= (parameter_type x) |
Multiply each component by x. | |
| FixedArray & | operator/= (parameter_type x) |
Divide each component by x. | |
| FixedArray & | operator%= (parameter_type x) |
Mod each component by x. | |
| FixedArray & | operator<<= (const int offset) |
Left-shift each component by the offset. | |
| FixedArray & | operator>>= (const int offset) |
Right-shift each component by the offset. | |
Assignment operators with FixedArray operand. | |
| template<typename T2 > | |
| FixedArray & | operator+= (const FixedArray< 0, T2 > &x) |
| Add x to this. | |
| template<typename T2 > | |
| FixedArray & | operator-= (const FixedArray< 0, T2 > &x) |
| Subtract x from this. | |
| template<typename T2 > | |
| FixedArray & | operator*= (const FixedArray< 0, T2 > &x) |
| Multiply this by x. | |
| template<typename T2 > | |
| FixedArray & | operator/= (const FixedArray< 0, T2 > &x) |
| Divide this by x. | |
| template<typename T2 > | |
| FixedArray & | operator%= (const FixedArray< 0, T2 > &x) |
| Mod this by x. | |
Math functions. | |
| void | abs () |
Apply the absolute value ( ) to each array element. | |
| void | acos () |
Apply the inverse cosine ( ) to each array element. | |
| void | asin () |
Apply the inverse sine ( ) to each array element. | |
| void | atan () |
Apply the inverse tangent ( ) to each array element. | |
| void | ceil () |
Apply the ceiling function ( ) to each array element. | |
| void | cos () |
Apply the cosine ( ) to each array element. | |
| void | cosh () |
Apply the hyperbolic cosine ( ) to each array element. | |
| void | exp () |
Apply the exponential function ( ) to each array element. | |
| void | floor () |
Apply the floor function ( ) to each array element. | |
| void | log () |
Apply the natural logarithm ( ) to each array element. | |
| void | log10 () |
Apply the logarithm base 10 ( ) to each array element. | |
| void | sin () |
Apply the sine ( ) to each array element. | |
| void | sinh () |
Apply the hyperbolic sine ( ) to each array element. | |
| void | sqrt () |
Apply the square root ( ) to each array element. | |
| void | tan () |
Apply the tangent ( ) to each array element. | |
| void | tanh () |
Apply the hyperbolic tangent ( ) to each array element. | |
Static Public Member Functions | |
Static members. | |
| static size_type | size () |
| Return the size of the array. | |
| static bool | empty () |
| Return true if the array has zero size. | |
| static size_type | max_size () |
| Return the size of the largest possible FixedArray. | |
Partial template specialization for N = 0.
| typedef Types::size_type FixedArray< 0, T >::size_type |
The size type is a signed integer.
Having std::size_t (which is an unsigned integer) as the size type causes minor problems. Consult "Large Scale C++ Software Design" by John Lakos for a discussion of using unsigned integers in a class interface.
1.6.3