Language

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

Methods of Class ByteSequence


ByteSequence
ByteSequence() 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.

ByteSequence
ByteSequence(
const ByteSequence & 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 byte sequence

ByteSequence
ByteSequence(
sal_Sequence * pSequence ) throw();

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

Summary
Copy constructor Creates a copy from the C-Handle.
Parameters
pSequence
another byte sequence handle

ByteSequence
ByteSequence(
const sal_Int8 * 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 data bytes.
Parameters
pElements
an array of bytes
len
number of bytes

ByteSequence
ByteSequence(
sal_Int32 len ) throw();

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

Summary
Constructor: Creates sequence of given length and initializes all bytes to 0.
Parameters
len
initial sequence length

ByteSequence
ByteSequence(
sal_Int32 len,
__ByteSequence_NoDefault nodefault ) throw();

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

Summary
Constructor: Creates sequence of given length and does NOT initialize data. Use this ctor for performance optimization only.
Parameters
len
initial sequence length
nodefault
dummy parameter forcing explicit BYTESEQ_NODEFAULT

ByteSequence
ByteSequence(
sal_Sequence * pSequence,
__ByteSequence_NoAcquire noacquire ) throw();

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

Description
Constructor: Creates a sequence from a C-Handle without acquiring the handle, thus taking over owenership. Eitherway the handle is release by the destructor. This ctor is useful, when working with a c-interface (it safes a pair of acquire and release call and is thus a performance optimization only).
Parameters
pSequence
sequence handle to be taken over
noacquire
dummy parameter forcing explicit BYTESEQ_NOACQUIRE

~ByteSequence
~ByteSequence() 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 free memory.

operator=
ByteSequence & operator=(
const ByteSequence & 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 a previously set handle.
Parameters
rSeq
another byte sequence
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 the length of sequence.
Return
length of sequence

getConstArray
const sal_Int8 * getConstArray() throw();

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

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

getArray
sal_Int8 * 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 copying all bytes to keep value semantics! If the sequence has a length of 0, then the returned pointer is undefined.
Return
pointer to elements array

operator[]
sal_Int8 & 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 byte indexed at given position. In general if the sequence has a handle acquired by other sequences (reference count > 1), then a new sequence is created copying all bytes to keep value semantics!
ATTENTION!
The implementation does NOT check for array bounds!
Parameters
nIndex
index
Return
non-const C++ reference to element at index nIndex

operator[]
const sal_Int8 & 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 byte indexed at given position. The implementation does NOT check for array bounds!
Parameters
nIndex
index
Return
const C++ reference to byte at element of indenx nIndex

operator==
sal_Bool operator==(
const ByteSequence & 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 byte sequence (right side)
Return
true if both sequences are equal, false otherwise

operator!=
sal_Bool operator!=(
const ByteSequence & 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 byte sequence (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 sequence has a handle acquired by other sequences (reference count > 1), then the remaining elements are copied to a new sequence handle to keep value semantics!
Parameters
nSize
new size of sequence

getHandle
sal_Sequence * getHandle() throw();

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

Summary
Returns the UNnacquired C handle of the sequence
Return
UNacquired handle of the sequence

get
sal_Sequence * get() throw();

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

Summary
Returns the UNnacquired C handle of the sequence (for compatibility reasons)
Return
UNacquired handle of the sequence

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.