105 #include <type_traits> 119 template<
unsigned nBits>
122 template<
unsigned nBits>
125 template<
unsigned nBits>
126 Ostream& operator<<(Ostream&, const PackedList<nBits>&);
149 template<
unsigned nBits=1>
153 private List<unsigned int>
157 typedef unsigned int StorageType;
163 inline static label packedLength(
const label);
166 inline static unsigned int readValue(
Istream&);
182 nBits && nBits <= (
sizeof(StorageType) << 2),
183 "nBits must be positive (non-zero) and fit within the storage" 198 inline static unsigned int max_bits();
202 inline static unsigned int max_value();
205 inline static unsigned int packing();
208 inline static unsigned int maskLower(
unsigned offset);
253 inline label capacity()
const;
256 inline label size()
const;
259 inline bool empty()
const;
263 inline unsigned int get(
const label)
const;
268 inline bool set(
const label,
const unsigned int val = ~0u);
272 inline bool unset(
const label);
282 inline label packedLength()
const;
286 inline std::streamsize byteSize()
const;
291 unsigned int count()
const;
324 inline void setCapacity(
const label);
328 inline void resize(
const label,
const unsigned int& val = 0u);
331 inline void setSize(
const label,
const unsigned int& val = 0u);
337 inline void reserve(
const label);
344 inline void clearStorage();
347 inline void shrink();
376 const bool indexedOutput=
false 386 inline unsigned int remove();
390 inline unsigned int operator[](
const label)
const;
395 inline iteratorBase operator[](
const label);
398 inline void operator=(
const unsigned int val);
437 inline unsigned int get()
const;
440 inline bool set(
unsigned int);
463 inline label key()
const;
467 inline bool writeIfSet(
Ostream&)
const;
481 inline void operator=(
const unsigned int val);
485 inline operator unsigned int ()
const;
537 inline unsigned int operator()()
const;
598 inline unsigned int operator()()
const;
623 friend Istream&
operator>> <nBits>
629 friend Ostream& operator<< <nBits>
The iterator class used for PackedList.
tmp< fvMatrix< Type > > operator*(const volScalarField::Internal &, const fvMatrix< Type > &)
FvWallInfoData< WallInfo, label > 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 &)