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

kleopatra

  • sources
  • kde-4.12
  • kdepim
  • kleopatra
  • utils
kdtoolsglobal.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (C) 2001-2007 Klarälvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Tools library.
5 **
6 ** This file may be distributed and/or modified under the terms of the
7 ** GNU General Public License version 2 as published by the Free Software
8 ** Foundation and appearing in the file LICENSE.GPL included in the
9 ** packaging of this file.
10 **
11 ** Licensees holding valid commercial KD Tools licenses may use this file in
12 ** accordance with the KD Tools Commercial License Agreement provided with
13 ** the Software.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
19 ** licensing are not clear to you.
20 **
21 **********************************************************************/
22 
23 #ifndef __KDTOOLS_KDTOOLSGLOBAL_H__
24 #define __KDTOOLS_KDTOOLSGLOBAL_H__
25 
26 #include <qglobal.h>
27 
28 #define KDAB_DISABLE_COPY( x ) private: x( const x & ); x & operator=( const x & )
29 
30 #ifdef DOXYGEN_RUN
31 # define KDAB_IMPLEMENT_SAFE_BOOL_OPERATOR( func ) operator unspecified_bool_type() const { return func; }
32 #else
33 # define KDAB_IMPLEMENT_SAFE_BOOL_OPERATOR( func ) \
34  private: struct __safe_bool_dummy__ { void nonnull(); }; \
35  typedef void ( __safe_bool_dummy__::*unspecified_bool_type )(); \
36  public: \
37  operator unspecified_bool_type() const { \
38  return ( func ) ? &__safe_bool_dummy__::nonnull : 0 ; \
39  }
40 #endif
41 
42 #define KDTOOLS_MAKE_RELATION_OPERATORS( Class, linkage ) \
43  linkage bool operator>( const Class & lhs, const Class & rhs ) { \
44  return operator<( lhs, rhs ); \
45  } \
46  linkage bool operator!=( const Class & lhs, const Class & rhs ) { \
47  return !operator==( lhs, rhs ); \
48  } \
49  linkage bool operator<=( const Class & lhs, const Class & rhs ) { \
50  return !operator>( lhs, rhs ); \
51  } \
52  linkage bool operator>=( const Class & lhs, const Class & rhs ) { \
53  return !operator<( lhs, rhs ); \
54  }
55 
56 template <typename T>
57 inline T & __kdtools__dereference_for_methodcall( T & o ) {
58  return o;
59 }
60 
61 template <typename T>
62 inline T & __kdtools__dereference_for_methodcall( T * o ) {
63  return *o;
64 }
65 
66 #define KDAB_SET_OBJECT_NAME( x ) __kdtools__dereference_for_methodcall( x ).setObjectName( QLatin1String( #x ) )
67 
68 #define KDAB_SYNCHRONIZED( mutex ) if ( bool __counter_##__LINE__ = false ) {} else \
69  for ( QMutexLocker __locker_##__LINE__( &__kdtools__dereference_for_methodcall( mutex ) ) ; !__counter_##__LINE__ ; __counter_##__LINE__ = true )
70 
71 #endif /* __KDTOOLS_KDTOOLSGLOBAL_H__ */
72 
__kdtools__dereference_for_methodcall
T & __kdtools__dereference_for_methodcall(T &o)
Definition: kdtoolsglobal.h:57
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kleopatra

Skip menu "kleopatra"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal