Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::array< T, N > Class Template Reference

#include <array.hpp>

Public Member Functions

Toperator[] (size_t pos)
 
const Toperator[] (size_t pos) const
 
const Tbegin () const
 
const Tend () const
 
Tbegin ()
 
Tend ()
 
size_t size () const
 
Tat (size_t pos)
 
const Tat (size_t pos) const
 

Public Attributes

T data [N]
 

Detailed Description

template<typename T, size_t N>
class fc::array< T, N >

Provides a fixed size array that is easier for templates to specialize against or overload than T[N].

Definition at line 51 of file city.hpp.

Member Function Documentation

◆ at() [1/2]

template<typename T , size_t N>
T & fc::array< T, N >::at ( size_t pos)
inline

Checked indexing (when in debug build) that also simplifies dereferencing when you have an array<T,N>*.

Definition at line 21 of file array.hpp.

21{ FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
const int N
Definition quantize.cpp:54

◆ at() [2/2]

template<typename T , size_t N>
const T & fc::array< T, N >::at ( size_t pos) const
inline

Definition at line 22 of file array.hpp.

22{ FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }

◆ begin() [1/2]

template<typename T , size_t N>
T * fc::array< T, N >::begin ( )
inline

Definition at line 32 of file array.hpp.

32{ return &data[0]; }

◆ begin() [2/2]

template<typename T , size_t N>
const T * fc::array< T, N >::begin ( ) const
inline

Definition at line 29 of file array.hpp.

29{ return &data[0]; }
Here is the caller graph for this function:

◆ end() [1/2]

template<typename T , size_t N>
T * fc::array< T, N >::end ( )
inline

Definition at line 33 of file array.hpp.

33{ return &data[N]; }

◆ end() [2/2]

template<typename T , size_t N>
const T * fc::array< T, N >::end ( ) const
inline

Definition at line 30 of file array.hpp.

30{ return &data[N]; }
Here is the caller graph for this function:

◆ operator[]() [1/2]

template<typename T , size_t N>
T & fc::array< T, N >::operator[] ( size_t pos)
inline

Definition at line 25 of file array.hpp.

25{ FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }

◆ operator[]() [2/2]

template<typename T , size_t N>
const T & fc::array< T, N >::operator[] ( size_t pos) const
inline

Definition at line 26 of file array.hpp.

26{ FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }

◆ size()

template<typename T , size_t N>
size_t fc::array< T, N >::size ( ) const
inline

Definition at line 35 of file array.hpp.

35{ return N; }
Here is the caller graph for this function:

Member Data Documentation

◆ data

template<typename T , size_t N>
T fc::array< T, N >::data[N]

Definition at line 37 of file array.hpp.


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