XDispatch 0.7.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
dispatch.h
Go to the documentation of this file.
00001 /*
00002 * Copyright (c) 2011-2012 MLBA-Team. All rights reserved.
00003 *
00004 * @MLBA_OPEN_LICENSE_HEADER_START@
00005 *
00006 * Licensed under the Apache License, Version 2.0 (the "License");
00007 * you may not use this file except in compliance with the License.
00008 * You may obtain a copy of the License at
00009 * 
00010 *     http://www.apache.org/licenses/LICENSE-2.0
00011 * 
00012 * Unless required by applicable law or agreed to in writing, software
00013 * distributed under the License is distributed on an "AS IS" BASIS,
00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015 * See the License for the specific language governing permissions and
00016 * limitations under the License.
00017 *
00018 * @MLBA_OPEN_LICENSE_HEADER_END@
00019 */
00020 
00021 
00022 #ifndef XDISPATCH_H_
00023 #define XDISPATCH_H_
00024 
00030 #include <dispatch/dispatch.h>
00031 #ifndef NSEC_PER_MSEC
00032 # define NSEC_PER_MSEC 1000000ll
00033 #endif
00034 
00035 // quick hack to force the definition of these macros despite a native libdispatch implementation
00036 #ifdef __APPLE__
00037 # define DISPATCH_SOURCE_HAS_DATA_ADD 1
00038 # define DISPATCH_SOURCE_HAS_DATA_OR 1
00039 # define DISPATCH_SOURCE_HAS_MACH_SEND 1
00040 # define DISPATCH_SOURCE_HAS_MACH_RECV 1
00041 # define DISPATCH_SOURCE_HAS_PROC 1
00042 # define DISPATCH_SOURCE_HAS_READ 1
00043 # define DISPATCH_SOURCE_HAS_SIGNAL 1
00044 # define DISPATCH_SOURCE_HAS_TIMER 1
00045 # define DISPATCH_SOURCE_HAS_VNODE 1
00046 # define DISPATCH_SOURCE_HAS_WRITE 1
00047 #endif
00048 
00049 #if defined(__cplusplus)
00050 
00051 #ifndef XDISPATCH_EXPORT
00052 # ifdef _WIN32
00053 #  ifndef __GNUC__
00054 #   pragma warning(disable: 4251) /* disable warning C4251 - * requires dll-interface */
00055 #  endif
00056 #  ifdef XDISPATCH_MAKEDLL
00057 #   define XDISPATCH_EXPORT __declspec(dllexport)
00058 #  else
00059 #   define XDISPATCH_EXPORT __declspec(dllimport)
00060 #  endif
00061 #  define XDISPATCH_DEPRECATED(F) __declspec(deprecated) F
00062 # else
00063 #  define XDISPATCH_EXPORT __attribute__((visibility("default")))
00064 #  define XDISPATCH_DEPRECATED(F) F __attribute__ ((deprecated))
00065 # endif
00066 #endif
00067 
00068 # define __XDISPATCH_BEGIN_NAMESPACE      namespace xdispatch {
00069 # define __XDISPATCH_END_NAMESPACE }
00070 
00071 # define __XDISPATCH_INDIRECT__
00072 # include "pointer.h"
00073 # include "lambda_blocks.h"
00074 # include "base.h"
00075 # include "operation.h"
00076 # include "semaphore.h"
00077 # include "synchronized.h"
00078 # include "once.h"
00079 # include "queue.h"
00080 # include "group.h"
00081 # include "source.h"
00082 # include "timer.h"
00083 # include "lambda_dispatch.h"
00084 # undef __XDISPATCH_INDIRECT__
00085 
00086 #undef XDISPATCH_EXPORT
00087 
00088 #endif /* defined(__cplusplus) */
00089 
00090 /*
00091 #ifdef _WIN32
00092 # pragma warning(default: 4251) // re-enable warning C4251 - we do not want to influence other code
00093 #endif
00094 */
00095 
00098 #endif /* XDISPATCH_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Sun Oct 28 2012 22:12:47 for XDispatch by Doxygen 1.7.6.1
© 2010-2012 MLBA (about | privacy) All Rights reserved.