Public Types | Public Member Functions | Static Public Attributes | List of all members
boolVector Class Reference

Specialized bundling of boolean values as a vector of 3 components, element access using x(), y() and z() member functions. It also has some methods similar to bitSet. More...

Inheritance diagram for boolVector:
Inheritance graph
[legend]
Collaboration diagram for boolVector:
Collaboration graph
[legend]

Public Types

enum  components { X, Y, Z }
 
- Public Types inherited from FixedList< bool, 3 >
typedef T value_type
 
typedef Tpointer
 
typedef Treference
 
typedef Titerator
 
typedef label size_type
 
typedef label difference_type
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 

Public Member Functions

 boolVector (const boolVector &)=default
 
boolVectoroperator= (const boolVector &)=default
 
 boolVector (boolVector &&)=default
 
boolVectoroperator= (boolVector &&)=default
 
 boolVector ()
 
 boolVector (const bool val)
 
 boolVector (const bool vx, const bool vy, const bool vz)
 
 boolVector (Istream &is)
 
bool all () const
 
bool any () const
 
bool none () const
 
unsigned int count (const bool on=true) const
 
bool x () const
 
bool y () const
 
bool z () const
 
boolx ()
 
booly ()
 
boolz ()
 
void flip ()
 
void operator= (const bool value)
 
- Public Member Functions inherited from FixedList< bool, 3 >
void writeEntry (const word &keyword, Ostream &os) const
 
 FixedList ()=default
 
 FixedList (const T &val)
 
 FixedList (const Foam::zero)
 
 FixedList (const T list[N])
 
 FixedList (const FixedList< T, N > &list)
 
 FixedList (FixedList< T, N > &&list)
 
 FixedList (std::initializer_list< T > list)
 
 FixedList (const UList< T > &list)
 
 FixedList (const FixedList< T, AnyNum > &list, const FixedList< label, N > &indices)
 
 FixedList (const UList< T > &list, const FixedList< label, N > &indices)
 
 FixedList (const SLList< T > &list)
 
 FixedList (Istream &is)
 
autoPtr< FixedList< T, N > > clone () const
 
const Tcdata () const noexcept
 
Tdata () noexcept
 
const char * cdata_bytes () const noexcept
 
char * data_bytes () noexcept
 
Tfirst () noexcept
 
const Tfirst () const noexcept
 
Tlast () noexcept
 
const Tlast () const noexcept
 
label fcIndex (const label i) const
 
const TfcValue (const label i) const
 
TfcValue (const label i)
 
label rcIndex (const label i) const
 
const TrcValue (const label i) const
 
TrcValue (const label i)
 
void checkStart (const label start) const
 
void checkSize (const label size) const
 
void checkIndex (const label i) const
 
bool uniform () const
 
label find (const T &val, label pos=0) const
 
label rfind (const T &val, label pos=-1) const
 
bool found (const T &val, label pos=0) const
 
void resize (const label n)
 
void resize_nocopy (const label n)
 
void setSize (const label n)
 
void fill (const T &val)
 
void fill (const Foam::zero)
 
void moveFirst (const label i)
 
void moveLast (const label i)
 
void swapFirst (const label i)
 
void swapLast (const label i)
 
void transfer (FixedList< T, N > &list)
 
Toperator[] (const label i)
 
const Toperator[] (const label i) const
 
void operator= (const T list[N])
 
void operator= (const UList< T > &list)
 
void operator= (const SLList< T > &list)
 
void operator= (std::initializer_list< T > list)
 
void operator= (const T &val)
 
void operator= (const Foam::zero)
 
void operator= (const FixedList< T, N > &list)
 
void operator= (FixedList< T, N > &&list)
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
void swap (FixedList< T, N > &other)
 
bool operator== (const FixedList< T, N > &list) const
 
bool operator!= (const FixedList< T, N > &list) const
 
bool operator< (const FixedList< T, N > &list) const
 
bool operator> (const FixedList< T, N > &list) const
 
bool operator<= (const FixedList< T, N > &list) const
 
