LibreOffice
LibreOffice 25.2 SDK C/C++ API Reference
 
Loading...
Searching...
No Matches
com::sun::star::uno::Sequence< bool > Class Reference

#include <Sequence.h>

Public Types

typedef bool ElementType
 typedefs the element type of the sequence
 

Public Member Functions

 Sequence ()
 Default constructor: Creates an empty sequence.
 
 Sequence (const Sequence &rSeq)
 Copy constructor: Creates a copy of given sequence.
 
 Sequence (uno_Sequence *pSequence, __sal_NoAcquire dummy)
 Constructor: Takes over ownership of given sequence.
 
 Sequence (const bool *pElements, sal_Int32 len)
 Constructor: Creates a copy of given elements.
 
 Sequence (sal_Int32 len)
 Constructor: Creates a default constructed sequence of given length.
 
 ~Sequence ()
 Destructor: Releases sequence handle.
 
Sequenceoperator= (const Sequence &rSeq)
 Assignment operator: Acquires given sequence handle and releases previously set handle.
 
sal_Int32 getLength () const
 Gets length of the sequence.
 
bool hasElements () const
 Tests whether the sequence has elements, i.e.
 
const bool * getConstArray () const
 Gets a pointer to elements array for reading.
 
bool * getArray ()
 Gets a pointer to elements array for reading and writing.
 
bool * begin ()
 This function allows to use Sequence in standard algorithms, like std::find and others.
 
bool const * begin () const
 This function allows to use Sequence in standard algorithms, like std::find and others.
 
bool * end ()
 This function allows to use Sequence in standard algorithms, like std::find and others.
 
bool const * end () const
 This function allows to use Sequence in standard algorithms, like std::find and others.
 
bool & operator[] (sal_Int32 nIndex)
 Non-const index operator: Obtains a reference to element indexed at given position.
 
const bool & operator[] (sal_Int32 nIndex) const
 Const index operator: Obtains a reference to element indexed at given position.
 
bool operator== (const Sequence &rSeq) const
 Equality operator: Compares two sequences.
 
bool operator!= (const Sequence &rSeq) const
 Inequality operator: Compares two sequences.
 
void realloc (sal_Int32 nSize)
 Reallocates sequence to new length.
 
uno_Sequenceget () const
 Provides UNacquired sequence handle.
 

Member Typedef Documentation

◆ ElementType

typedef bool com::sun::star::uno::Sequence< bool >::ElementType

typedefs the element type of the sequence

Constructor & Destructor Documentation

◆ Sequence() [1/5]

com::sun::star::uno::Sequence< bool >::Sequence ( )
inline

Default constructor: Creates an empty sequence.

◆ Sequence() [2/5]

com::sun::star::uno::Sequence< bool >::Sequence ( const Sequence< bool > & rSeq)
inline

Copy constructor: Creates a copy of given sequence.

Parameters
rSeqanother sequence of same type

◆ Sequence() [3/5]

com::sun::star::uno::Sequence< bool >::Sequence ( uno_Sequence< bool > * pSequence,
__sal_NoAcquire dummy )
inline

Constructor: Takes over ownership of given sequence.

Parameters
pSequencea sequence
dummySAL_NO_ACQUIRE to force obvious distinction to other constructors

◆ Sequence() [4/5]

com::sun::star::uno::Sequence< bool >::Sequence ( const bool * pElements,
sal_Int32 len )
inline

Constructor: Creates a copy of given elements.

Parameters
pElementsan array of elements
lenlength of array

◆ Sequence() [5/5]

com::sun::star::uno::Sequence< bool >::Sequence ( sal_Int32 len)
inlineexplicit

Constructor: Creates a default constructed sequence of given length.

Parameters
leninitial sequence length

◆ ~Sequence()

Destructor: Releases sequence handle.

Last handle will destruct elements and free memory.

Member Function Documentation

◆ begin() [1/2]

bool * com::sun::star::uno::Sequence< bool >::begin ( )
inline

