source: branches/1.3/examples/objects/api/c/library @ 3721

Last change on this file since 3721 was 1581, checked in by dkearney, 15 years ago

updates for the rappture objects, object examples, and object apis. small fix for rpunits c interface to check string length. there should probably be more of these checks in the c interface, but units should also be rewritten. added folders to separate out octave2 and octave3 app-fermi examples

File size: 5.1 KB
Line 
1Library
2
3    Rp_LibraryInit()
4    Rp_LibraryCopy(const Rp_Library* o)
5    Rp_LibraryDestroy(Rp_Library *lib)
6
7    Outcome *Rp_LibraryLoadXml(Rp_Library *lib, const char *xmltext)
8    Outcome *Rp_LibraryLoadFile(Rp_Library *lib, const char *filename)
9
10
11    void Rp_LibraryValue(Rp_Library *lib, const char *key,
12        void *storage, size_t numHints, ...)
13
14    Rp_Chain *Rp_LibraryDiff(Rp_Library *lib1, Rp_Library *lib2)
15
16    void Rp_LibraryRemove (Rp_Library *lib, const char *key)
17
18    const char *Rp_LibraryXml(Rp_Library *lib) const
19
20    Outcome *Rp_LibraryOutcome(Rp_Library *lib) const
21    int Rp_LibraryError(Rp_Library *lib) const
22
23    Outcome *Rp_LibraryResult(Rp_Library *lib, int status)
24
25    const Rp_Chain *Rp_LibraryContains(Rp_Library *lib) const
26
27---------------------------------------
28
29Outcome *Rp_LibraryLoadXml(Rp_Library *lib, const char *xmltext)
30    Purpose: parse the Rappture1.1 xml data in "xmltext".
31                populate this library object with the Rappture
32                objects described in the xml data.
33    Input Arguments: 2
34        1. Rp_Library *lib - pointer to Library object
35        1. const char *xmltext - Rappture1.1 xml data
36    Return Value: status of the object
37    Notes: None
38    Code Example:
39
40Outcome *Rp_LibraryLoadFile(Rp_Library *lib, const char *filename);
41    Purpose: read the file "filename" and parse the
42                Rappture1.1 xml data found inside of it.
43                populate this library object with the Rappture
44                objects described in the xml data.
45    Input Arguments: 2
46        1. Rp_Library *lib - pointer to Library object
47        2. const char *filename - file containing Rappture1.1
48                                    xml data
49    Return Value: status of the object
50    Notes: None
51    Code Example:
52
53void Rp_LibraryValue(Rp_Library *lib, const char *key, void *storage,
54                     size_t numHints, ...);
55    Purpose: retrieve the value of the object named "key" and
56                store it in "storage". If there are hints,
57                pass them along to the object being retrieved
58                to tell it how the value should be configured.
59    Input Arguments: at least 4
60        1. Rp_Library *lib - pointer to Library object
61        2. const char *key - name of the object being retrieved
62        3. void *storage - where to place the value of the
63                            retrieved object
64        4. size_t numHints - number of hints provided
65        5. ... - hints listed as strings
66    Return Value: None
67    Notes: hints are listed as strings of the form
68            "hintKey=hintVal". hintKey is the key for the hint
69            and hintVal is the value to be applied to the hint.
70            generally, unrecognized hints are ignored. the hints
71            should be listed as comma separated strings in the
72            function's argument list.
73    Code Example:
74
75Rp_Chain *Rp_LibraryDiff(Rp_Library *lib1, Rp_Library *lib2);
76    Purpose: find the difference between two library objects
77    Input Arguments: 2
78        1. Rp_Library *lib1 - base object used in comparison
79        2. Rp_Library *lib2 - other object used in comparison
80    Return Value: Linked list of differences
81    Notes: None
82    Code Example:
83
84void Rp_LibraryRemove (Rp_Library *lib, const char *key);
85    Purpose: remove the object from this library named "key"
86    Input Arguments: 2
87        1. Rp_Library *lib - pointer to Library object
88        2. const char *key - name of the object to remove
89    Return Value: None
90    Notes: The object is removed and it's memory is deleted
91    Code Example:
92
93const char *Rp_LibraryXml(Rp_Library *lib) const;
94    Purpose: return the Rappture1.1 xml representation of the
95                objects stored in this library.
96    Input Arguments: 1
97        1. Rp_Library *lib - pointer to Library object
98    Return Value: None
99    Notes: user is responsible for free'ing returned memory?
100    Code Example:
101
102Outcome *Rp_LibraryOutcome(Rp_Library *lib) const;
103    Purpose: return the status of the object
104    Input Arguments: 1
105        1. Rp_Library *lib - pointer to Library object
106    Return Value: status of the object
107    Notes: None
108    Code Example:
109
110int Rp_LibraryError(Rp_Library *lib) const;
111    Purpose: return the status of the object
112    Input Arguments: 1
113        1. Rp_Library *lib - pointer to Library object
114    Return Value: status of the object
115    Notes: None
116    Code Example:
117
118Outcome *Rp_LibraryResult(Rp_Library *lib, int status);
119    Purpose: write the stored objects to a data file and
120                signal the end of processing.
121    Input Arguments: 2
122        1. Rp_Library *lib - pointer to Library object
123        2. int status - status of the simulation
124    Return Value: None
125    Notes: currently data file are written out as Rappture1.1
126            xml. this function generates the RAPPTURE-RUN=>
127            signal.
128    Code Example:
129
130const Rp_Chain *Rp_LibraryContains(Rp_Library *lib) const;
131    Purpose: return a linked list of the Rappture objects
132                stored in this library.
133    Input Arguments: 1
134        1. Rp_Library *lib - pointer to Library object
135    Return Value: linked list of the Rappture objects stored in
136                    this library.
137    Notes: None
138    Code Example:
Note: See TracBrowser for help on using the repository browser.