source: trunk/examples/objects/api/python/library @ 1610

Last change on this file since 1610 was 1610, checked in by dkearney, 11 years ago

updates and adding example code to python and tcl apis

File size: 3.9 KB
Line 
1Rappture.Library
2
3constructors
4    Rappture.Library()
5    Rappture.Library(lib2)
6
7methods
8    lib.loadXml(xmltext)
9    lib.loadFile(filename)
10    lib.value(key[, ...])
11    lib.diff(lib2)
12    lib.remove(key)
13    lib.xml()
14    lib.outcome()
15    lib.error()
16    lib.result(status)
17    lib.contains()
18
19---------------------------------------
20
21Rappture.Library()
22    Purpose: construct an empty Rappture Library object
23    Input Arguments: 0
24    Return Value: empty Rappture Library object
25    Notes: None
26    Code Example:
27
28Rappture.Library(lib2)
29    Purpose: construct a copy of a Rappture Library object
30    Input Arguments: 1
31        1. lib2 - Rappture Library object to be copied
32    Return Value: copy of a Rappture Library object
33    Notes: None
34    Code Example:
35
36lib.loadXml(xmltext)
37    Purpose: parse the Rappture1.1 xml data in "xmltext".
38                populate this library object with the Rappture
39                objects described in the xml data.
40    Input Arguments: 1
41        1. xmltext - string of Rappture1.1 xml data
42    Return Value: status of the object
43    Notes: None
44    Code Example:
45
46lib.loadFile(filename)
47    Purpose: read the file "filename" and parse the
48                Rappture1.1 xml data found inside of it.
49                populate this library object with the Rappture
50                objects described in the xml data.
51    Input Arguments: 1
52        1. filename - name of file containing Rappture1.1
53                      xml data
54    Return Value: status of the object
55    Notes: None
56    Code Example:
57
58lib.value(key[, ...])
59    Purpose: retrieve the value of the object named "key" and
60                return it to the user. If there are hints,
61                pass them along to the object being retrieved
62                to tell it how the value should be configured.
63    Input Arguments: at least 1
64        1. key - name of the object being retrieved
65        2. ... - hints listed as strings
66    Return Value: value of the object named key
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
75lib.diff(lib2)
76    Purpose: find the difference between two library objects
77    Input Arguments: 1
78        1. lib2 - other object used in comparison
79    Return Value: List of differences
80    Notes: None
81    Code Example:
82
83lib.remove(key)
84    Purpose: remove the object from this library named "key"
85    Input Arguments: 1
86        1. key - name of the object to remove
87    Return Value: None
88    Notes: The object is removed and it's memory is deleted
89    Code Example:
90
91lib.xml()
92    Purpose: return the Rappture1.1 xml representation of the
93                objects stored in this library.
94    Input Arguments: 0
95    Return Value: None
96    Notes: user is responsible for free'ing returned memory?
97    Code Example:
98
99lib.outcome()
100    Purpose: return the status of the object
101    Input Arguments: 0
102    Return Value: status of the object
103    Notes: None
104    Code Example:
105
106lib.error()
107    Purpose: return the status of the object
108    Input Arguments: 0
109    Return Value: status of the object
110    Notes: None
111    Code Example:
112
113lib.result(status)
114    Purpose: write the stored objects to a data file and
115                signal the end of processing.
116    Input Arguments: 1
117        1. int status - status of the simulation
118    Return Value: None
119    Notes: currently data file are written out as Rappture1.1
120            xml. this function generates the RAPPTURE-RUN=>
121            signal.
122    Code Example:
123
124lib.contains()
125    Purpose: return a list of the Rappture objects
126                stored in this library.
127    Input Arguments: 0
128    Return Value: list of the Rappture objects stored in
129                    this library.
130    Notes: None
131    Code Example:
Note: See TracBrowser for help on using the repository browser.