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 ************************************************************************/
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"
45 Struct::Struct( const String
& i_sName
,
48 const String
& i_sTemplateParameter
,
49 Type_id i_nTemplateParameterType
)
53 sTemplateParameter(i_sTemplateParameter
),
54 nTemplateParameterType(i_nTemplateParameterType
),
64 Struct::do_Accept( csv::ProcessorIfc
& io_processor
) const
66 csv::CheckedCall(io_processor
, *this);
70 Struct::get_AryClass() const
76 Struct::inq_LocalName() const
82 Struct::inq_NameRoom() const
88 Struct::inq_Owner() const
94 Struct::inq_SightLevel() const
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
);
111 attr::Base( const CodeEntity
& i_ce
)
113 return struct_cast(i_ce
).nBase
;
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
);
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
));
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
));
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
));
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
));
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
166 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */