Bump for 3.6-28
[LibreOffice.git] / autodoc / source / ary / idl / i_struct.cxx
blobff691c211a89ca066de0ac8e6fb5ad1e24101efe
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_struct.hxx>
31 #include <ary/idl/ik_struct.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 Struct::Struct( const String & i_sName,
46 Ce_id i_nOwner,
47 Type_id i_nBase,
48 const String & i_sTemplateParameter,
49 Type_id i_nTemplateParameterType )
50 : sName(i_sName),
51 nOwner(i_nOwner),
52 nBase(i_nBase),
53 sTemplateParameter(i_sTemplateParameter),
54 nTemplateParameterType(i_nTemplateParameterType),
55 aElements()
59 Struct::~Struct()
63 void
64 Struct::do_Accept( csv::ProcessorIfc & io_processor ) const
66 csv::CheckedCall(io_processor, *this);
69 ClassId
70 Struct::get_AryClass() const
72 return class_id;
75 const String &
76 Struct::inq_LocalName() const
78 return sName;
81 Ce_id
82 Struct::inq_NameRoom() const
84 return nOwner;
87 Ce_id
88 Struct::inq_Owner() const
90 return nOwner;
93 E_SightLevel
94 Struct::inq_SightLevel() const
96 return sl_File;
100 namespace ifc_struct
103 inline const Struct &
104 struct_cast( const CodeEntity & i_ce )
106 csv_assert( i_ce.AryClass() == Struct::class_id );
107 return static_cast< const Struct& >(i_ce);
110 Type_id
111 attr::Base( const CodeEntity & i_ce )
113 return struct_cast(i_ce).nBase;
116 void
117 attr::Get_Elements( Dyn_CeIterator & o_result,
118 const CodeEntity & i_ce )
120 o_result = new SCI_Vector<Ce_id>( struct_cast(i_ce).aElements );
124 void
125 xref::Get_Derivations( Dyn_CeIterator & o_result,
126 const CodeEntity & i_ce )
128 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_Derivations));
131 void
132 xref::Get_SynonymTypedefs( Dyn_CeIterator & o_result,
133 const CodeEntity & i_ce )
135 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_SynonymTypedefs));
138 void
139 xref::Get_AsReturns( Dyn_CeIterator & o_result,
140 const CodeEntity & i_ce )
142 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_AsReturns));
145 void
146 xref::Get_AsParameters( Dyn_CeIterator & o_result,
147 const CodeEntity & i_ce )
149 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_AsParameters));
152 void
153 xref::Get_AsDataTypes( Dyn_CeIterator & o_result,
154 const CodeEntity & i_ce )
156 o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_AsDataTypes));
159 } // namespace ifc_struct
163 } // namespace idl
164 } // namespace ary
166 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */