Update ooo320-m1
[ooovba.git] / autodoc / source / ary / idl / it_xnameroom.hxx
blob4e6ad3063240818b4b3106cd58a2c8ab81b76b15
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: it_xnameroom.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ARY_IDL_IT_XNAMEROOM_HXX
32 #define ARY_IDL_IT_XNAMEROOM_HXX
34 // BASE CLASSES
35 #include <ary/idl/i_type.hxx>
36 #include <nametreenode.hxx>
41 namespace ary
43 namespace idl
47 /** A namespace for ->Type s, as they are explicitely written in code.
49 The search/identification string is usually the local name of
50 the Type. But for templated structs, the search string has this
51 pattern:
52 <LocalName> '<' <StringOfTemplateTypeId>
54 class ExplicitNameRoom : public Type
56 public:
57 enum E_ClassId { class_id = 2204 };
59 // LIFECYCLE
60 ExplicitNameRoom();
61 ExplicitNameRoom(
62 const String & i_sName,
63 const ExplicitNameRoom &
64 i_rParent );
65 virtual ~ExplicitNameRoom();
67 // OPERATIONS
68 /** @param i_sSearchString
69 A local type name usually.
70 For templated types see class docu.
71 @see ExplicitNameRoom
73 void Add_Name(
74 const String & i_sSearchString,
75 Type_id i_nId )
76 { aImpl.Add_Name(i_sSearchString,i_nId); }
77 // INQUIRY
78 const String & Name() const { return aImpl.Name(); }
79 intt Depth() const { return aImpl.Depth(); }
80 void Get_FullName(
81 StringVector & o_rText,
82 Ce_idList * o_pRelatedCes,
83 const Gate & i_rGate ) const;
84 bool IsAbsolute() const { return Depth() > 0
85 ? (*NameChain_Begin()).empty()
86 : false; }
87 /** @param i_sSearchString
88 A local type name usually.
89 For templated types see class docu.
90 @see ExplicitNameRoom
92 Type_id Search_Name(
93 const String & i_sSearchString ) const
94 { return aImpl.Search_Name(i_sSearchString); }
96 StringVector::const_iterator
97 NameChain_Begin() const
98 { return aImpl.NameChain_Begin(); }
99 StringVector::const_iterator
100 NameChain_End() const
101 { return aImpl.NameChain_End(); }
102 private:
103 // Interface csv::ConstProcessorClient:
104 virtual void do_Accept(
105 csv::ProcessorIfc & io_processor ) const;
106 // Interface Object:
107 virtual ClassId get_AryClass() const;
109 // Interface Type:
110 virtual void inq_Get_Text(
111 StringVector & o_module,
112 String & o_name,
113 Ce_id & o_nRelatedCe,
114 int & o_nSequemceCount,
115 const Gate & i_rGate ) const;
116 // DATA
117 NameTreeNode<Type_id>
118 aImpl;
124 } // namespace idl
125 } // namespace ary
126 #endif