xref: /aoo4110/main/autodoc/source/ary/idl/i_ce2s.cxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 #include <precomp.h>
23 #include <ary/idl/i_ce.hxx>
24 
25 
26 // NOT FULLY DEFINED SERVICES
27 #include <cosv/tpl/tpltools.hxx>
28 #include <ary/doc/d_oldidldocu.hxx>
29 #include <ary/getncast.hxx>
30 
31 
32 namespace ary
33 {
34 namespace idl
35 {
36 
37 namespace
38 {
39 const std::vector<Ce_id> C_sNullVector_Ce_ids;
40 }
41 
42 
~Ce_2s()43 Ce_2s::~Ce_2s()
44 {
45     csv::erase_container_of_heap_ptrs(aXrefLists);
46 }
47 
48 DYN Ce_2s *
Create_(ClassId)49 Ce_2s::Create_( ClassId )
50 {
51     return new Ce_2s;
52 }
53 
54 
55 std::vector<Ce_id> &
Access_List(int i_indexOfList)56 Ce_2s::Access_List( int i_indexOfList )
57 {
58     csv_assert(i_indexOfList >= 0 AND i_indexOfList < 1000);
59 
60     while (i_indexOfList >= (int) aXrefLists.size())
61     {
62         aXrefLists.push_back(new std::vector<Ce_id>);
63     }
64     return *aXrefLists[i_indexOfList];
65 }
66 
67 const std::vector<Ce_id> &
List(int i_indexOfList) const68 Ce_2s::List( int i_indexOfList ) const
69 {
70     if (uintt(i_indexOfList) < aXrefLists.size())
71         return *aXrefLists[i_indexOfList];
72     else
73         return C_sNullVector_Ce_ids;
74 }
75 
76 
77 }   // namespace idl
78 }   // namespace ary
79