Bump for 3.6-28
[LibreOffice.git] / autodoc / source / ary / idl / i_enum.cxx
blob9d01c2b19ce56787e6d428de4ef63ab7f371b1ea
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #include <precomp.h>
30 #include <ary/idl/i_enum.hxx>
31 #include <ary/idl/ik_enum.hxx>
34 // NOT FULLY DECLARED SERVICES
35 #include <cosv/tpl/processor.hxx>
36 #include <sci_impl.hxx>
37 #include "i2s_calculator.hxx"
40 namespace ary
42 namespace idl
45 Enum::Enum( const String & i_sName,
46 Ce_id i_nOwner )
47 : sName(i_sName),
48 nOwner(i_nOwner),
49 aValues()
53 Enum::~Enum()
57 void
58 Enum::do_Accept( csv::ProcessorIfc & io_processor ) const
60 csv::CheckedCall(io_processor, *this);
63 ClassId
64 Enum::get_AryClass() const
66 return class_id;
69 const String &
70 Enum::inq_LocalName() const
72 return sName;
75 Ce_id
76 Enum::inq_NameRoom() const
78 return nOwner;
81 Ce_id
82 Enum::inq_Owner() const
84 return nOwner;
87 E_SightLevel
88 Enum::inq_SightLevel() const
90 return sl_File;
94 namespace ifc_enum
97 inline const Enum &
98 enum_cast( const CodeEntity & i_ce )
100 csv_assert( i_ce.AryClass() == Enum::class_id );
101 return static_cast< const Enum& >(i_ce);
104 void
105 attr::Get_Values( Dyn_CeIterator & o_result,
106 const CodeEntity & i_ce )
108 o_result = new SCI_Vector<Ce_id>(enum_cast(i_ce).aValues);
112 void
113 xref::Get_SynonymTypedefs( Dyn_CeIterator & o_result,
114 const CodeEntity & i_ce )
116 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_SynonymTypedefs));
119 void
120 xref::Get_AsReturns( Dyn_CeIterator & o_result,
121 const CodeEntity & i_ce )
123 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_AsReturns));
126 void
127 xref::Get_AsParameters( Dyn_CeIterator & o_result,
128 const CodeEntity & i_ce )
130 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_AsParameters));
133 void
134 xref::Get_AsDataTypes( Dyn_CeIterator & o_result,
135 const CodeEntity & i_ce )
137 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_AsDataTypes));
140 } // namespace ifc_enum
143 } // namespace idl
144 } // namespace ary
146 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */