VSF Documented
vsf_connect_macro.h
Go to the documentation of this file.
1/****************************************************************************
2* Copyright 2020 by Gorgon Meducer (Email:embedded_zhuoran@hotmail.com) *
3* *
4* Licensed under the Apache License, Version 2.0 (the "License"); *
5* you may not use this file except in compliance with the License. *
6* You may obtain a copy of the License at *
7* *
8* http://www.apache.org/licenses/LICENSE-2.0 *
9* *
10* Unless required by applicable law or agreed to in writing, software *
11* distributed under the License is distributed on an "AS IS" BASIS, *
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13* See the License for the specific language governing permissions and *
14* limitations under the License. *
15* *
16****************************************************************************/
17
18/*****************************************************************************
19 * Copyright(C)2009-2022 by VSF Team *
20 * *
21 * Licensed under the Apache License, Version 2.0 (the "License"); *
22 * you may not use this file except in compliance with the License. *
23 * You may obtain a copy of the License at *
24 * *
25 * http://www.apache.org/licenses/LICENSE-2.0 *
26 * *
27 * Unless required by applicable law or agreed to in writing, software *
28 * distributed under the License is distributed on an "AS IS" BASIS, *
29 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
30 * See the License for the specific language governing permissions and *
31 * limitations under the License. *
32 * *
33 ****************************************************************************/
34
35#ifndef __VSF_CONNECT_H__
36#define __VSF_CONNECT_H__
37
38#include "./vsf_eval_macro.h"
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44#define __VSF_MCONNECT0()
45#define __VSF_MCONNECT1( a) a
46#define __VSF_MCONNECT2( a, b) a##b
47#define __VSF_MCONNECT3( a, b, c) a##b##c
48#define __VSF_MCONNECT4( a, b, c, d) a##b##c##d
49#define __VSF_MCONNECT5( a, b, c, d, e) a##b##c##d##e
50#define __VSF_MCONNECT6( a, b, c, d, e, f) a##b##c##d##e##f
51#define __VSF_MCONNECT7( a, b, c, d, e, f, g) a##b##c##d##e##f##g
52#define __VSF_MCONNECT8( a, b, c, d, e, f, g, h) a##b##c##d##e##f##g##h
53#define __VSF_MCONNECT9( a, b, c, d, e, f, g, h, i) a##b##c##d##e##f##g##h##i
54#define __VSF_MCONNECT10(a, b, c, d, e, f, g, h, i, j) a##b##c##d##e##f##g##h##i##j
55#define __VSF_MCONNECT11(a, b, c, d, e, f, g, h, i, j, k) \
56 a##b##c##d##e##f##g##h##i##j##k
57#define __VSF_MCONNECT12(a, b, c, d, e, f, g, h, i, j, k, l) \
58 a##b##c##d##e##f##g##h##i##j##k##l
59#define __VSF_MCONNECT13(a, b, c, d, e, f, g, h, i, j, k, l, m) \
60 a##b##c##d##e##f##g##h##i##j##k##l##m
61#define __VSF_MCONNECT14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
62 a##b##c##d##e##f##g##h##i##j##k##l##m##n
63#define __VSF_MCONNECT15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) \
64 a##b##c##d##e##f##g##h##i##j##k##l##m##n##o
65#define __VSF_MCONNECT16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) \
66 a##b##c##d##e##f##g##h##i##j##k##l##m##n##o##p
67#define __VSF_MCONNECT17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \
68 a##b##c##d##e##f##g##h##i##j##k##l##m##n##o##p##q
69
70#define VSF_MCONNECT0() __VSF_MCONNECT1()
71#define VSF_MCONNECT1( a ) __VSF_MCONNECT1( a )
72#define VSF_MCONNECT2( a, b) __VSF_MCONNECT2( a, b)
73#define VSF_MCONNECT3( a, b, c) __VSF_MCONNECT3( a, b, c)
74#define VSF_MCONNECT4( a, b, c, d) __VSF_MCONNECT4( a, b, c, d)
75#define VSF_MCONNECT5( a, b, c, d, e) __VSF_MCONNECT5( a, b, c, d, e)
76#define VSF_MCONNECT6( a, b, c, d, e, f) __VSF_MCONNECT6( a, b, c, d, e, f)
77#define VSF_MCONNECT7( a, b, c, d, e, f, g) __VSF_MCONNECT7( a, b, c, d, e, f, g)
78#define VSF_MCONNECT8( a, b, c, d, e, f, g, h) __VSF_MCONNECT8( a, b, c, d, e, f, g, h)
79#define VSF_MCONNECT9( a, b, c, d, e, f, g, h, i) __VSF_MCONNECT9( a, b, c, d, e, f, g, h, i)
80#define VSF_MCONNECT10(a, b, c, d, e, f, g, h, i, j) __VSF_MCONNECT10(a, b, c, d, e, f, g, h, i, j)
81#define VSF_MCONNECT11(a, b, c, d, e, f, g, h, i, j, k) \
82 __VSF_MCONNECT11(a, b, c, d, e, f, g, h, i, j, k)
83#define VSF_MCONNECT12(a, b, c, d, e, f, g, h, i, j, k, l) \
84 __VSF_MCONNECT12(a, b, c, d, e, f, g, h, i, j, k, l)
85#define VSF_MCONNECT13(a, b, c, d, e, f, g, h, i, j, k, l, m) \
86 __VSF_MCONNECT13(a, b, c, d, e, f, g, h, i, j, k, l, m)
87#define VSF_MCONNECT14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
88 __VSF_MCONNECT14(a, b, c, d, e, f, g, h, i, j, k, l, m, n)
89#define VSF_MCONNECT15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) \
90 __VSF_MCONNECT15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
91#define VSF_MCONNECT16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) \
92 __VSF_MCONNECT16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
93#define VSF_MCONNECT17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \
94 __VSF_MCONNECT17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q)
95
96#if defined(__cplusplus) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
98# define VSF_MCONNECT(...) VSF_EVAL_MACRO(VSF_MCONNECT, __VA_ARGS__)(__VA_ARGS__)
99#endif
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif