source: trunk/src/cee/RpLibraryCInterface.h @ 554

Last change on this file since 554 was 554, checked in by dkearney, 18 years ago

adjusted units code removing const ints in favor of enum values
adjusted library code to include enum values
added time stamp abilities to rappture library's result function
added cplusplus define checks to header files for c and fortran bindings so people can compile with rappture.h

File size: 3.1 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 *  INTERFACE: C Rappture Library Header
4 *
5 * ======================================================================
6 *  AUTHOR:  Derrick Kearney, Purdue University
7 *  Copyright (c) 2004-2005  Purdue Research Foundation
8 *
9 *  See the file "license.terms" for information on usage and
10 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 * ======================================================================
12 */
13
14
15#ifndef _RpLIBRARY_C_H
16#define _RpLIBRARY_C_H
17
18#ifdef __cplusplus
19    extern "C" {
20#endif // ifdef __cplusplus
21
22typedef struct RpLibrary RpLibrary;
23
24// lib definition functions
25//
26RpLibrary* rpLibrary  (const char* path);
27int rpFreeLibrary     (RpLibrary** lib);
28
29// RpLibrary member functions
30RpLibrary* rpElement (RpLibrary* lib, const char* path);
31RpLibrary* rpElementAsObject (RpLibrary* lib, const char* path);
32int rpElementAsType  (RpLibrary* lib, const char* path, const char** retCStr);
33int rpElementAsComp  (RpLibrary* lib, const char* path, const char** retCStr);
34int rpElementAsId    (RpLibrary* lib, const char* path, const char** retCStr);
35
36RpLibrary* rpChildren (RpLibrary* lib,
37                            const char* path,
38                            RpLibrary* childEle  );
39RpLibrary* rpChildrenByType  (RpLibrary* lib,
40                            const char* path,
41                            RpLibrary* childEle,
42                            const char* type     );
43
44int rpGet            (RpLibrary* lib, const char* path, const char** retCStr);
45int rpGetString      (RpLibrary* lib, const char* path, const char** retCStr);
46int rpGetDouble      (RpLibrary* lib, const char* path, double* retDVal);
47
48int rpPut             (RpLibrary* lib,
49                            const char* path,
50                            const char* value,
51                            const char* id,
52                            int append         );
53/*
54int rpPutStringId     (RpLibrary* lib,
55                            const char* path,
56                            const char* value,
57                            const char* id,
58                            int append         );
59*/
60int rpPutString       (RpLibrary* lib,
61                            const char* path,
62                            const char* value,
63                            int append         );
64/*
65int rpPutDoubleId     (RpLibrary* lib,
66                            const char* path,
67                            double value,
68                            const char* id,
69                            int append         );
70*/
71int rpPutDouble       (RpLibrary* lib,
72                            const char* path,
73                            double value,
74                            int append         );
75
76int rpXml             (RpLibrary* lib, const char** retCStr);
77
78int rpNodeComp        (RpLibrary* node, const char** retCStr);
79int rpNodeType        (RpLibrary* node, const char** retCStr);
80int rpNodeId          (RpLibrary* node, const char** retCStr);
81
82int rpResult          (RpLibrary* lib);
83
84#ifdef __cplusplus
85    }
86#endif // ifdef __cplusplus
87
88#endif // ifndef _RpLIBRARY_C_H
Note: See TracBrowser for help on using the repository browser.