#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. | |
Sequence & | operator= (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_Sequence * | get () const |
Provides UNacquired sequence handle. | |
typedef bool com::sun::star::uno::Sequence< bool >::ElementType |
typedefs the element type of the sequence
|
inline |
Default constructor: Creates an empty sequence.
|
inline |
Copy constructor: Creates a copy of given sequence.
rSeq | another sequence of same type |
|
inline |
Constructor: Takes over ownership of given sequence.
pSequence | a sequence |
dummy | SAL_NO_ACQUIRE to force obvious distinction to other constructors |
|
inline |
Constructor: Creates a copy of given elements.
pElements | an array of elements |
len | length of array |
|
inlineexplicit |
Constructor: Creates a default constructed sequence of given length.
len | initial sequence length |
|
inline |
Destructor: Releases sequence handle.
Last handle will destruct elements and free memory.
|
inline |
This function allows to use Sequence in standard algorithms, like std::find and others.
|
inline |
This function allows to use Sequence in standard algorithms, like std::find and others.
|
inline |
This function allows to use Sequence in standard algorithms, like std::find and others.
|
inline |
This function allows to use Sequence in standard algorithms, like std::find and others.
|
inline |
Provides UNacquired sequence handle.
|
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.
|
inline |
Gets a pointer to elements array for reading.
If the sequence has a length of 0, then the returned pointer is undefined.
|
inline |
Gets length of the sequence.
|
inline |
Tests whether the sequence has elements, i.e.
elements count is greater than zero.
|
inline |
Inequality operator: Compares two sequences.
rSeq | another sequence of same type (right side) |
|
inline |
Assignment operator: Acquires given sequence handle and releases previously set handle.
rSeq | another sequence of same type |
|
inline |
Equality operator: Compares two sequences.
rSeq | another sequence of same type (right side) |
|
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!
nIndex | index |
|
inline |
Const index operator: Obtains a reference to element indexed at given position.
The implementation does not check for array bounds!
nIndex | index |
|
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!
nSize | new size of sequence |