45 #include <type_traits> 54 template<
class T,
unsigned Size>
class FixedList;
56 template<
class T,
unsigned Size>
59 template<
class T,
unsigned Size>
60 Ostream& operator<<(Ostream&, const FixedList<T, Size>&);
62 template<
class T>
class UList;
63 template<
class T>
class SLList;
70 template<
class T,
unsigned Size>
75 Size && Size <= INT_MAX,
76 "Size must be positive (non-zero) and also fit as a signed value" 89 template<
class HashT=Hash<T>>
152 inline const T*
cdata()
const;
163 inline const T&
first()
const;
169 inline const T&
last()
const;
253 inline iterator
begin();
256 inline iterator
end();
265 inline const_iterator
cbegin()
const;
268 inline const_iterator
cend()
const;
271 inline const_iterator
begin()
const;
274 inline const_iterator
end()
const;
283 inline reverse_iterator
rbegin();
286 inline reverse_iterator
rend();
295 inline const_reverse_iterator
crbegin()
const;
298 inline const_reverse_iterator
crend()
const;
301 inline const_reverse_iterator
rbegin()
const;
304 inline const_reverse_iterator
rend()
const;
316 inline bool empty()
const;
333 bool operator<(const FixedList<T, Size>&)
const;
339 bool operator<=(const FixedList<T, Size>&)
const;
348 friend Istream&
operator>> <
T, Size>
352 friend Ostream& operator<< <T, Size>
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the FixedList.
bool operator!=(const FixedList< T, Size > &) const
The opposite of the equality operation. Takes linear time.
label difference_type
The type that can represent the difference between any two.
static const FixedList< T, Size > & null()
Return a null FixedList.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const T & const_reference
Type that can be used for storing into.
A 1D vector of objects of type <T> with a fixed size <Size>.
void checkIndex(const label i) const
Check index i is within valid range (0 ... size-1).
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
T & reference
Type that can be used for storing into.
const_iterator cbegin() const
Return const_iterator to begin traversing the constant FixedList.
bool empty() const
Return true if the FixedList is empty (ie, size() is zero).
friend Ostream & operator(Ostream &, const FixedList< T, Size > &)
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the FixedList.
label size_type
The type that can represent the size of a FixedList.
void operator=(const T v[Size])
Assignment from array operator. Takes linear time.
const T * const_iterator
Random access iterator for traversing FixedList.
A class for handling words, derived from string.
T & operator[](const label)
Return element of FixedList.
const_iterator cend() const
Return const_iterator to end traversing the constant FixedList.
Istream & operator>>(Istream &, directionInfo &)
void transfer(const FixedList< T, Size > &)
Copy (not transfer) the argument contents.
T & first()
Return the first element of the list.
label max_size() const
Return size of the largest possible FixedList.
T & last()
Return the last element of the list.
Non-intrusive singly-linked list.
const T * const_reverse_iterator
Reverse iterator for reverse traversal of constant FixedList.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
label size() const
Return the number of elements in the FixedList.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void resize(const label)
Dummy resize function.
T * iterator
Random access iterator for traversing FixedList.
void swap(FixedList< T, Size > &)
Swap two FixedLists of the same type in constant time.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
iterator end()
Return an iterator to end traversing the FixedList.
iterator begin()
Return an iterator to begin traversing the FixedList.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void checkSize(const label size) const
Check size is within valid range (0 ... size).
FixedList()
Null constructor.
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing FixedList.
T value_type
Type of values the FixedList contains.
T * data()
Return a pointer to the first data element,.
bool operator==(const FixedList< T, Size > &) const
Equality operation on FixedLists of the same type.
bool operator>(const FixedList< T, Size > &) const
Compare two FixedLists lexicographically. Takes linear time.
void checkStart(const label start) const
Check start is within valid range (0 ... size-1).
void setSize(const label)
Dummy setSize function.
void writeEntry(Ostream &) const
Write the FixedList as a dictionary entry.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const_reverse_iterator crend() const
Return const_reverse_iterator to end reverse traversing FixedList.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
T * reverse_iterator
Reverse iterator for reverse traversal of FixedList.
const T * cdata() const
Return a const pointer to the first data element,.
bool operator>=(const FixedList< T, Size > &) const
Return true if !(a < b). Takes linear time.
autoPtr< FixedList< T, Size > > clone() const
Clone.