Skip to content

Commit e40459f

Browse files
committed
Make get_varset_members return both names and indexes as a convenience, since every downstream function now takes the index
1 parent ba6254c commit e40459f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

bmi.sidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package csdms version 3.0-alpha1 {
1818

1919
// Variable set information
2020
int get_varset_member_count(in string set_name, out int count);
21-
int get_varset_members(in string set_name, out array<string, 1> names);
21+
int get_varset_members(in string set_name, out array<string, 1> names, out array<int, 1> indexes);
2222

2323
// Variable information
2424
int get_var_index(in string name, out int index);

docs/source/bmi.info_funcs.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,25 +94,25 @@ Gets the number of exchange items in a particular set exposed by the model.
9494
:sync: sidl
9595
9696
```java
97-
int get_varset_members(in string set_name, out array<string, 1> names);
97+
int get_varset_members(in string set_name, out array<string, 1> names, out array<int, 1> indexes);
9898
```
9999
:::
100100
:::{tab-item} Python
101101
:sync: python
102102
```python
103-
def get_varset_members(self, set_name: str) -> tuple[str, ...]:
103+
def get_varset_members(self, set_name: str) -> Mapping[str, int]:
104104
```
105105
:::
106106
:::{tab-item} c
107107
:sync: c
108108
```c
109-
int get_varset_members(void *self, const char *name, char const* const* members);
109+
int get_varset_members(void *self, const char *name, char const* const* members, int *indexes);
110110
```
111111
:::
112112
::::
113113
114-
Gets an array of names for the variables the model publishes in the requested set.
115-
The length of the array is given by {ref}`get-varset-member-count`.
114+
Gets the names and indexes for the variables the model publishes in the requested set.
115+
The length of each array is given by {ref}`get-varset-member-count`.
116116
The names are preferably in the form of CSDMS {term}`Standard Names`.
117117
Standard Names enable a modeling framework to determine whether a
118118
variable in one model is equivalent to, or compatible with,

0 commit comments

Comments
 (0)