alternative to assert
[gtkD.git] / gtkD / srcgda / gda / DataModelArray.d
blob042c1aa7d389843e702010426780f7fc2c132062
1 /*
2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = libgda-GdaDataModelArray.html
26 * outPack = gda
27 * outFile = DataModelArray
28 * strct = GdaDataModelArray
29 * realStrct=
30 * ctorStrct=
31 * clss = DataModelArray
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gda_data_model_array_
40 * omit structs:
41 * omit prefixes:
42 * omit code:
43 * imports:
44 * - gda.DataModel
45 * structWrap:
46 * - GdaDataModel* -> DataModel
47 * module aliases:
48 * local aliases:
51 module gda.DataModelArray;
53 version(noAssert)
55 version(Tango)
57 import tango.io.Stdout; // use the tango loging?
61 private import gdac.gdatypes;
63 private import gdac.gda;
66 private import gda.DataModel;
71 /**
72 * Description
74 public class DataModelArray
77 /** the main Gtk struct */
78 protected GdaDataModelArray* gdaDataModelArray;
81 public GdaDataModelArray* getDataModelArrayStruct()
83 return gdaDataModelArray;
87 /** the main Gtk struct as a void* */
88 protected void* getStruct()
90 return cast(void*)gdaDataModelArray;
93 /**
94 * Sets our main struct and passes it to the parent class
96 public this (GdaDataModelArray* gdaDataModelArray)
98 version(noAssert)
100 if ( gdaDataModelArray is null )
102 int zero = 0;
103 version(Tango)
105 Stdout("struct gdaDataModelArray is null on constructor").newline;
107 else
109 printf("struct gdaDataModelArray is null on constructor");
111 zero = zero / zero;
114 else
116 assert(gdaDataModelArray !is null, "struct gdaDataModelArray is null on constructor");
118 this.gdaDataModelArray = gdaDataModelArray;
126 * cols :
127 * number of columns for rows in this data model.
128 * Returns :
129 * a pointer to the newly created GdaDataModel.
131 public static DataModel newDataModelArray(int cols)
133 // GdaDataModel* gda_data_model_array_new (gint cols);
134 return new DataModel( gda_data_model_array_new(cols) );
138 * Sets the number of columns for rows inserted in this model.
139 * cols must be greated than or equal to 0.
140 * model :
141 * the GdaDataModelArray.
142 * cols :
143 * number of columns for rows this data model should use.
145 public void setNColumns(int cols)
147 // void gda_data_model_array_set_n_columns (GdaDataModelArray *model, gint cols);
148 gda_data_model_array_set_n_columns(gdaDataModelArray, cols);
152 * Frees all the rows inserted in model.
153 * model :
154 * the model to clear.
156 public void clear()
158 // void gda_data_model_array_clear (GdaDataModelArray *model);
159 gda_data_model_array_clear(gdaDataModelArray);