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_de.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_DE_HXX
32 #define ARY_CPP_C_DE_HXX
38 #include <ary/cpp/c_cppentity.hxx>
40 #include <ary/loc/loc_types4loc.hxx>
41 #include <ary/cpp/c_traits.hxx>
52 /** Describes a C/C++ #define statement. May be a define or a macro, for which
53 two cases the two different constructors are to be used.
55 This class is used by cpp::PreProcessor.
57 class DefineEntity
: public ary::cpp::CppEntity
60 typedef Def_Traits traits_t
;
62 virtual ~DefineEntity() {}
65 De_id
DefId() const { return De_id(Id()); }
66 const String
& LocalName() const;
67 loc::Le_id
Location() const;
69 DefinitionText() const;
73 const String
& i_name
,
74 loc::Le_id i_declaringFile
);
77 virtual const StringVector
&
78 inq_DefinitionText() const = 0;
90 DefineEntity::LocalName() const
94 DefineEntity::Location() const
97 inline const StringVector
&
98 DefineEntity::DefinitionText() const
99 { return inq_DefinitionText(); }
105 } // end namespace cpp
106 } // end namespace ary