• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KDECore

kdemacros.h.cmake

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002     Copyright (c) 2002-2003 KDE Team
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 
00028 #ifndef _KDE_MACROS_H_
00029 #define _KDE_MACROS_H_
00030 
00031 #cmakedefine __KDE_HAVE_GCC_VISIBILITY
00032 
00072 #ifdef __KDE_HAVE_GCC_VISIBILITY
00073 #define KDE_NO_EXPORT __attribute__ ((visibility("hidden")))
00074 #define KDE_EXPORT __attribute__ ((visibility("default")))
00075 #define KDE_IMPORT __attribute__ ((visibility("default")))
00076 #elif defined(_WIN32) || defined(_WIN64)
00077 #define KDE_NO_EXPORT
00078 #define KDE_EXPORT __declspec(dllexport)
00079 #define KDE_IMPORT __declspec(dllimport)
00080 #else
00081 #define KDE_NO_EXPORT
00082 #define KDE_EXPORT
00083 #define KDE_IMPORT
00084 #endif
00085 
00094 #ifdef __GNUC__
00095 #define KDE_PACKED __attribute__((__packed__))
00096 #else
00097 #define KDE_PACKED
00098 #endif
00099 
00161 #ifdef __cplusplus
00162 # include <QtCore/qglobal.h>
00163 # ifndef KDE_DEPRECATED
00164 #  ifdef KDE_DEPRECATED_WARNINGS
00165 #   define KDE_DEPRECATED Q_DECL_DEPRECATED
00166 #  else
00167 #   define KDE_DEPRECATED
00168 #  endif
00169 # endif
00170 #endif
00171 
00198 #ifndef KDE_CONSTRUCTOR_DEPRECATED
00199 # ifdef __GNUC__
00200 #  if __GNUC__ == 3 && __GNUC_MINOR__ <= 3 
00201     /* GCC 3.3.x cannot handle Qt 4.1.2's definition of Q_DECL_CONSTRUCTOR_DEPRECATED */
00202 #   define KDE_CONSTRUCTOR_DEPRECATED
00203 #  else
00204 #   define KDE_CONSTRUCTOR_DEPRECATED Q_DECL_CONSTRUCTOR_DEPRECATED
00205 #  endif
00206 # else
00207 #  define KDE_CONSTRUCTOR_DEPRECATED Q_DECL_CONSTRUCTOR_DEPRECATED
00208 # endif
00209 #endif
00210 
00218 #cmakedefine KDE_NO_DEPRECATED
00219 
00280 #if defined(__GNUC__) && __GNUC__ - 0 >= 3
00281 # define KDE_ISLIKELY( x )    __builtin_expect(!!(x),1)
00282 # define KDE_ISUNLIKELY( x )  __builtin_expect(!!(x),0)
00283 #else
00284 # define KDE_ISLIKELY( x )   ( x )
00285 # define KDE_ISUNLIKELY( x )  ( x )
00286 #endif
00287 
00288 
00301 #define RESERVE_VIRTUAL_1 \
00302     virtual void reservedVirtual1() {}
00303 
00306 #define RESERVE_VIRTUAL_2 \
00307     virtual void reservedVirtual2() {} \
00308     RESERVE_VIRTUAL_1
00309 
00312 #define RESERVE_VIRTUAL_3 \
00313     virtual void reservedVirtual3() {} \
00314     RESERVE_VIRTUAL_2
00315 
00318 #define RESERVE_VIRTUAL_4 \
00319     virtual void reservedVirtual4() {} \
00320     RESERVE_VIRTUAL_3
00321 
00324 #define RESERVE_VIRTUAL_5 \
00325     virtual void reservedVirtual5() {} \
00326     RESERVE_VIRTUAL_4
00327 
00330 #define RESERVE_VIRTUAL_6 \
00331     virtual void reservedVirtual6() {} \
00332     RESERVE_VIRTUAL_5
00333 
00336 #define RESERVE_VIRTUAL_7 \
00337     virtual void reservedVirtual7() {} \
00338     RESERVE_VIRTUAL_6
00339 
00342 #define RESERVE_VIRTUAL_8 \
00343     virtual void reservedVirtual8() {} \
00344     RESERVE_VIRTUAL_7
00345 
00348 #define RESERVE_VIRTUAL_9 \
00349     virtual void reservedVirtual9() {} \
00350     RESERVE_VIRTUAL_8
00351 #define RESERVE_VIRTUAL_10 \
00352     virtual void reservedVirtual10() {} \
00353     RESERVE_VIRTUAL_9
00354 
00396 #ifdef KDE_FULL_TEMPLATE_EXPORT_INSTANTIATION
00397 # define KDE_DUMMY_COMPARISON_OPERATOR(C) \
00398     bool operator==(const C&) const { \
00399         qWarning(#C"::operator==(const "#C"&) was called"); \
00400         return false; \
00401     }
00402 # define KDE_DUMMY_QHASH_FUNCTION(C) \
00403     inline uint qHash(const C) { \
00404         qWarning("inline uint qHash(const "#C") was called"); \
00405         return 0; \
00406     }
00407 #else
00408 # define KDE_DUMMY_COMPARISON_OPERATOR(C)
00409 # define KDE_DUMMY_QHASH_FUNCTION(C)
00410 #endif
00411 
00434 #ifdef Q_CC_MSVC
00435 # define KDE_BF_ENUM(a) unsigned int
00436 # define KDE_CAST_BF_ENUM(a,b) static_cast<a>(b)
00437 #else
00438 # define KDE_BF_ENUM(a) a
00439 # define KDE_CAST_BF_ENUM(a,b) b
00440 #endif
00441 
00451 #ifdef __GNUC__
00452 #define KDE_WEAK_SYMBOL __attribute__((__weak__))
00453 #else
00454 #define KDE_WEAK_SYMBOL
00455 #endif
00456 
00457 
00466 #ifdef __GNUC__
00467 #define KDE_MUST_USE_RESULT __attribute__((__warn_unused_result__))
00468 #else
00469 #define KDE_MUST_USE_RESULT
00470 #endif
00471 
00472 
00473 
00474 #endif /* _KDE_MACROS_H_ */

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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