106 #include <type_traits> 120 template<
unsigned nBits>
122 template<
unsigned nBits>
123 Ostream& operator<<(Ostream&, const PackedList<nBits>&);
146 template<
unsigned nBits=1>
150 private List<unsigned int>
154 typedef unsigned int StorageType;
160 inline static label packedLength(
const label);
163 inline static unsigned int readValue(
Istream&);
179 nBits && nBits <= (
sizeof(StorageType) << 2),
180 "nBits must be positive (non-zero) and fit within the storage" 195 inline static unsigned int max_bits();
199 inline static unsigned int max_value();
202 inline static unsigned int packing();
205 inline static unsigned int maskLower(
unsigned offset);
250 inline label capacity()
const;
253 inline label size()
const;
256 inline bool empty()
const;
260 inline unsigned int get(
const label)
const;
265 inline bool set(
const label,
const unsigned int val = ~0u);
269 inline bool unset(
const label);
279 inline label packedLength()
const;
283 inline std::streamsize byteSize()
const;
288 unsigned int count()
const;
321 inline void setCapacity(
const label);
325 inline void resize(
const label,
const unsigned int& val = 0u);
328 inline void setSize(
const label,
const unsigned int& val = 0u);
334 inline void reserve(
const label);
341 inline void clearStorage();
344 inline void shrink();
376 const bool indexedOutput=
false 381 void writeEntry(
Ostream&)
const;
384 void writeEntry(
const word& keyword,
Ostream&)
const;
393 inline unsigned int remove();
397 inline unsigned int operator[](
const label)
const;
402 inline iteratorBase operator[](
const label);
405 inline void operator=(
const unsigned int val);
441 inline unsigned int get()
const;
444 inline bool set(
unsigned int);
461 inline label key()
const;
465 inline bool writeIfSet(
Ostream&)
const;
479 inline void operator=(
const unsigned int val);
483 inline operator unsigned int ()
const;
535 inline unsigned int operator()()
const;
596 inline unsigned int operator()()
const;
621 friend Istream&
operator>> <nBits>
627 friend Ostream& operator<< <nBits>
A simple container for copying or transferring objects of type <T>.
The iterator class used for PackedList.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
T * iterator
Random access iterator for traversing UList.
ClassName("PackedList")
Define template name and debug.
string trim(const string &)
Return string trimmed of leading and trailing whitespace.
points setSize(newPointi)
bool read(const char *, int32_t &)
tmp< fvMatrix< Type > > operator*(const volScalarField::Internal &, const fvMatrix< Type > &)
A dynamically allocatable list of packed unsigned integers.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
A class for handling words, derived from string.
Istream & operator>>(Istream &, directionInfo &)
triSurfaceToAgglom resize(surfacesMesh.size())
PackedListCore()
Construct null.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Template-invariant bits for PackedList.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
The const_iterator for PackedList.
The iterator base for PackedList.
const T * const_iterator
Random access iterator for traversing UList.
A List with indirect addressing.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
bool operator!=(const particle &, const particle &)