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_service.hxx>
33 // NOT FULLY DECLARED SERVICES
34 #include <cosv/tpl/processor.hxx>
35 #include <ary/idl/ik_service.hxx>
36 #include <ary/doc/d_oldidldocu.hxx>
37 #include <sci_impl.hxx>
38 #include "i2s_calculator.hxx"
46 Service::Service( const String
& i_sName
,
51 aSupportedInterfaces(),
58 for ( RelationList::iterator it
= aIncludedServices
.begin();
59 it
!= aIncludedServices
.end();
65 for ( RelationList::iterator it
= aSupportedInterfaces
.begin();
66 it
!= aSupportedInterfaces
.end();
74 Service::Get_SupportedInterfaces( Dyn_StdConstIterator
<CommentedRelation
> & o_rResult
) const
76 o_rResult
= new SCI_Vector
<CommentedRelation
>(aSupportedInterfaces
);
80 Service::Get_IncludedServices( Dyn_StdConstIterator
<CommentedRelation
> & o_rResult
) const
82 o_rResult
= new SCI_Vector
<CommentedRelation
>(aIncludedServices
);
86 Service::do_Accept( csv::ProcessorIfc
& io_processor
) const
88 csv::CheckedCall(io_processor
, *this);
92 Service::get_AryClass() const
98 Service::inq_LocalName() const
104 Service::inq_NameRoom() const
110 Service::inq_Owner() const
116 Service::inq_SightLevel() const
122 namespace ifc_service
125 inline const Service
&
126 service_cast( const CodeEntity
& i_ce
)
128 csv_assert( i_ce
.AryClass() == Service::class_id
);
129 return static_cast< const Service
& >(i_ce
);
133 attr::Get_IncludedServices( Dyn_StdConstIterator
<CommentedRelation
> & o_result
,
134 const CodeEntity
& i_ce
)
136 o_result
= new SCI_Vector
<CommentedRelation
>( service_cast(i_ce
).aIncludedServices
);
140 attr::Get_ExportedInterfaces( Dyn_StdConstIterator
<CommentedRelation
> & o_result
,
141 const CodeEntity
& i_ce
)
143 o_result
= new SCI_Vector
<CommentedRelation
>( service_cast(i_ce
).aSupportedInterfaces
);
147 attr::Get_Properties( Dyn_CeIterator
& o_result
,
148 const CodeEntity
& i_ce
)
150 o_result
= new SCI_Vector
<Ce_id
>( service_cast(i_ce
).aProperties
);
154 xref::Get_IncludingServices( Dyn_CeIterator
& o_result
,
155 const CodeEntity
& i_ce
)
157 o_result
= new SCI_Vector
<Ce_id
>(i_ce
.Secondaries().List(service_2s_IncludingServices
));
161 xref::Get_InstantiatingSingletons( Dyn_CeIterator
& o_result
,
162 const CodeEntity
& i_ce
)
164 o_result
= new SCI_Vector
<Ce_id
>(i_ce
.Secondaries().List(service_2s_InstantiatingSingletons
));
168 } // namespace ifc_service
174 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */