| 1 |
/** |
| 2 |
* JNA-InChI - Library for calling InChI from Java |
| 3 |
* Copyright © 2018 Daniel Lowe |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2.1 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU Lesser General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Lesser General Public License |
| 16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
package io.github.dan2097.jnainchi.inchi; |
| 19 |
import java.util.Arrays; |
| 20 |
import java.util.List; |
| 21 |
|
| 22 |
import com.sun.jna.Structure; |
| 23 |
import com.sun.jna.Structure.ByReference; |
| 24 |
/** |
| 25 |
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br> |
| 26 |
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br> |
| 27 |
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>. |
| 28 |
*/ |
| 29 |
public class inchi_Input_Polymer extends Structure implements ByReference { |
| 30 |
/** C type : inchi_Input_PolymerUnit** */ |
| 31 |
public inchi_Input_PolymerUnit[] units; |
| 32 |
/** Number of polymer units */ |
| 33 |
public int n; |
| 34 |
|
| 35 |
protected List<String> getFieldOrder() { |
| 36 |
return Arrays.asList("units", "n"); |
| 37 |
} |
| 38 |
/** |
| 39 |
* @param units C type : inchi_Input_PolymerUnit**<br> |
| 40 |
* @param n Number of polymer units |
| 41 |
*/ |
| 42 |
public inchi_Input_Polymer(inchi_Input_PolymerUnit units[], int n) { |
| 43 |
super(); |
| 44 |
if ((units.length != this.units.length)) |
| 45 |
throw new IllegalArgumentException("Wrong array size !"); |
| 46 |
this.units = units; |
| 47 |
this.n = n; |
| 48 |
} |
| 49 |
|
| 50 |
} |