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
-
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 );
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 );
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();
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[]
-
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[]
-
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 );
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
Copyright © 2012, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.