result_p.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __GPGMEPP_RESULT_P_H__
00022 #define __GPGMEPP_RESULT_P_H__
00023
00024 #define make_copy_ctor(x) \
00025 GpgME::x::x( const x & other ) \
00026 : GpgME::Result( other ), d( other.d ) \
00027 { \
00028 if ( d ) \
00029 d->ref(); \
00030 }
00031
00032 #define make_error_ctor(x) \
00033 GpgME::x::x( const Error & error ) \
00034 : GpgME::Result( error ), d( 0 ) \
00035 { \
00036 \
00037 }
00038
00039 #define make_assignment_operator(x) \
00040 const GpgME::x & GpgME::x::operator=( const x & other ) { \
00041 if ( other.d ) \
00042 other.d->ref(); \
00043 if ( this->d ) \
00044 this->d->unref(); \
00045 this->d = other.d; \
00046 \
00047 Result::operator=( other ); \
00048 \
00049 return *this; \
00050 }
00051
00052 #define make_dtor(x) \
00053 GpgME::x::~x() { \
00054 if ( d ) \
00055 d->unref(); \
00056 d = 0; \
00057 }
00058
00059 #define make_isNull(x) bool GpgME::x::isNull() const { return !d && !error(); }
00060
00061 #define make_standard_stuff(x) \
00062 make_copy_ctor(x) \
00063 make_error_ctor(x) \
00064 make_assignment_operator(x) \
00065 make_isNull(x) \
00066 make_dtor(x)
00067
00068
00069 #endif // __GPGMEPP_RESULT_P_H__
This file is part of the documentation for libkdenetwork Library Version 3.3.2.