summaryrefslogtreecommitdiff
path: root/src/include/StoreHandledData.h
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-02-02 10:45:27 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-02-02 10:45:27 +0000
commitb52ffba9cbe097a2726aaf1c0eaf4828937457fa (patch)
tree226f1c3e877cc113a56aac97f5a10523494bc642 /src/include/StoreHandledData.h
parent0a85e00fbce5cbd62ef88cdfb61a0aaf146345ed (diff)
Finished and tested the handled data routines.
Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@169 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/StoreHandledData.h')
-rw-r--r--src/include/StoreHandledData.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/include/StoreHandledData.h b/src/include/StoreHandledData.h
new file mode 100644
index 00000000..b17acafb
--- /dev/null
+++ b/src/include/StoreHandledData.h
@@ -0,0 +1,46 @@
+ /*@@
+ @header StoreHandledData.h
+ @date Tue Feb 2 10:56:31 1999
+ @author Tom Goodale
+ @desc
+ Header file for handled data routines
+ @enddesc
+ @version $Id$
+ @@*/
+
+#ifndef _STOREHANDLEDDATA_H_
+
+#define _STOREHANDLEDDATA_H_
+
+/* Define a data types for the storage. */
+typedef struct
+{
+ unsigned int in_use;
+ char *name;
+ void *data;
+} cHandleStorage;
+
+typedef struct
+{
+ cHandleStorage *array;
+ unsigned array_size;
+ unsigned first_unused;
+} cHandledData;
+
+/* Function prototypes. */
+
+#ifdef _cplusplus
+extern "C"
+{
+#endif
+
+int CCTK_NewHandle(cHandledData **storage, char *name, void *data);
+int CCTK_DeleteHandle(cHandledData *storage, int handle);
+void *CCTK_GetHandledData(cHandledData *storage, int handle);
+int CCTK_GetHandle(cHandledData *storage, const char *name, void **data);
+
+#ifdef _cplusplus
+}
+#endif
+
+#endif