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 | |
---|
22 | typedef struct RpLibrary RpLibrary; |
---|
23 | |
---|
24 | // lib definition functions |
---|
25 | // |
---|
26 | RpLibrary* rpLibrary (const char* path); |
---|
27 | int rpFreeLibrary (RpLibrary** lib); |
---|
28 | |
---|
29 | // RpLibrary member functions |
---|
30 | RpLibrary* rpElement (RpLibrary* lib, const char* path); |
---|
31 | RpLibrary* rpElementAsObject (RpLibrary* lib, const char* path); |
---|
32 | int rpElementAsType (RpLibrary* lib, const char* path, const char** retCStr); |
---|
33 | int rpElementAsComp (RpLibrary* lib, const char* path, const char** retCStr); |
---|
34 | int rpElementAsId (RpLibrary* lib, const char* path, const char** retCStr); |
---|
35 | |
---|
36 | RpLibrary* rpChildren (RpLibrary* lib, |
---|
37 | const char* path, |
---|
38 | RpLibrary* childEle ); |
---|
39 | RpLibrary* rpChildrenByType (RpLibrary* lib, |
---|
40 | const char* path, |
---|
41 | RpLibrary* childEle, |
---|
42 | const char* type ); |
---|
43 | |
---|
44 | int rpGet (RpLibrary* lib, const char* path, const char** retCStr); |
---|
45 | int rpGetString (RpLibrary* lib, const char* path, const char** retCStr); |
---|
46 | int rpGetDouble (RpLibrary* lib, const char* path, double* retDVal); |
---|
47 | |
---|
48 | int rpPut (RpLibrary* lib, |
---|
49 | const char* path, |
---|
50 | const char* value, |
---|
51 | const char* id, |
---|
52 | int append ); |
---|
53 | /* |
---|
54 | int rpPutStringId (RpLibrary* lib, |
---|
55 | const char* path, |
---|
56 | const char* value, |
---|
57 | const char* id, |
---|
58 | int append ); |
---|
59 | */ |
---|
60 | int rpPutString (RpLibrary* lib, |
---|
61 | const char* path, |
---|
62 | const char* value, |
---|
63 | int append ); |
---|
64 | /* |
---|
65 | int rpPutDoubleId (RpLibrary* lib, |
---|
66 | const char* path, |
---|
67 | double value, |
---|
68 | const char* id, |
---|
69 | int append ); |
---|
70 | */ |
---|
71 | int rpPutDouble (RpLibrary* lib, |
---|
72 | const char* path, |
---|
73 | double value, |
---|
74 | int append ); |
---|
75 | |
---|
76 | int rpXml (RpLibrary* lib, const char** retCStr); |
---|
77 | |
---|
78 | int rpNodeComp (RpLibrary* node, const char** retCStr); |
---|
79 | int rpNodeType (RpLibrary* node, const char** retCStr); |
---|
80 | int rpNodeId (RpLibrary* node, const char** retCStr); |
---|
81 | |
---|
82 | int rpResult (RpLibrary* lib); |
---|
83 | |
---|
84 | #ifdef __cplusplus |
---|
85 | } |
---|
86 | #endif // ifdef __cplusplus |
---|
87 | |
---|
88 | #endif // ifndef _RpLIBRARY_C_H |
---|