1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #include <precomp.h>
29 #include "it_xnameroom.hxx"
30 
31 
32 // NOT FULLY DEFINED SERVICES
33 #include <cosv/tpl/processor.hxx>
34 #include <cosv/tpl/tpltools.hxx>
35 #include <ary/idl/i_gate.hxx>
36 #include <ary/idl/ip_type.hxx>
37 
38 
39 
40 namespace ary
41 {
42 namespace idl
43 {
44 
45 
46 ExplicitNameRoom::ExplicitNameRoom()
47     :   aImpl()
48 {
49 }
50 
51 ExplicitNameRoom::ExplicitNameRoom( const String &           i_sName,
52                                     const ExplicitNameRoom & i_rParent )
53     :   aImpl( i_sName, i_rParent.aImpl, i_rParent.TypeId() )
54 {
55 }
56 
57 ExplicitNameRoom::~ExplicitNameRoom()
58 {
59 }
60 
61 ClassId
62 ExplicitNameRoom::get_AryClass() const
63 {
64     return class_id;
65 }
66 
67 void
68 ExplicitNameRoom::do_Accept( csv::ProcessorIfc & io_processor ) const
69 {
70     csv::CheckedCall(io_processor, *this);
71 }
72 
73 void
74 ExplicitNameRoom::inq_Get_Text( StringVector &      o_module,
75                                 String &            ,           // o_name
76                                 Ce_id &             ,           // o_nRelatedCe
77                                 int &               ,           // o_nSequemceCount
78                                 const Gate &        ) const     // i_rGate
79 {
80 	StringVector::const_iterator it = NameChain_Begin();
81     if ( it != NameChain_End()
82 			? (*it).empty()
83 			: false )
84 	{	// Don't put out the root global namespace
85 		++it;
86 	}
87 
88     for ( ;
89           it != NameChain_End();
90           ++it )
91     {
92         o_module.push_back(*it);
93     }
94 }
95 
96 
97 
98 
99 }   // namespace idl
100 }   // namespace ary
101