update credits
[LibreOffice.git] / autodoc / source / ary / idl / i_enum.cxx
blobeb33ac7aee537470e9190ea208d110521556c762
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <precomp.h>
21 #include <ary/idl/i_enum.hxx>
22 #include <ary/idl/ik_enum.hxx>
25 // NOT FULLY DECLARED SERVICES
26 #include <cosv/tpl/processor.hxx>
27 #include <sci_impl.hxx>
28 #include "i2s_calculator.hxx"
31 namespace ary
33 namespace idl
36 Enum::Enum( const String & i_sName,
37 Ce_id i_nOwner )
38 : sName(i_sName),
39 nOwner(i_nOwner),
40 aValues()
44 Enum::~Enum()
48 void
49 Enum::do_Accept( csv::ProcessorIfc & io_processor ) const
51 csv::CheckedCall(io_processor, *this);
54 ClassId
55 Enum::get_AryClass() const
57 return class_id;
60 const String &
61 Enum::inq_LocalName() const
63 return sName;
66 Ce_id
67 Enum::inq_NameRoom() const
69 return nOwner;
72 Ce_id
73 Enum::inq_Owner() const
75 return nOwner;
78 E_SightLevel
79 Enum::inq_SightLevel() const
81 return sl_File;
85 namespace ifc_enum
88 inline const Enum &
89 enum_cast( const CodeEntity & i_ce )
91 csv_assert( i_ce.AryClass() == Enum::class_id );
92 return static_cast< const Enum& >(i_ce);
95 void
96 attr::Get_Values( Dyn_CeIterator & o_result,
97 const CodeEntity & i_ce )
99 o_result = new SCI_Vector<Ce_id>(enum_cast(i_ce).aValues);
103 void
104 xref::Get_SynonymTypedefs( Dyn_CeIterator & o_result,
105 const CodeEntity & i_ce )
107 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_SynonymTypedefs));
110 void
111 xref::Get_AsReturns( Dyn_CeIterator & o_result,
112 const CodeEntity & i_ce )
114 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_AsReturns));
117 void
118 xref::Get_AsParameters( Dyn_CeIterator & o_result,
119 const CodeEntity & i_ce )
121 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_AsParameters));
124 void
125 xref::Get_AsDataTypes( Dyn_CeIterator & o_result,
126 const CodeEntity & i_ce )
128 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_AsDataTypes));
131 } // namespace ifc_enum
134 } // namespace idl
135 } // namespace ary
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */