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: c_vfflag.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_C_VFFLAG_HXX
32 #define ARY_CPP_C_VFFLAG_HXX
43 /** Properties of C++ variables.
50 f_static_local
= 0x0001,
51 f_static_member
= 0x0002,
60 void Reset() { nFlags
= 0; }
62 void SetStaticLocal() { nFlags
|= f_static_local
; }
63 void SetStaticMember() { nFlags
|= f_static_member
; }
64 void SetExtern() { nFlags
|= f_extern
; }
65 void SetMutable() { nFlags
|= f_mutable
; }
67 bool IsStaticLocal() const { return (nFlags
& f_static_local
) != 0; }
68 bool IsStaticMember() const { return (nFlags
& f_static_member
) != 0; }
69 bool IsExtern() const { return (nFlags
& f_extern
) != 0; }
70 bool IsMutable() const { return (nFlags
& f_mutable
) != 0; }
77 /** Properties of C++ functions.
84 f_static_local
= 0x0001,
85 f_static_member
= 0x0002,
101 { return nFlags
== i_ff
.nFlags
; }
103 const FunctionFlags
&
105 { return NOT
operator==(i_ff
); }
107 void Reset() { nFlags
= 0; }
109 void SetStaticLocal() { nFlags
|= f_static_local
; }
110 void SetStaticMember() { nFlags
|= f_static_member
; }
111 void SetExtern() { nFlags
|= f_extern
; }
112 void SetExternC() { nFlags
|= f_externC
; }
113 void SetMutable() { nFlags
|= f_mutable
; }
114 void SetInline() { nFlags
|= f_inline
; }
115 void SetRegister() { nFlags
|= f_register
; }
116 void SetExplicit() { nFlags
|= f_explicit
; }
118 bool IsStaticLocal() const { return (nFlags
& f_static_local
) != 0; }
119 bool IsStaticMember() const { return (nFlags
& f_static_member
) != 0; }
120 bool IsExtern() const { return (nFlags
& f_extern
) != 0; }
121 bool IsExternC() const { return (nFlags
& f_externC
) != 0; }
122 bool IsMutable() const { return (nFlags
& f_mutable
) != 0; }
123 bool IsInline() const { return (nFlags
& f_inline
) != 0; }
124 bool IsRegister() const { return (nFlags
& f_register
) != 0; }
125 bool IsExplicit() const { return (nFlags
& f_explicit
) != 0; }
132 /** A C++ function parameter.
137 String sSizeExpression
;
138 String sInitExpression
;
141 S_Parameter() : nType(0) {}
143 void Empty() { nType
= Type_id(0);
145 sSizeExpression
.clear();
146 sInitExpression
.clear(); }