1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: namechain.hxx,v $
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_CPP_NAMECHAI_HXX
32 #define ARY_CPP_NAMECHAI_HXX
48 class List_TplParameter
;
54 const char * i_sName
);
55 /** @precond MPT pTemplate.
56 This cannot be used, except of inserting a new element
57 in the segment list of ary::cpp::ut::NameChain. In that
58 case, the template parameter list doe snot yet exist.
61 const NameSegment
& i_rSeg
);
65 List_TplParameter
& AddTemplate();
68 const String
& Name() const;
70 /// @return as strcmp().
72 const NameSegment
& i_rOther
) const;
73 void Get_Text_AsScope(
75 const ary::cpp::Gate
&
77 void Get_Text_AsMainType(
79 StreamStr
& o_rPostName
,
80 const ary::cpp::Gate
&
83 NameSegment
& operator=(const NameSegment
&);
86 Dyn
<List_TplParameter
>
93 typedef std::vector
<NameSegment
>::const_iterator
101 const char * i_sSeg
);
102 /** @precond aSegments.size() > 0.
103 Which means: Add_Segment() has to be called at least once before.
105 List_TplParameter
& Templatize_LastSegment();
108 const_iterator
begin() const { return aSegments
.begin(); }
109 const_iterator
end() const { return aSegments
.end(); }
111 /// @return like strcmp.
113 const NameChain
& i_rChain
) const;
114 /// @ATTENTION Return value is volatile. Not reentrance enabled.
115 const String
& LastSegment() const;
118 StreamStr
& o_rPreName
,
120 StreamStr
& o_rPostName
,
121 const ary::cpp::Gate
&
124 std::vector
< NameSegment
>
131 inline const String
&
132 NameSegment::Name() const