summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-10-14 16:26:19 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-10-14 16:26:19 +0000
commit53b6ac14a0dccc345bab160446c0236a90b05c88 (patch)
treec47da8a35a61b4f8d14b2ab75dbb240ec316f326 /src/include
parent8d89e92aa46c4c26199f49126d859388260436a9 (diff)
Additions to parameter stuff and activethorns - thanks Andre.
Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1042 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cctk_ActiveThorns.h12
-rw-r--r--src/include/cctk_ParameterFunctions.h104
2 files changed, 114 insertions, 2 deletions
diff --git a/src/include/cctk_ActiveThorns.h b/src/include/cctk_ActiveThorns.h
index eb1f2f60..542cb63c 100644
--- a/src/include/cctk_ActiveThorns.h
+++ b/src/include/cctk_ActiveThorns.h
@@ -11,6 +11,10 @@
#ifndef __ACTIVETHORNS_H_
#define __ACTIVETHORNS_H_
+#include <stdio.h>
+#include "SKBinTree.h"
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -23,8 +27,12 @@ int CCTKi_ListThorns(FILE *file, const char *format, int active);
int CCTKi_ListImplementations(FILE *file, const char *format, int active);
const char *CCTK_ActivatingThorn(const char *imp);
- /* FIXME - should return a list or something */
-t_sktree *CCTK_ImpThornList(const char *imp);
+/* FIXME - should return a list or something */
+t_sktree *CCTK_ImpThornList (const char *imp);
+
+/* public routines to get information about thorns and imps */
+int CCTK_ImpList (int active, char ***list, int *n_implementations);
+int CCTK_ThornList (const char* imp, char ***list, int *n_thorns);
#ifdef __cplusplus
diff --git a/src/include/cctk_ParameterFunctions.h b/src/include/cctk_ParameterFunctions.h
new file mode 100644
index 00000000..0babf36d
--- /dev/null
+++ b/src/include/cctk_ParameterFunctions.h
@@ -0,0 +1,104 @@
+ /*@@
+ @file cctk_ParameterFunctions.h
+ @date Wed Sep 8 10:46:19 MSZ 1999
+ @author Andre Merzky
+ @desc
+ Public defines for parameter stuff
+ @enddesc
+ @version $Header$
+ @@*/
+
+#ifndef _CCTK_PARAMETERFUNCTIONS_H
+#define _CCTK_PARAMETERFUNCTIONS_H
+
+/* this include file declares all parameter structs/defines which
+ * should be visible and useable for some thorn programmers.
+ * At first of all this means (read) access to parameter properties.
+ * Direct acces to parameter values (or its data pointers) are not
+ * allowed. The functions/declarations for this are in
+ * ParameterBindings.h, which in turn includes this file.
+ */
+
+/* thes SCOPE* defines are used as flags fo parameter scopes. */
+
+#define SCOPE_GLOBAL 1 /* parameter is visible everywhere */
+#define SCOPE_RESTRICTED 2 /* parameter is visible for friend thorns only */
+#define SCOPE_PRIVATE 3 /* parameter is visible for parent thorn only */
+#define SCOPE_NOT_GLOBAL 4 /* parameter is not visible everywhere */
+#define SCOPE_ANY 5 /* parameter scope is undefined/arbitrary */
+
+
+
+/* parameter types ***Tom: correct? *** */
+
+#define PARAMETER_KEYWORD 1 /* parameter is keyword */
+#define PARAMETER_STRING 2 /* parameter is string */
+#define PARAMETER_SENTENCE 3 /* parameter is sentence */
+#define PARAMETER_INT 4 /* parameter is integer */
+#define PARAMETER_INTEGER 4 /* parameter is integer */
+#define PARAMETER_REAL 5 /* parameter is float */
+#define PARAMETER_BOOLEAN 6 /* parameter is bool */
+
+
+
+/* what is a parameter range:
+ * list of independent ranges, each with
+ * - orig string (range)
+ * - active flag
+ * - description
+ */
+typedef struct RANGE
+{
+ struct RANGE* last;
+ struct RANGE* next;
+ char* range;
+ char* origin;
+ int active;
+ char* description;
+} t_range;
+
+
+/* what are parameter properties:
+ * everything users may know about paras:
+ * - name
+ * - thorn it belongs to
+ * - scope
+ * - description
+ * - default value
+ * - type
+ * - range (see above)
+ * - number of times it has been set
+ * - steerable flag
+ */
+typedef struct PARAM_PROPS
+{
+ char* name;
+ char* thorn;
+ int scope;
+
+ char* description;
+ char* defval;
+
+ int type;
+ t_range* range;
+
+ int n_set;
+ int steerable;
+
+} t_param_prop;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/* get list of parameter names for given thorn */
+int CCTK_ParList (const char* thorn, char ***paramlist, int *n_param);
+
+/* get parameter properties for gven parameter/thorn pair */
+t_param_prop* CCTK_ParInfo (const char* name,
+ const char* thorn);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CCTK_PARAMETERFUNCTIONS_H */