merge the formfield patch from ooo-build
[ooovba.git] / autodoc / source / ary / inc / slots.hxx
blobfd54ce7ecec3ee3fa1765df15e22f02b9edeaa10
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: slots.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ARY_SLOTS_HXX
32 #define ARY_SLOTS_HXX
35 // USED SERVICES
36 // BASE CLASSES
37 #include <ary/ceslot.hxx>
38 // COMPONENTS
39 // PARAMETERS
40 #include <ary/ary_disp.hxx>
41 #include <ary/types.hxx>
42 #include <ary/sequentialids.hxx>
43 #include <ary/cpp/c_types4cpp.hxx>
44 #include <ary/cpp/c_slntry.hxx>
48 namespace ary
52 class Slot_Null : public Slot
54 public:
55 virtual ~Slot_Null();
57 virtual void StoreAt(
58 Display & o_rDestination ) const;
59 virtual uintt Size() const;
61 private:
62 virtual void StoreEntries(
63 Display & o_rDestination ) const;
66 class Slot_MapLocalCe : public Slot
68 public:
69 Slot_MapLocalCe(
70 const cpp::Map_LocalCe & i_rData );
71 virtual ~Slot_MapLocalCe();
72 virtual uintt Size() const;
74 private:
75 virtual void StoreEntries(
76 Display & o_rDestination ) const;
77 // DATA
78 const cpp::Map_LocalCe *
79 pData;
82 class Slot_MapOperations : public Slot
84 public:
85 Slot_MapOperations(
86 const std::multimap<String, cpp::Ce_id> &
87 i_rData );
88 virtual ~Slot_MapOperations();
89 virtual uintt Size() const;
91 private:
92 virtual void StoreEntries(
93 Display & o_rDestination ) const;
94 // DATA
95 const std::multimap<String, cpp::Ce_id> *
96 pData;
99 class Slot_ListLocalCe : public Slot
101 public:
102 Slot_ListLocalCe(
103 const cpp::List_LocalCe &
104 i_rData );
105 virtual ~Slot_ListLocalCe();
107 virtual uintt Size() const;
109 private:
110 virtual void StoreEntries(
111 Display & o_rDestination ) const;
112 // DATA
113 const cpp::List_LocalCe *
114 pData;
117 template <class ID>
118 class Slot_SequentialIds : public Slot
120 public:
121 Slot_SequentialIds(
122 const SequentialIds<ID> &
123 i_rData )
124 : pData(&i_rData) {}
125 virtual ~Slot_SequentialIds();
127 virtual uintt Size() const;
129 private:
130 virtual void StoreEntries(
131 Display & o_rDestination ) const;
132 // DATA
133 const SequentialIds<ID> *
134 pData;
138 template <class ID>
139 Slot_SequentialIds<ID>::~Slot_SequentialIds()
143 template <class ID>
144 uintt
145 Slot_SequentialIds<ID>::Size() const
147 return pData->Size();
150 template <class ID>
151 void
152 Slot_SequentialIds<ID>::StoreEntries( Display & o_rDestination ) const
154 for ( typename SequentialIds<ID>::const_iterator it = pData->Begin();
155 it != pData->End();
156 ++it )
158 o_rDestination.DisplaySlot_Rid( (*it).Value() );
165 } // namespace ary
166 #endif