Update ooo320-m1
[ooovba.git] / autodoc / inc / ary / cpp / c_de.hxx
blobe2726e8ccf6f0cbb241c95cde711514bfd1e1df4
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: c_de.hxx,v $
10 * $Revision: 1.3 $
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
36 // USED SERVICES
37 // BASE CLASSES
38 #include <ary/cpp/c_cppentity.hxx>
39 // OTHER
40 #include <ary/loc/loc_types4loc.hxx>
41 #include <ary/cpp/c_traits.hxx>
46 namespace ary
48 namespace cpp
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
59 public:
60 typedef Def_Traits traits_t;
62 virtual ~DefineEntity() {}
64 // INQUIRY
65 De_id DefId() const { return De_id(Id()); }
66 const String & LocalName() const;
67 loc::Le_id Location() const;
68 const StringVector &
69 DefinitionText() const;
70 // ACCESS
71 protected:
72 DefineEntity(
73 const String & i_name,
74 loc::Le_id i_declaringFile );
75 private:
76 // Locals
77 virtual const StringVector &
78 inq_DefinitionText() const = 0;
80 // DATA
81 String sName;
82 loc::Le_id nLocation;
88 // IMPLEMENTATION
89 inline const String &
90 DefineEntity::LocalName() const
91 { return sName; }
93 inline loc::Le_id
94 DefineEntity::Location() const
95 { return nLocation; }
97 inline const StringVector &
98 DefineEntity::DefinitionText() const
99 { return inq_DefinitionText(); }
105 } // end namespace cpp
106 } // end namespace ary
107 #endif