xref: /AOO41X/main/autodoc/source/ary/inc/slots.hxx (revision 1c78a5d6c0093dece4c096ba53051800fbad6e33)
1*1c78a5d6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1c78a5d6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1c78a5d6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1c78a5d6SAndrew Rist  * distributed with this work for additional information
6*1c78a5d6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1c78a5d6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1c78a5d6SAndrew Rist  * "License"); you may not use this file except in compliance
9*1c78a5d6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*1c78a5d6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*1c78a5d6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1c78a5d6SAndrew Rist  * software distributed under the License is distributed on an
15*1c78a5d6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1c78a5d6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1c78a5d6SAndrew Rist  * specific language governing permissions and limitations
18*1c78a5d6SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*1c78a5d6SAndrew Rist  *************************************************************/
21*1c78a5d6SAndrew Rist 
22*1c78a5d6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef ARY_SLOTS_HXX
25cdf0e10cSrcweir #define ARY_SLOTS_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir // USED SERVICES
29cdf0e10cSrcweir 	// BASE CLASSES
30cdf0e10cSrcweir #include <ary/ceslot.hxx>
31cdf0e10cSrcweir 	// COMPONENTS
32cdf0e10cSrcweir 	// PARAMETERS
33cdf0e10cSrcweir #include <ary/ary_disp.hxx>
34cdf0e10cSrcweir #include <ary/types.hxx>
35cdf0e10cSrcweir #include <ary/sequentialids.hxx>
36cdf0e10cSrcweir #include <ary/cpp/c_types4cpp.hxx>
37cdf0e10cSrcweir #include <ary/cpp/c_slntry.hxx>
38cdf0e10cSrcweir 
39cdf0e10cSrcweir 
40cdf0e10cSrcweir 
41cdf0e10cSrcweir namespace ary
42cdf0e10cSrcweir {
43cdf0e10cSrcweir 
44cdf0e10cSrcweir 
45cdf0e10cSrcweir class Slot_Null : public Slot
46cdf0e10cSrcweir {
47cdf0e10cSrcweir   public:
48cdf0e10cSrcweir 	virtual			   	~Slot_Null();
49cdf0e10cSrcweir 
50cdf0e10cSrcweir     virtual void        StoreAt(
51cdf0e10cSrcweir                             Display &           o_rDestination ) const;
52cdf0e10cSrcweir     virtual uintt       Size() const;
53cdf0e10cSrcweir 
54cdf0e10cSrcweir   private:
55cdf0e10cSrcweir     virtual void        StoreEntries(
56cdf0e10cSrcweir                             Display &           o_rDestination ) const;
57cdf0e10cSrcweir };
58cdf0e10cSrcweir 
59cdf0e10cSrcweir class Slot_MapLocalCe : public Slot
60cdf0e10cSrcweir {
61cdf0e10cSrcweir   public:
62cdf0e10cSrcweir                         Slot_MapLocalCe(
63cdf0e10cSrcweir                             const cpp::Map_LocalCe & i_rData );
64cdf0e10cSrcweir 	virtual			   	~Slot_MapLocalCe();
65cdf0e10cSrcweir     virtual uintt       Size() const;
66cdf0e10cSrcweir 
67cdf0e10cSrcweir   private:
68cdf0e10cSrcweir     virtual void        StoreEntries(
69cdf0e10cSrcweir                             Display &           o_rDestination ) const;
70cdf0e10cSrcweir     // DATA
71cdf0e10cSrcweir     const cpp::Map_LocalCe *
72cdf0e10cSrcweir                         pData;
73cdf0e10cSrcweir };
74cdf0e10cSrcweir 
75cdf0e10cSrcweir class Slot_MapOperations : public Slot
76cdf0e10cSrcweir {
77cdf0e10cSrcweir   public:
78cdf0e10cSrcweir                         Slot_MapOperations(
79cdf0e10cSrcweir                             const std::multimap<String, cpp::Ce_id> &
80cdf0e10cSrcweir                                                 i_rData );
81cdf0e10cSrcweir 	virtual			   	~Slot_MapOperations();
82cdf0e10cSrcweir     virtual uintt       Size() const;
83cdf0e10cSrcweir 
84cdf0e10cSrcweir   private:
85cdf0e10cSrcweir     virtual void        StoreEntries(
86cdf0e10cSrcweir                             Display &           o_rDestination ) const;
87cdf0e10cSrcweir     // DATA
88cdf0e10cSrcweir     const std::multimap<String, cpp::Ce_id> *
89cdf0e10cSrcweir                         pData;
90cdf0e10cSrcweir };
91cdf0e10cSrcweir 
92cdf0e10cSrcweir class Slot_ListLocalCe : public Slot
93cdf0e10cSrcweir {
94cdf0e10cSrcweir   public:
95cdf0e10cSrcweir                         Slot_ListLocalCe(
96cdf0e10cSrcweir                             const cpp::List_LocalCe &
97cdf0e10cSrcweir                                                 i_rData );
98cdf0e10cSrcweir 	virtual			   	~Slot_ListLocalCe();
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     virtual uintt       Size() const;
101cdf0e10cSrcweir 
102cdf0e10cSrcweir   private:
103cdf0e10cSrcweir     virtual void        StoreEntries(
104cdf0e10cSrcweir                             Display &           o_rDestination ) const;
105cdf0e10cSrcweir     // DATA
106cdf0e10cSrcweir     const cpp::List_LocalCe *
107cdf0e10cSrcweir                         pData;
108cdf0e10cSrcweir };
109cdf0e10cSrcweir 
110cdf0e10cSrcweir template <class ID>
111cdf0e10cSrcweir class Slot_SequentialIds : public Slot
112cdf0e10cSrcweir {
113cdf0e10cSrcweir   public:
Slot_SequentialIds(const SequentialIds<ID> & i_rData)114cdf0e10cSrcweir                         Slot_SequentialIds(
115cdf0e10cSrcweir                             const SequentialIds<ID> &
116cdf0e10cSrcweir                                                 i_rData )
117cdf0e10cSrcweir                             :   pData(&i_rData) {}
118cdf0e10cSrcweir 	virtual			   	~Slot_SequentialIds();
119cdf0e10cSrcweir 
120cdf0e10cSrcweir     virtual uintt       Size() const;
121cdf0e10cSrcweir 
122cdf0e10cSrcweir   private:
123cdf0e10cSrcweir     virtual void        StoreEntries(
124cdf0e10cSrcweir                             Display &           o_rDestination ) const;
125cdf0e10cSrcweir     // DATA
126cdf0e10cSrcweir     const SequentialIds<ID> *
127cdf0e10cSrcweir                         pData;
128cdf0e10cSrcweir };
129cdf0e10cSrcweir 
130cdf0e10cSrcweir 
131cdf0e10cSrcweir template <class ID>
~Slot_SequentialIds()132cdf0e10cSrcweir Slot_SequentialIds<ID>::~Slot_SequentialIds()
133cdf0e10cSrcweir {
134cdf0e10cSrcweir }
135cdf0e10cSrcweir 
136cdf0e10cSrcweir template <class ID>
137cdf0e10cSrcweir uintt
Size() const138cdf0e10cSrcweir Slot_SequentialIds<ID>::Size() const
139cdf0e10cSrcweir {
140cdf0e10cSrcweir  	return pData->Size();
141cdf0e10cSrcweir }
142cdf0e10cSrcweir 
143cdf0e10cSrcweir template <class ID>
144cdf0e10cSrcweir void
StoreEntries(Display & o_rDestination) const145cdf0e10cSrcweir Slot_SequentialIds<ID>::StoreEntries( Display     & o_rDestination ) const
146cdf0e10cSrcweir {
147cdf0e10cSrcweir 	for ( typename SequentialIds<ID>::const_iterator it = pData->Begin();
148cdf0e10cSrcweir 		  it != pData->End();
149cdf0e10cSrcweir 		  ++it )
150cdf0e10cSrcweir 	{
151cdf0e10cSrcweir 		o_rDestination.DisplaySlot_Rid( (*it).Value() );
152cdf0e10cSrcweir 	}
153cdf0e10cSrcweir }
154cdf0e10cSrcweir 
155cdf0e10cSrcweir 
156cdf0e10cSrcweir 
157cdf0e10cSrcweir 
158cdf0e10cSrcweir }   // namespace ary
159cdf0e10cSrcweir #endif
160