Go to the documentation of this file.
55 template<
class T, label Offset>
58 template<
class T, label Offset>
64 template<
class T, label Offset>
75 template<
class T, label Offset = 19>
209 friend Ostream& operator<< <T, Offset>
216 friend Istream&
operator>> <
T, Offset>
void appendFromStream(Istream &)
Read from stream and append to the current content.
T & newElmt(const label)
return a non-const access to an element,
void initializeParameters()
initialize width and mask
void append(const T &e)
Append an element at the end of the list.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A class for handling words, derived from string.
T & operator()(const label)
Return non-const access to an element,.
void clear()
Clear the list, i.e. set next free to zero.
LongList< T, Offset > & shrink()
Shrink the list to the number of elements used.
void clearOut()
delete all elements
label containsAtPosition(const T &e) const
label size() const
Size of the active part of the list.
void checkIndex(const label i) const
check index
label nextFree_
number of elements in the list
void setSize(const label)
Reset size of List.
label N_
number of allocated elements
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void writeEntry(Ostream &os) const
Write as a dictionary entry.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void transfer(LongList< T, Offset > &)
transfer the list from another one without allocating it
const T & operator[](const label i) const
get and set operators
LongList()
Construct null.
void operator=(const T &)
Assignment of all entries to the given value.
const double e
Elementary charge.
label numBlocks_
number of used blocks of data
T remove(const label i)
Return and remove the element.
void appendIfNotIn(const T &e)
label byteSize() const
Return the binary size in number of characters of the UList.
bool contains(const T &e) const
check if the element is in the list (takes linear time)
void allocateSize(const label)
Allocate memory for the list.
T ** dataPtr_
array of pointers to the blocks of data, each of the size WIDTH
label numAllocatedBlocks_
An Ostream is an abstract base class for all output systems (streams, files, token lists,...