summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2001-02-16 15:32:20 +0000
committerDaniel Boelzle <dbo@openoffice.org>2001-02-16 15:32:20 +0000
commit9b1c37bec346a192aa6b8c5b1ed4e53f3512d349 (patch)
treebf198f9393e052872a3bc9581c7ad875d839ac45 /cppu
parent732bd469091eba7937fed6adc009a342ab6e733a (diff)
added hasElements()
Diffstat (limited to 'cppu')
-rw-r--r--cppu/inc/com/sun/star/uno/Sequence.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/cppu/inc/com/sun/star/uno/Sequence.h b/cppu/inc/com/sun/star/uno/Sequence.h
index fd476d2bfa43..d59824b755d8 100644
--- a/cppu/inc/com/sun/star/uno/Sequence.h
+++ b/cppu/inc/com/sun/star/uno/Sequence.h
@@ -2,9 +2,9 @@
*
* $RCSfile: Sequence.h,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $
+ * last change: $Author: dbo $ $Date: 2001-02-16 16:32:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -176,12 +176,19 @@ public:
*/
inline const Type & getElementType() const throw ()
{ return ::getCppuType( (const ElementType *)0 ); }
+
/** Gets length of sequence.
<br>
@return length of sequence
*/
inline sal_Int32 SAL_CALL getLength() const throw ()
{ return _pSequence->nElements; }
+ /** Tests whether the sequence has elements, i.e. elements count is greater than zero.
+ <br>
+ @return true, if elements count is greater than zero
+ */
+ inline sal_Bool SAL_CALL hasElements() const throw ()
+ { return (_pSequence->nElements > 0); }
/** Gets a pointer to elements array for <b>reading</b>.
If the sequence has a length of 0, then the returned pointer is undefined.
@@ -250,10 +257,10 @@ public:
inline void SAL_CALL realloc( sal_Int32 nSize ) throw ();
};
-/** Creates an UNO byte sequence from a SAL byte sequence.
+/** Creates a UNO byte sequence from a SAL byte sequence.
<br>
@param rByteSequence a byte sequence
- @return an UNO byte sequence
+ @return a UNO byte sequence
*/
inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence(
const ::rtl::ByteSequence & rByteSequence ) throw ();