source: trunk/include/cee/RpLibraryCInterface.h @ 83

Last change on this file since 83 was 83, checked in by dkearney, 19 years ago
  1. More cleaning of RpUnits and RpLibrary? code
  2. added rp_result code to c++/fortran/c code
  3. added rp_children, rp_lib_node[comp,type,id] for fortran code (need to test)
  4. adjusted convert function to recognize statements as follows:

convert("5J","neV")
convert("3.12075e+28neV","J")

  1. made joules a metric unit in RpUnits.cc
  2. tested examples/app-fermi/fortran/fermi.f with new rappture library.

added units conversion.

File size: 3.8 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 *  INTERFACE: C 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
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17    typedef struct RpLibrary RpLibrary;
18
19    // unit definition functions
20    RpLibrary*  library             (const char* path);
21    void freeLibrary                (RpLibrary* lib);
22
23    // RpLibrary member functions
24    RpLibrary*  element             (RpLibrary* lib, const char* path);
25    RpLibrary*  elementAsObject     (RpLibrary* lib, const char* path);
26    const char* elementAsType       (RpLibrary* lib, const char* path);
27    const char* elementAsComp       (RpLibrary* lib, const char* path);
28    const char* elementAsId         (RpLibrary* lib, const char* path);
29
30    RpLibrary* children             (RpLibrary* lib,
31                                     const char* path,
32                                     RpLibrary* childEle);
33    RpLibrary* childrenByType       (RpLibrary* lib,
34                                     const char* path,
35                                     RpLibrary* childEle,
36                                     const char* type   );
37    RpLibrary* childrenAsObject     (RpLibrary* lib,
38                                     const char* path,
39                                     const char* type   );
40    const char* childrenAsType      (RpLibrary* lib,
41                                     const char* path,
42                                     const char* type   );
43    const char* childrenAsComp      (RpLibrary* lib,
44                                     const char* path,
45                                     const char* type   );
46    const char* childrenAsId        (RpLibrary* lib,
47                                     const char* path,
48                                     const char* type   );
49
50    RpLibrary*  get                 (RpLibrary* lib, const char* path);
51    const char* getString           (RpLibrary* lib, const char* path);
52    double      getDouble           (RpLibrary* lib, const char* path);
53
54    void        put                 (RpLibrary* lib,
55                                     const char* path,
56                                     const char* value,
57                                     const char* id,
58                                     int append         );
59    void        putStringId         (RpLibrary* lib,
60                                     const char* path,
61                                     const char* value,
62                                     const char* id,
63                                     int append         );
64    void        putString           (RpLibrary* lib,
65                                     const char* path,
66                                     const char* value,
67                                     int append         );
68    void        putDoubleId         (RpLibrary* lib,
69                                     const char* path,
70                                     double value,
71                                     const char* id,
72                                     int append         );
73    void        putDouble           (RpLibrary* lib,
74                                     const char* path,
75                                     double value,
76                                     int append         );
77
78    const char* xml                 (RpLibrary* lib);
79
80    const char* nodeComp            (RpLibrary* node);
81    const char* nodeType            (RpLibrary* node);
82    const char* nodeId              (RpLibrary* node);
83
84    void        result              (RpLibrary* lib);
85
86#ifdef __cplusplus
87}
88#endif
Note: See TracBrowser for help on using the repository browser.