1 | /* |
---|
2 | * ---------------------------------------------------------------------- |
---|
3 | * INTERFACE: Common Rappture Dictionary Header |
---|
4 | * |
---|
5 | * ====================================================================== |
---|
6 | * AUTHOR: Derrick S. 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 | #ifndef _RpBINDINGS_DICT_H |
---|
15 | #define _RpBINDINGS_DICT_H |
---|
16 | |
---|
17 | #include "RpDict.h" |
---|
18 | #include "RpUnits.h" |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | // forward declarations so we can compile the object file |
---|
25 | class RpLibrary; |
---|
26 | /* |
---|
27 | class RpUnits; |
---|
28 | */ |
---|
29 | |
---|
30 | #define DICT_TEMPLATE_L <int,RpLibrary*> |
---|
31 | #define DICT_TEMPLATE_U <int,std::string> |
---|
32 | |
---|
33 | // global declaration of library and units dictionaries |
---|
34 | // for languages that cannot return rappture objects. |
---|
35 | // (fortran, matlab, ...) |
---|
36 | |
---|
37 | extern RpDict DICT_TEMPLATE_L ObjDict_Lib; |
---|
38 | extern RpDict DICT_TEMPLATE_U ObjDictUnits; |
---|
39 | |
---|
40 | |
---|
41 | int storeObject_Lib(RpLibrary* objectName, int key=0); |
---|
42 | int storeObject_UnitsStr(std::string objectName); |
---|
43 | |
---|
44 | RpLibrary* getObject_Lib(int objKey); |
---|
45 | const RpUnits* getObject_UnitsStr(int objKey); |
---|
46 | |
---|
47 | void cleanLibDict(); |
---|
48 | void cleanUnitsDict(); |
---|
49 | |
---|
50 | #ifdef __cplusplus |
---|
51 | } |
---|
52 | #endif |
---|
53 | |
---|
54 | #endif // _RpBINDINGS_DICT_H |
---|