Skip to content

Commit fa09ce2

Browse files
committed
use map-bmi-function directive for var functions
1 parent 91791de commit fa09ce2

File tree

1 file changed

+72
-37
lines changed

1 file changed

+72
-37
lines changed

docs/source/bmi.var_funcs.md

Lines changed: 72 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,26 @@ type or unit conversions can be applied when necessary.
2020
:::{tab-item} SIDL
2121
:sync: sidl
2222

23-
```java
24-
int get_var_grid(in string name, out int grid);
23+
```{map-bmi-function} get_var_grid
24+
:language: sidl
2525
```
2626
:::
2727
:::{tab-item} Python
2828
:sync: python
29-
```python
30-
def get_var_grid(self, name: str) -> int:
29+
```{map-bmi-function} get_var_grid
30+
:language: python
3131
```
3232
:::
3333
:::{tab-item} c
3434
:sync: c
35-
```c
36-
int get_var_grid(void *self, const char *name, int *grid);
35+
```{map-bmi-function} get_var_grid
36+
:language: c
37+
```
38+
:::
39+
:::{tab-item} c++
40+
:sync: c++
41+
```{map-bmi-function} get_var_grid
42+
:language: c++
3743
```
3844
:::
3945
::::
@@ -64,21 +70,27 @@ A model can have one or more grids.
6470

6571
:::{tab-item} SIDL
6672
:sync: sidl
67-
```java
68-
int get_var_type(in string name, out string type);
73+
```{map-bmi-function} get_var_type
74+
:language: sidl
6975
```
7076
:::
7177

7278
:::{tab-item} Python
7379
:sync: python
74-
```python
75-
def get_var_type(self, name: str) -> str:
80+
```{map-bmi-function} get_var_type
81+
:language: python
7682
```
7783
:::
7884
:::{tab-item} c
7985
:sync: c
80-
```c
81-
int get_var_type(void *self, const char *name, char *type);
86+
```{map-bmi-function} get_var_type
87+
:language: c
88+
```
89+
:::
90+
:::{tab-item} c++
91+
:sync: c++
92+
```{map-bmi-function} get_var_type
93+
:language: c++
8294
```
8395
:::
8496
::::
@@ -108,21 +120,26 @@ while in Fortran, use `integer`, `real`, and `double precision`.
108120

109121
:::{tab-item} SIDL
110122
:sync: sidl
111-
112-
```java
113-
int get_var_units(in string name, out string units);
123+
```{map-bmi-function} get_var_units
124+
:language: sidl
114125
```
115126
:::
116127
:::{tab-item} Python
117128
:sync: python
118-
```python
119-
def get_var_units(self, name: str) -> str:
129+
```{map-bmi-function} get_var_units
130+
:language: python
120131
```
121132
:::
122133
:::{tab-item} c
123134
:sync: c
124-
```c
125-
int get_var_units(void *self, const char *name, char *units);
135+
```{map-bmi-function} get_var_units
136+
:language: c
137+
```
138+
:::
139+
:::{tab-item} c++
140+
:sync: c++
141+
```{map-bmi-function} get_var_units
142+
:language: c++
126143
```
127144
:::
128145
::::
@@ -158,21 +175,27 @@ full description of valid unit names and a list of supported units.
158175

159176
:::{tab-item} SIDL
160177
:sync: sidl
161-
```java
162-
int get_var_itemsize(in string name, out int size);
178+
```{map-bmi-function} get_var_itemsize
179+
:language: sidl
163180
```
164181
:::
165182

166183
:::{tab-item} Python
167184
:sync: python
168-
```python
169-
def get_var_itemsize(self, name: str) -> int:
185+
```{map-bmi-function} get_var_itemsize
186+
:language: python
170187
```
171188
:::
172189
:::{tab-item} c
173190
:sync: c
174-
```c
175-
int get_var_itemsize(void *self, const char *name, int *size);
191+
```{map-bmi-function} get_var_itemsize
192+
:language: c
193+
```
194+
:::
195+
:::{tab-item} c++
196+
:sync: c++
197+
```{map-bmi-function} get_var_itemsize
198+
:language: c++
176199
```
177200
:::
178201
::::
@@ -198,21 +221,27 @@ For example, if data for a variable are stored as 64-bit integers,
198221

199222
:::{tab-item} SIDL
200223
:sync: sidl
201-
```java
202-
int get_var_nbytes(in string name, out int nbytes);
224+
```{map-bmi-function} get_var_nbytes
225+
:language: sidl
203226
```
204227
:::
205228

206229
:::{tab-item} Python
207230
:sync: python
208-
```python
209-
def get_var_nbytes(self, name: str) -> int:
231+
```{map-bmi-function} get_var_nbytes
232+
:language: python
210233
```
211234
:::
212235
:::{tab-item} c
213236
:sync: c
214-
```c
215-
int get_var_nbytes(void *self, const char *name, int *nbytes);
237+
```{map-bmi-function} get_var_nbytes
238+
:language: c
239+
```
240+
:::
241+
:::{tab-item} c++
242+
:sync: c++
243+
```{map-bmi-function} get_var_nbytes
244+
:language: c++
216245
```
217246
:::
218247
::::
@@ -236,21 +265,27 @@ a variable; i.e., the number of items multiplied by the size of each item.
236265

237266
:::{tab-item} SIDL
238267
:sync: sidl
239-
```java
240-
int get_var_location(in string name, out string location);
268+
```{map-bmi-function} get_var_location
269+
:language: sidl
241270
```
242271
:::
243272

244273
:::{tab-item} Python
245274
:sync: python
246-
```python
247-
def get_var_location(self, name: str) -> str:
275+
```{map-bmi-function} get_var_location
276+
:language: python
248277
```
249278
:::
250279
:::{tab-item} c
251280
:sync: c
252-
```c
253-
int get_var_location(void *self, const char *name, char *location);
281+
```{map-bmi-function} get_var_location
282+
:language: c
283+
```
284+
:::
285+
:::{tab-item} c++
286+
:sync: c++
287+
```{map-bmi-function} get_var_location
288+
:language: c++
254289
```
255290
:::
256291
::::

0 commit comments

Comments
 (0)