bool operator>= (const FixedList< T, N > &list) const
 
IstreamreadList (Istream &is)
 
OstreamwriteList (Ostream &os, const label shortLen=0) const
 

Static Public Attributes

static constexpr direction rank = 1
 

Additional Inherited Members

- Static Public Member Functions inherited from FixedList< bool, 3 >
static const FixedList< T, N > & null ()
 
static std::streamsize size_bytes () noexcept
 
static std::streamsize byteSize ()
 
static constexpr bool empty () noexcept
 
static constexpr label size () noexcept
 
static constexpr unsigned max_size () noexcept
 
- Public Attributes inherited from FixedList< bool, 3 >
const typedef Tconst_pointer
 
const typedef Tconst_reference
 
const typedef Tconst_iterator
 
- Protected Member Functions inherited from FixedList< bool, 3 >
void writeEntry (Ostream &os) const
 

Detailed Description

Specialized bundling of boolean values as a vector of 3 components, element access using x(), y() and z() member functions. It also has some methods similar to bitSet.

Note
The boolVector is not derived from Vector or VectorSpace since it does not share very many vector-like characteristics.
Source files

Definition at line 52 of file boolVector.H.

Member Enumeration Documentation

◆ components

enum components
Enumerator

Definition at line 64 of file boolVector.H.

Constructor & Destructor Documentation

◆ boolVector() [1/6]

boolVector ( const boolVector )
default

◆ boolVector() [2/6]

boolVector ( boolVector &&  )
default

◆ boolVector() [3/6]

boolVector ( )
inline

Definition at line 23 of file boolVectorI.H.

◆ boolVector() [4/6]

boolVector ( const bool  val)
inlineexplicit

Definition at line 29 of file boolVectorI.H.

◆ boolVector() [5/6]

boolVector ( const bool  vx,
const bool  vy,
const bool  vz 
)
inline

Definition at line 36 of file boolVectorI.H.

References x, and y.

◆ boolVector() [6/6]

boolVector ( Istream is)
inlineexplicit

Definition at line 50 of file boolVectorI.H.

Member Function Documentation

◆ operator=() [1/3]

boolVector& operator= ( const boolVector )
default

◆ operator=() [2/3]

boolVector& operator= ( boolVector &&  )
default

◆ all()

bool all ( ) const
inline

Definition at line 58 of file boolVectorI.H.

◆ any()

bool any ( ) const
inline

Definition at line 68 of file boolVectorI.H.

◆ none()

bool none ( ) const
inline

Definition at line 78 of file boolVectorI.H.

References Foam::BitOps::any().

Here is the call graph for this function:

◆ count()

unsigned int count ( const bool  on = true) const
inline

Definition at line 84 of file boolVectorI.H.

◆ x() [1/2]

bool & x ( ) const
inline

Definition at line 103 of file boolVectorI.H.

References boolVector::X.

Referenced by NURBS3DVolume::confineControlPoint().

Here is the caller graph for this function:

◆ y() [1/2]

bool & y ( ) const
inline

Definition at line 104 of file boolVectorI.H.

References boolVector::Y.

Referenced by NURBS3DVolume::confineControlPoint().

Here is the caller graph for this function:

◆ z() [1/2]

bool & z ( ) const
inline

Definition at line 105 of file boolVectorI.H.

References boolVector::Z.

Referenced by NURBS3DVolume::confineControlPoint().

Here is the caller graph for this function:

◆ x() [2/2]

bool& x ( )
inline

◆ y() [2/2]

bool& y ( )
inline

◆ z() [2/2]

bool& z ( )
inline

◆ flip()

void flip ( )
inline

Definition at line 112 of file boolVectorI.H.

◆ operator=() [3/3]

void operator= ( const bool  value)
inline

Definition at line 123 of file boolVectorI.H.

References FixedList::operator=().

Here is the call graph for this function:

Member Data Documentation

◆ rank

constexpr direction rank = 1
staticconstexpr

Definition at line 61 of file boolVector.H.


The documentation for this class was generated from the following files: