1/*************************************************************************
2 *
3 * Copyright 2010, Oracle and/or its affiliates. All rights reserved.
4 *
5 ************************************************************************/
6
7#ifndef OOO_VBA_XOLLECTIONBASE_IDL
8#define OOO_VBA_XOLLECTIONBASE_IDL
9
10#include <com/sun/star/container/XEnumerationAccess.idl>
11#include <com/sun/star/script/XDefaultMethod.idl>
12
13//=============================================================================
14
15module ooo { module vba {
16
17//=============================================================================
18
19/** Base interface for VBA collections.
20
21    Every VBA collection provides the number of items, an enumeration access of
22    all collection items (e.g. for the "For Each" loop), and a way to access
23    single items, usually via the method "Item".
24
25    The various VBA collection objects expect a specific number of arguments in
26    the "Item" method, therefore this method is not part of this base interface
27    but has to be specified seperately in every derived interface.
28 */
29interface XCollectionBase
30{
31    //-------------------------------------------------------------------------
32    /** Provides an enumeration of all items in this collection.
33     */
34    interface ::com::sun::star::container::XEnumerationAccess;
35
36    //-------------------------------------------------------------------------
37    /** Provides the name of the default item access method.
38
39        Usually this method is called "Item". The access method has to be
40        specified and implemented separately by every derived class.
41     */
42    interface ::com::sun::star::script::XDefaultMethod;
43
44    //-------------------------------------------------------------------------
45    /** Returns the number of items contained in this collection.
46     */
47    [attribute, readonly] long Count;
48
49    //-------------------------------------------------------------------------
50};
51
52//=============================================================================
53
54}; };
55
56#endif
57