#include <sal/types.h>
#include <rtl/alloc.h>
Go to the source code of this file.
Function Documentation
SAL_DLLPUBLIC void rtl_byte_sequence_acquire |
( |
sal_Sequence * |
pSequence | ) |
|
Acquires the byte sequence.
- Parameters:
-
pSequence | sequence, that is to be acquired |
Assigns the byte sequence pSequence to *ppSequence.
- Parameters:
-
ppSequence | inout sequence; on entry *ppSequence may be null, otherwise it is released; after the call, *ppSequence references pSequence |
pSequence | the source sequence |
SAL_DLLPUBLIC void rtl_byte_sequence_construct |
( |
sal_Sequence ** |
ppSequence, |
|
|
sal_Int32 |
nLength |
|
) |
| |
Constructs a bytes sequence with length nLength.
All bytes are set to zero.
- Parameters:
-
ppSequence | inout sequence; on entry *ppSequence may be null, otherwise it is released; after the call, *ppSequence contains the newly constructed sequence |
nLength | length of new sequence |
SAL_DLLPUBLIC void rtl_byte_sequence_constructFromArray |
( |
sal_Sequence ** |
ppSequence, |
|
|
const sal_Int8 * |
pData, |
|
|
sal_Int32 |
nLength |
|
) |
| |
Constructs a byte sequence with length nLength and copies nLength bytes from pData.
- Parameters:
-
ppSequence | inout sequence; on entry *ppSequence may be null, otherwise it is released; after the call, *ppSequence contains the newly constructed sequence |
pData | initial data |
nLength | length of new sequence |
SAL_DLLPUBLIC void rtl_byte_sequence_constructNoDefault |
( |
sal_Sequence ** |
ppSequence, |
|
|
sal_Int32 |
nLength |
|
) |
| |
Constructs a bytes sequence with length nLength.
The data is not initialized.
- Parameters:
-
ppSequence | inout sequence; on entry *ppSequence may be null, otherwise it is released; after the call, *ppSequence contains the newly constructed sequence |
nLength | length of new sequence |
Compares two byte sequences.
- Returns:
- true, if the data within the sequences are identical; false otherwise
Returns the data array pointer of the sequence.
- Returns:
- read-pointer to the data array of the sequence. If rtl_byte_sequence_reference2One() has been called before, the pointer may be casted to a non const pointer and the sequence may be modified
SAL_DLLPUBLIC sal_Int32 rtl_byte_sequence_getLength |
( |
sal_Sequence * |
pSequence | ) |
|
Returns the length of the sequence.
- Parameters:
-
- Returns:
- length of the sequence
SAL_DLLPUBLIC void rtl_byte_sequence_realloc |
( |
sal_Sequence ** |
ppSequence, |
|
|
sal_Int32 |
nSize |
|
) |
| |
Reallocates length of byte sequence.
- Parameters:
-
ppSequence | sequence |
nSize | new size of sequence |
SAL_DLLPUBLIC void rtl_byte_sequence_reference2One |
( |
sal_Sequence ** |
ppSequence | ) |
|
Assures that the reference count of the given byte sequence is one.
Otherwise a new copy of the sequence is created with a reference count of one.
- Parameters:
-
SAL_DLLPUBLIC void rtl_byte_sequence_release |
( |
sal_Sequence * |
pSequence | ) |
|
Releases the byte sequence.
If the refcount drops to zero, the sequence is freed.
- Parameters:
-
pSequence | sequence, that is to be released; invalid after call |