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-gda-quark-list.html
28 * strct = GdaQuarkList
46 * - GdaQuarkList* -> QuarkList
57 import tango
.io
.Stdout
; // use the tango loging?
61 private import gdac
.gdatypes
;
63 private import gdac
.gda
;
72 * Parameter lists are used primary in the parsing and creation
73 * of connection strings.
75 public class QuarkList
78 /** the main Gtk struct */
79 protected GdaQuarkList
* gdaQuarkList
;
82 public GdaQuarkList
* getQuarkListStruct()
88 /** the main Gtk struct as a void* */
89 protected void* getStruct()
91 return cast(void*)gdaQuarkList
;
95 * Sets our main struct and passes it to the parent class
97 public this (GdaQuarkList
* gdaQuarkList
)
101 if ( gdaQuarkList
is null )
106 Stdout("struct gdaQuarkList is null on constructor").newline
;
110 printf("struct gdaQuarkList is null on constructor");
117 assert(gdaQuarkList
!is null, "struct gdaQuarkList is null on constructor");
119 this.gdaQuarkList
= gdaQuarkList
;
130 public static GType
getType()
132 // GType gda_quark_list_get_type (void);
133 return gda_quark_list_get_type();
137 * Creates a new GdaQuarkList, which is a set of key->value pairs,
138 * very similar to GLib's GHashTable, but with the only purpose to
139 * make easier the parsing and creation of data source connection
142 * the newly created GdaQuarkList.
146 // GdaQuarkList* gda_quark_list_new (void);
147 this(cast(GdaQuarkList
*)gda_quark_list_new() );
151 * Creates a new GdaQuarkList given a connection string.
153 * a connection string.
155 * the newly created GdaQuarkList.
157 public this (char[] string
)
159 // GdaQuarkList* gda_quark_list_new_from_string (const gchar *string);
160 this(cast(GdaQuarkList
*)gda_quark_list_new_from_string(Str
.toStringz(string
)) );
164 * Creates a new GdaQuarkList from an existing one.
166 * quark_list to get a copy from.
168 * a newly allocated GdaQuarkList with a copy of the data in qlist.
170 public QuarkList
copy()
172 // GdaQuarkList* gda_quark_list_copy (GdaQuarkList *qlist);
173 return new QuarkList( gda_quark_list_copy(gdaQuarkList
) );
177 * Releases all memory occupied by the given GdaQuarkList.
183 // void gda_quark_list_free (GdaQuarkList *qlist);
184 gda_quark_list_free(gdaQuarkList
);
188 * Adds new key->value pairs from the given string. If cleanup is
189 * set to TRUE, the previous contents will be discarded before adding
194 * a connection string.
196 * whether to cleanup the previous content or not.
198 public void addFromString(char[] string
, int cleanup
)
200 // void gda_quark_list_add_from_string (GdaQuarkList *qlist, const gchar *string, gboolean cleanup);
201 gda_quark_list_add_from_string(gdaQuarkList
, Str
.toStringz(string
), cleanup
);
205 * Searches for the value identified by name in the given GdaQuarkList.
209 * the name of the value to search for.
211 * the value associated with the given key if found, or NULL
214 public char[] find(char[] name
)
216 // const gchar* gda_quark_list_find (GdaQuarkList *qlist, const gchar *name);
217 return Str
.toString(gda_quark_list_find(gdaQuarkList
, Str
.toStringz(name
)) );
221 * Removes an entry from the GdaQuarkList, given its name.
223 * a GdaQuarkList structure.
227 public void remove(char[] name
)
229 // void gda_quark_list_remove (GdaQuarkList *qlist, const gchar *name);
230 gda_quark_list_remove(gdaQuarkList
, Str
.toStringz(name
));
234 * Removes all strings in the given GdaQuarkList.
240 // void gda_quark_list_clear (GdaQuarkList *qlist);
241 gda_quark_list_clear(gdaQuarkList
);