Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
 Overview   Namespace   Class   Index   Help 

Methods of Class Sequence


Sequence
Sequence() throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Default constructor: Creates an empty sequence.

Sequence
Sequence(
const Sequence< E > & rSeq ) throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Copy constructor: Creates a copy of given sequence.
Parameters
rSeq
another sequence of same type

Sequence
Sequence(
uno_Sequence * pSequence,
__sal_NoAcquire ) throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Constructor: Takes over ownership of given sequence.
Parameters
pSequence
a sequence
dummy
SAL_NO_ACQUIRE to force obvious distinction to other constructors

Sequence
Sequence(
const E * pElements,
sal_Int32 len ) throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Constructor: Creates a copy of given elements.
Parameters
pElement
an array of elements
len
length of array

Sequence
Sequence(
sal_Int32 len ) throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Constructor: Creates a default constructed sequence of given length.
Parameters
len
initial sequence length

~Sequence
~Sequence() throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Destructor: Releases sequence handle. Last handle will destruct elements and free memory.

operator=
Sequence< E > & operator=(
const Sequence< E > & rSeq ) throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Assignment operator: Acquires given sequence handle and releases previously set handle.
Parameters
rSeq
another sequence of same type
Return
this sequence

getLength
sal_Int32 getLength() throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Gets length of the sequence.
Return
length of sequence

hasElements
sal_Bool hasElements() throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Tests whether the sequence has elements, i.e. elements count is greater than zero.
Return
true, if elements count is greater than zero

getConstArray
const E * getConstArray() throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Gets a pointer to elements array for reading. If the sequence has a length of 0, then the returned pointer is undefined.
Return
pointer to elements array

getArray
E * getArray() throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Description
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.
Return
pointer to elements array

operator[]
E & operator[](
sal_Int32 nIndex ) throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Description
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
nIndex
index
Return
non-const C++ reference to element

operator[]
const E & operator[](
sal_Int32 nIndex ) const throw();

virtual abstract const volatile template static inline C-linkage
NO NO YES NO NO NO YES NO

Summary
Const index operator: Obtains a reference to element indexed at given position. The implementation does not check for array bounds!
Parameters
nIndex
index
Return
const C++ reference to element

operator==
sal_Bool operator==(
const Sequence< E > & rSeq ) const throw();

virtual abstract const volatile template static inline C-linkage
NO NO YES NO NO NO YES NO

Summary
Equality operator: Compares two sequences.
Parameters
rSeq
another sequence of same type (right side)
Return
true if both sequences are equal, false otherwise

operator!=
sal_Bool operator!=(
const Sequence< E > & rSeq ) const throw();

virtual abstract const volatile template static inline C-linkage
NO NO YES NO NO NO YES NO

Summary
Unequality operator: Compares two sequences.
Parameters
rSeq
another sequence of same type (right side)
Return
false if both sequences are equal, true otherwise

realloc
void realloc(
sal_Int32 nSize ) throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Description
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
nSize
new size of sequence

get
uno_Sequence * get() throw();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Provides UNacquired sequence handle.
Return
UNacquired sequence handle

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.