This function allows to use Sequence in standard algorithms, like std::find and others.

Since
LibreOffice 4.2

◆ begin() [2/2]

bool const * com::sun::star::uno::Sequence< bool >::begin ( ) const
inline

This function allows to use Sequence in standard algorithms, like std::find and others.

Since
LibreOffice 4.2

◆ end() [1/2]

bool * com::sun::star::uno::Sequence< bool >::end ( )
inline

This function allows to use Sequence in standard algorithms, like std::find and others.

Since
LibreOffice 4.2

◆ end() [2/2]

bool const * com::sun::star::uno::Sequence< bool >::end ( ) const
inline

This function allows to use Sequence in standard algorithms, like std::find and others.

Since
LibreOffice 4.2

◆ get()

uno_Sequence * com::sun::star::uno::Sequence< bool >::get ( ) const
inline

Provides UNacquired sequence handle.

Returns
UNacquired sequence handle

◆ getArray()

bool * com::sun::star::uno::Sequence< bool >::getArray ( )
inline

Gets a pointer to elements array for reading and writing.

In general if the sequence has a handle acquired by other sequences (reference count > 1), then a new sequence is created copy constructing all elements to keep value semantics! If the sequence has a length of 0, then the returned pointer is undefined.

Returns
pointer to elements array

◆ getConstArray()

const bool * com::sun::star::uno::Sequence< bool >::getConstArray ( ) const
inline

Gets a pointer to elements array for reading.

If the sequence has a length of 0, then the returned pointer is undefined.

Returns
pointer to elements array

◆ getLength()

sal_Int32 com::sun::star::uno::Sequence< bool >::getLength ( ) const
inline

Gets length of the sequence.

Returns
length of sequence

◆ hasElements()

bool com::sun::star::uno::Sequence< bool >::hasElements ( ) const
inline

Tests whether the sequence has elements, i.e.

elements count is greater than zero.

Returns
true, if elements count is greater than zero

◆ operator!=()

bool com::sun::star::uno::Sequence< bool >::operator!= ( const Sequence< bool > & rSeq) const
inline

Inequality operator: Compares two sequences.

Parameters
rSeqanother sequence of same type (right side)
Returns
false if both sequences are equal, true otherwise

◆ operator=()

Sequence< bool > & com::sun::star::uno::Sequence< bool >::operator= ( const Sequence< bool > & rSeq)
inline

Assignment operator: Acquires given sequence handle and releases previously set handle.

Parameters
rSeqanother sequence of same type
Returns
this sequence

◆ operator==()

bool com::sun::star::uno::Sequence< bool >::operator== ( const Sequence< bool > & rSeq) const
inline

Equality operator: Compares two sequences.

Parameters
rSeqanother sequence of same type (right side)
Returns
true if both sequences are equal, false otherwise

◆ operator[]() [1/2]

bool & com::sun::star::uno::Sequence< bool >::operator[] ( sal_Int32 nIndex)
inline

Non-const index operator: Obtains a reference to element indexed at given position.

The implementation does not check for array bounds! In general if the sequence has a handle acquired by other sequences (reference count > 1), then a new sequence is created copy constructing all elements to keep value semantics!

Parameters
nIndexindex
Returns
non-const C++ reference to element

◆ operator[]() [2/2]

const bool & com::sun::star::uno::Sequence< bool >::operator[] ( sal_Int32 nIndex) const
inline

Const index operator: Obtains a reference to element indexed at given position.

The implementation does not check for array bounds!

Parameters
nIndexindex
Returns
const C++ reference to element

◆ realloc()

void com::sun::star::uno::Sequence< bool >::realloc ( sal_Int32 nSize)
inline

Reallocates sequence to new length.

If the new length is smaller than the former, then upper elements will be destructed (and their memory freed). If the new length is greater than the former, then upper (new) elements are default constructed. If the sequence has a handle acquired by other sequences (reference count > 1), then the remaining elements are copy constructed to a new sequence handle to keep value semantics!

Parameters
nSizenew size of sequence

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