summaryrefslogtreecommitdiff
path: root/src/include/CactusCommFunctions.h
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-02-04 09:27:42 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-02-04 09:27:42 +0000
commitaaa78240ef7409f27bfadf3916d095eb0007bfa9 (patch)
tree7141af89a69c40a9beee5bc4ee60f320f9862b74 /src/include/CactusCommFunctions.h
parent4ec2152e21ddce9f873f6d1d4beb0b5b9bec3c41 (diff)
Rationalised the overloading of functions. Goodbye RegisterKeyedFunction,
hello Overloadable ! Now each subdirectory has one header file (in the include dir) which defines the overloadable functions. Macros are then applied to the header file to produce functions of the form CCTK_OverloadFoo(... (*func)(...)) to overload the function, and to create prototypes, dummy functions, and if statements which can be used to assign dummy (or other default) functions to any overloadable function which hasn't been assigned. The resulting functions have names of the form CCTK_Foo() As a byproduct of this the communication layer should work, 'though it's all dummy functions there at the moment, but at least you can call the functions. I've put OutputGH and OutputGroup in the IO layer, but can't remember precisely what we had decided as the canonical set of overloadable functions for IO. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@206 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/CactusCommFunctions.h')
-rw-r--r--src/include/CactusCommFunctions.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/include/CactusCommFunctions.h b/src/include/CactusCommFunctions.h
index 329fa9f8..3cabbfd3 100644
--- a/src/include/CactusCommFunctions.h
+++ b/src/include/CactusCommFunctions.h
@@ -12,23 +12,21 @@
#ifndef _CACTUSCOMMFUNCTIONS_H_
#define _CACTUSCOMMFUNCTIONS_H_
+#include <stdarg.h>
+
+#include "OverloadMacros.h"
+
#ifdef _cplusplus
extern "C" {
#endif
/* The functions. */
-extern cGH * (*SetupGH)(tFleshConfig *, int);
-extern int (*SetupGF)(cGH *, cGF *);
-
-extern int (*SyncAllFuncs)(cGH *);
-extern int (*SyncGroupFuncs)(cGH *, const char *group);
-extern int (*SyncOneFunc)(cGH*, int );
+#define OVERLOADABLE(name) OVERLOADABLE_PROTOTYPE(name)
-extern int (*ParallelInit)(tFleshConfig *);
-extern int (*ParallelFinalise)(tFleshConfig *);
+#include "CommOverloadables.h"
-extern int (*Reduce)(cGH *, int , int operation, void *result);
+#undef OVERLOADABLE(name)
#ifdef _cplusplus
}