My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
byteseq.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * Copyright 2000, 2010 Oracle and/or its affiliates.
7  *
8  * OpenOffice.org - a multi-platform office productivity suite
9  *
10  * This file is part of OpenOffice.org.
11  *
12  * OpenOffice.org is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 3
14  * only, as published by the Free Software Foundation.
15  *
16  * OpenOffice.org is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License version 3 for more details
20  * (a copy is included in the LICENSE file that accompanied this code).
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * version 3 along with OpenOffice.org. If not, see
24  * <http://www.openoffice.org/license.html>
25  * for a copy of the LGPLv3 License.
26  *
27  ************************************************************************/
28 #ifndef _RTL_BYTESEQ_H_
29 #define _RTL_BYTESEQ_H_
30 
31 #include <sal/types.h>
32 #include <rtl/alloc.h>
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
45  sal_Sequence ** ppSequence )
47 
54  sal_Sequence ** ppSequence, sal_Int32 nSize )
56 
62  sal_Sequence *pSequence )
64 
70  sal_Sequence *pSequence )
72 
80  sal_Sequence **ppSequence , sal_Int32 nLength )
82 
90  sal_Sequence **ppSequence , sal_Int32 nLength )
92 
101  sal_Sequence **ppSequence, const sal_Int8 *pData , sal_Int32 nLength )
103 
111  sal_Sequence **ppSequence , sal_Sequence *pSequence )
113 
119  sal_Sequence *pSequence1 , sal_Sequence *pSequence2 )
121 
129  sal_Sequence *pSequence )
131 
137 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_byte_sequence_getLength(
138  sal_Sequence *pSequence )
140 
141 #ifdef __cplusplus
142 }
143 namespace rtl
144 {
145 
147 {
151 };
152 
154 {
158  BYTESEQ_NOACQUIRE = 0xcafebabe
159 };
160 
167 {
170  sal_Sequence * _pSequence;
171 
172 public:
174  // these are here to force memory de/allocation to sal lib.
175  inline static void * SAL_CALL operator new ( size_t nSize ) SAL_THROW(())
176  { return ::rtl_allocateMemory( nSize ); }
177  inline static void SAL_CALL operator delete ( void * pMem ) SAL_THROW(())
178  { ::rtl_freeMemory( pMem ); }
179  inline static void * SAL_CALL operator new ( size_t, void * pMem ) SAL_THROW(())
180  { return pMem; }
181  inline static void SAL_CALL operator delete ( void *, void * ) SAL_THROW(())
182  {}
184 
187  inline ByteSequence() SAL_THROW(());
192  inline ByteSequence( const ByteSequence & rSeq ) SAL_THROW(());
197  inline ByteSequence( sal_Sequence *pSequence ) SAL_THROW(());
203  inline ByteSequence( const sal_Int8 * pElements, sal_Int32 len );
208  inline ByteSequence( sal_Int32 len );
215  inline ByteSequence( sal_Int32 len , enum __ByteSequence_NoDefault nodefault );
225  inline ByteSequence( sal_Sequence *pSequence , enum __ByteSequence_NoAcquire noacquire ) SAL_THROW(());
228  inline ~ByteSequence() SAL_THROW(());
229 
235  inline ByteSequence & SAL_CALL operator = ( const ByteSequence & rSeq ) SAL_THROW(());
236 
241  inline sal_Int32 SAL_CALL getLength() const SAL_THROW(())
242  { return _pSequence->nElements; }
243 
249  inline const sal_Int8 * SAL_CALL getConstArray() const SAL_THROW(())
250  { return (const sal_Int8 *)_pSequence->elements; }
258  inline sal_Int8 * SAL_CALL getArray();
259 
272  inline sal_Int8 & SAL_CALL operator [] ( sal_Int32 nIndex );
273 
280  inline const sal_Int8 & SAL_CALL operator [] ( sal_Int32 nIndex ) const SAL_THROW(())
281  { return getConstArray()[ nIndex ]; }
282 
288  inline sal_Bool SAL_CALL operator == ( const ByteSequence & rSeq ) const SAL_THROW(());
294  inline sal_Bool SAL_CALL operator != ( const ByteSequence & rSeq ) const SAL_THROW(());
295 
302  inline void SAL_CALL realloc( sal_Int32 nSize );
303 
308  inline sal_Sequence * SAL_CALL getHandle() const SAL_THROW(())
309  { return _pSequence; }
314  inline sal_Sequence * SAL_CALL get() const SAL_THROW(())
315  { return _pSequence; }
316 };
317 
318 }
319 #endif
320 #endif
321 
322 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */