xref: /aoo42x/main/autodoc/source/ary/cpp/cs_ce.cxx (revision d291ea28)
1*d291ea28SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*d291ea28SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*d291ea28SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*d291ea28SAndrew Rist  * distributed with this work for additional information
6*d291ea28SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*d291ea28SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*d291ea28SAndrew Rist  * "License"); you may not use this file except in compliance
9*d291ea28SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*d291ea28SAndrew Rist  *
11*d291ea28SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*d291ea28SAndrew Rist  *
13*d291ea28SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*d291ea28SAndrew Rist  * software distributed under the License is distributed on an
15*d291ea28SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d291ea28SAndrew Rist  * KIND, either express or implied.  See the License for the
17*d291ea28SAndrew Rist  * specific language governing permissions and limitations
18*d291ea28SAndrew Rist  * under the License.
19*d291ea28SAndrew Rist  *
20*d291ea28SAndrew Rist  *************************************************************/
21cdf0e10cSrcweir 
22cdf0e10cSrcweir #include <precomp.h>
23cdf0e10cSrcweir #include "cs_ce.hxx"
24cdf0e10cSrcweir 
25cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES
26cdf0e10cSrcweir #include <ary/cpp/c_namesp.hxx>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir 
29cdf0e10cSrcweir 
30cdf0e10cSrcweir namespace
31cdf0e10cSrcweir {
32cdf0e10cSrcweir const uintt
33cdf0e10cSrcweir     C_nReservedElements = ::ary::cpp::predefined::ce_MAX;    // Skipping "0" and the GlobalNamespace
34cdf0e10cSrcweir }
35cdf0e10cSrcweir 
36cdf0e10cSrcweir 
37cdf0e10cSrcweir 
38cdf0e10cSrcweir 
39cdf0e10cSrcweir namespace ary
40cdf0e10cSrcweir {
41cdf0e10cSrcweir namespace cpp
42cdf0e10cSrcweir {
43cdf0e10cSrcweir 
44cdf0e10cSrcweir Ce_Storage *    Ce_Storage::pInstance_ = 0;
45cdf0e10cSrcweir 
46cdf0e10cSrcweir 
47cdf0e10cSrcweir 
Ce_Storage()48cdf0e10cSrcweir Ce_Storage::Ce_Storage()
49cdf0e10cSrcweir     :   stg::Storage<CodeEntity>(C_nReservedElements),
50cdf0e10cSrcweir         aTypes(),
51cdf0e10cSrcweir         aOperations(),
52cdf0e10cSrcweir         aData()
53cdf0e10cSrcweir 
54cdf0e10cSrcweir {
55cdf0e10cSrcweir     Set_Reserved( predefined::ce_GlobalNamespace,
56cdf0e10cSrcweir                   *new Namespace );
57cdf0e10cSrcweir 
58cdf0e10cSrcweir     csv_assert(pInstance_ == 0);
59cdf0e10cSrcweir     pInstance_ = this;
60cdf0e10cSrcweir }
61cdf0e10cSrcweir 
~Ce_Storage()62cdf0e10cSrcweir Ce_Storage::~Ce_Storage()
63cdf0e10cSrcweir {
64cdf0e10cSrcweir     csv_assert(pInstance_ != 0);
65cdf0e10cSrcweir     pInstance_ = 0;
66cdf0e10cSrcweir }
67cdf0e10cSrcweir 
68cdf0e10cSrcweir Ce_id
Store_Type(DYN CodeEntity & pass_ce)69cdf0e10cSrcweir Ce_Storage::Store_Type(DYN CodeEntity & pass_ce)
70cdf0e10cSrcweir {
71cdf0e10cSrcweir     Ce_id
72cdf0e10cSrcweir         ret = Store_Entity(pass_ce);
73cdf0e10cSrcweir     aTypes.Add(ret);
74cdf0e10cSrcweir     return ret;
75cdf0e10cSrcweir }
76cdf0e10cSrcweir 
77cdf0e10cSrcweir Ce_id
Store_Operation(DYN CodeEntity & pass_ce)78cdf0e10cSrcweir Ce_Storage::Store_Operation(DYN CodeEntity & pass_ce)
79cdf0e10cSrcweir {
80cdf0e10cSrcweir     Ce_id
81cdf0e10cSrcweir         ret = Store_Entity(pass_ce);
82cdf0e10cSrcweir     aOperations.Add(ret);
83cdf0e10cSrcweir     return ret;
84cdf0e10cSrcweir }
85cdf0e10cSrcweir 
86cdf0e10cSrcweir Ce_id
Store_Datum(DYN CodeEntity & pass_ce)87cdf0e10cSrcweir Ce_Storage::Store_Datum(DYN CodeEntity & pass_ce)
88cdf0e10cSrcweir {
89cdf0e10cSrcweir     Ce_id
90cdf0e10cSrcweir         ret = Store_Entity(pass_ce);
91cdf0e10cSrcweir     aData.Add(ret);
92cdf0e10cSrcweir     return ret;
93cdf0e10cSrcweir }
94cdf0e10cSrcweir 
95cdf0e10cSrcweir 
96cdf0e10cSrcweir 
97cdf0e10cSrcweir }   // namespace cpp
98cdf0e10cSrcweir }   // namespace ary
99