106 #include <type_traits> 120 template<
unsigned nBits>
123 template<
unsigned nBits>
126 template<
unsigned nBits>
127 Ostream& operator<<(Ostream&, const PackedList<nBits>&);
150 template<
unsigned nBits=1>
154 private List<unsigned int>
158 typedef unsigned int StorageType;
164 inline static label packedLength(
const label);
167 inline static unsigned int readValue(
Istream&);
183 nBits && nBits <= (
sizeof(StorageType) << 2),
184 "nBits must be positive (non-zero) and fit within the storage" 199 inline static unsigned int max_bits();
203 inline static unsigned int max_value();
206 inline static unsigned int packing();
209 inline static unsigned int maskLower(
unsigned offset);
254 inline label capacity()
const;
257 inline label size()
const;
260 inline bool empty()
const;
264 inline unsigned int get(
const label)
const;
269 inline bool set(
const label,
const unsigned int val = ~0u);
273 inline bool unset(
const label);
283 inline label packedLength()
const;
287 inline std::streamsize byteSize()
const;
292 unsigned int count()
const;
325 inline void setCapacity(
const label);
329 inline void resize(
const label,
const unsigned int& val = 0u);
332 inline void setSize(
const label,
const unsigned int& val = 0u);
338 inline void reserve(
const label);
345 inline void clearStorage();
348 inline void shrink();
377 const bool indexedOutput=
false 387 inline unsigned int remove();
391 inline unsigned int operator[](
const label)
const;
396 inline iteratorBase operator[](
const label);
399 inline void operator=(
const unsigned int val);
438 inline unsigned int get()
const;
441 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>
The iterator class used for PackedList.
tmp< fvMatrix< Type > > operator*(const volScalarField::Internal &, const fvMatrix< Type > &)
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)...
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
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 &)
A dynamically allocatable list of packed unsigned integers.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
Istream & operator>>(Istream &, directionInfo &)
triSurfaceToAgglom resize(surfacesMesh.size())
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
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...
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
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 &)