• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

language/duchain

classmemberdeclaration.cpp

00001 /* This  is part of KDevelop
00002     Copyright 2002-2005 Roberto Raggi <roberto@kdevelop.org>
00003     Copyright 2006 Adam Treat <treat@kde.org>
00004     Copyright 2006 Hamish Rodda <rodda@kde.org>
00005     Copyright 2007-2008 David Nolden <david.nolden.kdevelop@art-master.de>
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Library General Public
00009    License version 2 as published by the Free Software Foundation.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019    Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #include "classmemberdeclaration.h"
00023 #include "classmemberdeclarationdata.h"
00024 #include "duchainregister.h"
00025 
00026 namespace KDevelop
00027 {
00028 
00029 ClassMemberDeclarationData::ClassMemberDeclarationData()
00030 {
00031   m_accessPolicy = Declaration::Public;
00032   m_isStatic = false;
00033   m_isAuto = false;
00034   m_isFriend = false;
00035   m_isRegister = false;
00036   m_isExtern = false;
00037   m_isMutable = false;
00038   m_isNative = false;
00039   m_isSynchronized = false;
00040   m_isStrictFP = false;
00041   m_isAbstract = false;
00042 }
00043 ClassMemberDeclarationData::ClassMemberDeclarationData( const ClassMemberDeclarationData& rhs )
00044     : DeclarationData( rhs )
00045 {
00046   m_accessPolicy = rhs.m_accessPolicy;
00047   m_isStatic = rhs.m_isStatic;
00048   m_isAuto = rhs.m_isAuto;
00049   m_isFriend = rhs.m_isFriend;
00050   m_isRegister = rhs.m_isRegister;
00051   m_isExtern = rhs.m_isExtern;
00052   m_isMutable = rhs.m_isMutable;
00053   m_isNative = rhs.m_isNative;
00054   m_isSynchronized = rhs.m_isSynchronized;
00055   m_isStrictFP = rhs.m_isStrictFP;
00056   m_isAbstract = rhs.m_isAbstract;
00057 }
00058 
00059 ClassMemberDeclaration::ClassMemberDeclaration(const ClassMemberDeclaration& rhs) : Declaration(*new ClassMemberDeclarationData(*rhs.d_func())) {
00060   setSmartRange(rhs.smartRange(), DocumentRangeObject::DontOwn);
00061 }
00062 
00063 REGISTER_DUCHAIN_ITEM(ClassMemberDeclaration);
00064 
00065 Declaration* ClassMemberDeclaration::clonePrivate() const {
00066   return new ClassMemberDeclaration(*this);
00067 }
00068 
00069 ClassMemberDeclaration::ClassMemberDeclaration(const SimpleRange& range, DUContext* context)
00070   : Declaration(*new ClassMemberDeclarationData, range )
00071 {
00072   d_func_dynamic()->setClassId(this);
00073   if( context )
00074     setContext( context );
00075 }
00076 
00077 ClassMemberDeclaration::ClassMemberDeclaration(ClassMemberDeclarationData& dd, const SimpleRange& range )
00078   : Declaration(dd, range)
00079 {
00080 }
00081 
00082 ClassMemberDeclaration::ClassMemberDeclaration(ClassMemberDeclarationData& dd)
00083   : Declaration(dd)
00084 {
00085 }
00086 
00087 ClassMemberDeclaration::~ClassMemberDeclaration()
00088 {
00089 }
00090 
00091 bool ClassMemberDeclaration::isStatic() const
00092 {
00093   return d_func()->m_isStatic;
00094 }
00095 
00096 void ClassMemberDeclaration::setStatic(bool isStatic)
00097 {
00098   d_func_dynamic()->m_isStatic = isStatic;
00099 }
00100 
00101 bool ClassMemberDeclaration::isAuto() const
00102 {
00103   return d_func()->m_isAuto;
00104 }
00105 
00106 void ClassMemberDeclaration::setAuto(bool isAuto)
00107 {
00108   d_func_dynamic()->m_isAuto = isAuto;
00109 }
00110 
00111 bool ClassMemberDeclaration::isFriend() const
00112 {
00113   return d_func()->m_isFriend;
00114 }
00115 
00116 void ClassMemberDeclaration::setFriend(bool isFriend)
00117 {
00118   d_func_dynamic()->m_isFriend = isFriend;
00119 }
00120 
00121 bool ClassMemberDeclaration::isRegister() const
00122 {
00123   return d_func()->m_isRegister;
00124 }
00125 
00126 void ClassMemberDeclaration::setRegister(bool isRegister)
00127 {
00128   d_func_dynamic()->m_isRegister = isRegister;
00129 }
00130 
00131 bool ClassMemberDeclaration::isExtern() const
00132 {
00133   return d_func()->m_isExtern;
00134 }
00135 
00136 void ClassMemberDeclaration::setExtern(bool isExtern)
00137 {
00138   d_func_dynamic()->m_isExtern = isExtern;
00139 }
00140 
00141 bool ClassMemberDeclaration::isMutable() const
00142 {
00143   return d_func()->m_isMutable;
00144 }
00145 
00146 void ClassMemberDeclaration::setMutable(bool isMutable)
00147 {
00148   d_func_dynamic()->m_isMutable = isMutable;
00149 }
00150 
00151 Declaration::AccessPolicy ClassMemberDeclaration::accessPolicy() const
00152 {
00153   return d_func()->m_accessPolicy;
00154 }
00155 
00156 void ClassMemberDeclaration::setAccessPolicy(Declaration::AccessPolicy accessPolicy)
00157 {
00158   d_func_dynamic()->m_accessPolicy = accessPolicy;
00159 }
00160 
00161 bool ClassMemberDeclaration::isNative() const
00162 {
00163   return d_func()->m_isNative;
00164 }
00165 
00166 void ClassMemberDeclaration::setNative(bool native)
00167 {
00168   d_func_dynamic()->m_isNative = native;
00169 }
00170 
00171 bool ClassMemberDeclaration::isStrictFP() const
00172 {
00173   return d_func()->m_isStrictFP;
00174 }
00175 
00176 void ClassMemberDeclaration::setStrictFP(bool strictFP)
00177 {
00178   d_func_dynamic()->m_isStrictFP = strictFP;
00179 }
00180 
00181 bool ClassMemberDeclaration::isSynchronized() const
00182 {
00183   return d_func()->m_isSynchronized;
00184 }
00185 
00186 void ClassMemberDeclaration::setSynchronized(bool synchronized)
00187 {
00188   d_func_dynamic()->m_isSynchronized = synchronized;
00189 }
00190 
00191 bool ClassMemberDeclaration::isAbstract() const
00192 {
00193   return d_func()->m_isAbstract;
00194 }
00195 
00196 void ClassMemberDeclaration::setAbstract(bool abstract)
00197 {
00198   d_func_dynamic()->m_isAbstract = abstract;
00199 }
00200 
00201 
00202 void ClassMemberDeclaration::setStorageSpecifiers(StorageSpecifiers specifiers)
00203 {
00204   DUCHAIN_D_DYNAMIC(ClassMemberDeclaration);
00205   d->m_isStatic = specifiers & StaticSpecifier;
00206   d->m_isAuto = specifiers & AutoSpecifier;
00207   d->m_isFriend = specifiers & FriendSpecifier;
00208   d->m_isRegister = specifiers & RegisterSpecifier;
00209   d->m_isExtern = specifiers & ExternSpecifier;
00210   d->m_isMutable = specifiers & MutableSpecifier;
00211   d->m_isFinal = specifiers & FinalSpecifier;
00212   d->m_isSynchronized = specifiers & SynchronizedSpecifier;
00213   d->m_isNative = specifiers & NativeSpecifier;
00214   d->m_isStrictFP = specifiers & StrictFPSpecifier;
00215   d->m_isAbstract = specifiers & AbstractSpecifier;
00216 }
00217 }
00218 // kate: space-indent on; indent-width 2; tab-width 4; replace-tabs on; auto-insert-doxygen on

language/duchain

Skip menu "language/duchain"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal