source: trunk/include/fortran/RpLibraryFInterface.h @ 84

Last change on this file since 84 was 84, checked in by dkearney, 18 years ago
  1. added "install" target to make file for copying files over to /opt/rappture
  2. added targets for python to build and install the units module
  3. added fortran stub functions for library and units.

RpLibraryF_test.f compiles, just with warnings, because i'm still working on it.

File size: 5.0 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 *  INTERFACE: Fortran Rappture Library Header
4 *
5 * ======================================================================
6 *  AUTHOR:  Derrick Kearney, Purdue University
7 *  Copyright (c) 2005
8 *  Purdue Research Foundation, West Lafayette, IN
9 * ======================================================================
10 */
11
12#include "RpLibrary.h"
13#include "RpDict.h"
14#include <string.h>
15#include <fstream>
16#include "RpFortranCommon.h"
17#include "RpLibraryFStubs.h"
18
19#ifdef __cplusplus
20    extern "C" {
21#endif
22
23int rp_lib ( const char* filePath, int filePath_len );
24
25void rp_lib_element_comp (  int* handle,
26                            char* path,
27                            char* retText,
28                            int path_len,
29                            int retText_len );
30
31void rp_lib_element_id (    int* handle,
32                            char* path,
33                            char* retText,
34                            int path_len,
35                            int retText_len );
36
37void rp_lib_element_type (  int* handle,
38                            char* path,
39                            char* retText,
40                            int path_len,
41                            int retText_len );
42
43int rp_lib_element_obj (    int* handle,
44                            char* path,
45                            int path_len );
46
47/*
48 * rp_lib_child_num still needs to be written
49 * keep function declaration around
50int rp_lib_child_num (      int* handle,
51                            char* path,
52                            int* childHandle,
53                            int path_len);
54*/
55
56int rp_lib_children (       int* handle, /* integer handle of library */
57                            char* path, /* search path of the xml */
58                            int* childHandle, /*int handle of last returned child*/
59                            int path_len  /*length of the search path buffer*/
60                    );
61
62
63void rp_lib_get (           int* handle,
64                            char* path,
65                            char* retText,
66                            int path_len,
67                            int retText_len );
68
69double rp_lib_get_double (  int* handle,
70                            char* path,
71                            int path_len);
72
73void rp_lib_put_str (       int* handle,
74                            char* path,
75                            char* value,
76                            int* append,
77                            int path_len,
78                            int value_len );
79
80void rp_lib_put_id_str (    int* handle,
81                            char* path,
82                            char* value,
83                            char* id,
84                            int* append,
85                            int path_len,
86                            int value_len,
87                            int id_len );
88
89/*
90 * rp_lib_put_obj still needs to be written
91 * keep function declaration around
92void rp_lib_put_obj (       int* handle,
93                            char* path,
94                            int* valHandle,
95                            int* append,
96                            int path_len );
97*/
98
99/*
100 * rp_lib_put_id_obj still needs to be written
101 * keep function declaration around
102void rp_lib_put_id_obj (    int* handle,
103                            char* path,
104                            int* valHandle,
105                            char* id,
106                            int* append,
107                            int path_len,
108                            int id_len );
109*/
110
111/*
112 * rp_lib_remove still needs to be written
113 * keep function declaration around
114int rp_lib_remove (         int* handle,
115                            char* path,
116                            int path_len);
117*/
118
119/*
120 * rp_lib_xml_len still needs to be written
121 * keep function declaration around
122int rp_lib_xml_len(         int* handle);
123*/
124
125void rp_lib_xml(            int* handle,
126                            char* retText,
127                            int retText_len);
128
129int rp_lib_write_xml(       int* handle,
130                            char* outFile,
131                            int outFile_len);
132
133void rp_lib_node_comp (     int* handle,
134                            char* retText,
135                            int retText_len);
136
137void rp_lib_node_type (     int* handle,
138                            char* retText,
139                            int retText_len);
140
141void rp_lib_node_id (       int* handle,
142                            char* retText,
143                            int retText_len);
144
145void rp_result(             int* handle );
146
147void rp_quit();
148
149
150/**********************************************************/
151
152/**********************************************************/
153
154// private member functions
155int objType( char* flavor);
156
157int storeObject_Lib(RpLibrary* objectName);
158RpLibrary* getObject_Lib(int objKey);
159
160// global vars
161// dictionary to hold the python objects that
162// cannot be sent to fortran
163
164#define DICT_TEMPLATE <int,RpLibrary*>
165RpDict DICT_TEMPLATE fortObjDict_Lib;
166
167#ifdef __cplusplus
168    }
169#endif
Note: See TracBrowser for help on using the repository browser.