~kklimonda/ubuntu/natty/glibmm2.4/update

« back to all changes in this revision

Viewing changes to glib/glibmm/keyfile.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-08-28 08:32:22 UTC
  • mfrom: (1.2.38 upstream)
  • Revision ID: james.westby@ubuntu.com-20090828083222-qr6jekfjlsz52rb7
Tags: 2.21.4.1-0ubuntu1
* New upstream release: (LP: #419705)
  2.21.4.1
  - Reenable hierarchy graphs for each class
  - Remove header and footer HTML fragments
  - Use shared mm-common Doxygen style sheet
  2.21.4
  - Transition to new mm-common build infrastructure
  - Correct the if condition in Gio::MemoryInputStream::add_data().
* debian/control.in:
  - Remove debian VCS links as they confuse debcheckout
* debian/libglibmm-2.4-dev.install:
  - Install files from /usr/share/glibmm-2.4/doctool

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 */
23
23
 
24
24
 
 
25
#include <glibmmconfig.h>
25
26
#include <glibmm/ustring.h>
26
27
#include <glibmm/arrayhandle.h>
27
28
#include <glibmm/error.h>
171
172
 * times; the last entry wins. Key files may also contain multiple groups with the same name; they are merged 
172
173
 * together. Another difference is that keys and group names in key files are not restricted to ASCII characters. 
173
174
 *
174
 
 * @newin2p14
 
175
 * @newin{2,14}
175
176
 */
176
177
class KeyFile
177
178
{
214
215
   * @param file The path of a filename to load, in the GLib file name encoding.
215
216
   * @param flags Flags from KeyFileFlags.
216
217
   * @return <tt>true</tt> if a key file could be loaded, <tt>false</tt> othewise
217
 
   * @newin2p6.
 
218
   * @newin{2,6}.
218
219
   */
219
220
#ifdef GLIBMM_EXCEPTIONS_ENABLED
220
221
  bool load_from_file(const std::string& filename, KeyFileFlags flags = Glib::KEY_FILE_NONE);
278
279
  /** Return value: The start group of the key file.
279
280
   * @return The start group of the key file.
280
281
   * 
281
 
   * @newin2p6.
 
282
   * @newin{2,6}.
282
283
   */
283
284
  Glib::ustring get_start_group() const;
284
285
        
304
305
   * @param group_name A group name.
305
306
   * @return <tt>true</tt> if @a group_name is a part of @a key_file, <tt>false</tt>
306
307
   * otherwise.
307
 
   * @newin2p6.
 
308
   * @newin{2,6}.
308
309
   */
309
310
  bool has_group(const Glib::ustring& group_name) const;
310
311
  
317
318
   * @return <tt>true</tt> if @a key is a part of @a group_name, <tt>false</tt>
318
319
   * otherwise.
319
320
   * 
320
 
   * @newin2p6.
 
321
   * @newin{2,6}.
321
322
   */
322
323
#ifdef GLIBMM_EXCEPTIONS_ENABLED
323
324
  bool has_key(const Glib::ustring& group_name, const Glib::ustring& key) const;
334
335
   * @return A newly allocated string or <tt>0</tt> if the specified 
335
336
   * key cannot be found.
336
337
   * 
337
 
   * @newin2p6.
 
338
   * @newin{2,6}.
338
339
   */
339
340
#ifdef GLIBMM_EXCEPTIONS_ENABLED
340
341
  Glib::ustring get_value(const Glib::ustring& group_name, const Glib::ustring& key) const;
351
352
   * @return A newly allocated string or <tt>0</tt> if the specified 
352
353
   * key cannot be found.
353
354
   * 
354
 
   * @newin2p6.
 
355
   * @newin{2,6}.
355
356
   */
356
357
#ifdef GLIBMM_EXCEPTIONS_ENABLED
357
358
  Glib::ustring get_string(const Glib::ustring& group_name, const Glib::ustring& key) const;
381
382
   * @return A newly allocated string or <tt>0</tt> if the specified 
382
383
   * key cannot be found.
383
384
   * 
384
 
   * @newin2p6.
 
385
   * @newin{2,6}.
385
386
   */
386
387
#ifdef GLIBMM_EXCEPTIONS_ENABLED
387
388
  Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const;
398
399
   * @return The value associated with the key as a boolean, 
399
400
   * or <tt>false</tt> if the key was not found or could not be parsed.
400
401
   * 
401
 
   * @newin2p6.
 
402
   * @newin{2,6}.
402
403
   */
403
404
#ifdef GLIBMM_EXCEPTIONS_ENABLED
404
405
  bool get_boolean(const Glib::ustring& group_name, const Glib::ustring& key) const;
427
428
   * @return The value associated with the key as an integer, or
428
429
   * 0 if the key was not found or could not be parsed.
429
430
   * 
430
 
   * @newin2p6.
 
431
   * @newin{2,6}.
431
432
   */
432
433
#ifdef GLIBMM_EXCEPTIONS_ENABLED
433
434
  int get_integer(const Glib::ustring& group_name, const Glib::ustring& key) const;
442
443
   * @return The value of @a key as an double
443
444
   * @throw Glib::KeyFileError
444
445
   *
445
 
   * @newin2p14
 
446
   * @newin{2,14}
446
447
   */
447
448
#ifdef GLIBMM_EXCEPTIONS_ENABLED
448
449
  double get_double(const Glib::ustring& key) const;
458
459
   * @return The value associated with the key as a double, or
459
460
   * 0.0 if the key was not found or could not be parsed.
460
461
   * 
461
 
   * @newin2p14.
 
462
   * @newin{2,14}.
462
463
   */
463
464
#ifdef GLIBMM_EXCEPTIONS_ENABLED
464
465
  double get_double(const Glib::ustring& group_name, const Glib::ustring& key) const;
470
471
  /** Associates a new double value with @a key under @a group_name.
471
472
   * If @a key cannot be found then it is created. 
472
473
   * 
473
 
   * @newin2p14
 
474
   * @newin{2,14}
474
475
   * @param group_name A group name.
475
476
   * @param key A key.
476
477
   * @param value An double value.
480
481
  /** Associates a new double value with @a key under the start group.
481
482
   * If @a key  cannot be found then it is created.
482
483
   * 
483
 
   * @newin2p12
 
484
   * @newin{2,12}
484
485
   * @param key A key.
485
486
   * @param value An double value.
486
487
   */
602
603
   * @param key A key.
603
604
   * @return The comment
604
605
   * 
605
 
   * @newin2p6.
 
606
   * @newin{2,6}.
606
607
   */
607
608
#ifdef GLIBMM_EXCEPTIONS_ENABLED
608
609
  Glib::ustring get_comment(const Glib::ustring& group_name, const Glib::ustring& key) const;
615
616
   * values in lists. Typically ';' or ',' are used
616
617
   * as separators. The default list separator is ';'.
617
618
   * 
618
 
   * @newin2p6
 
619
   * @newin{2,6}
619
620
   * @param separator The separator.
620
621
   */
621
622
  void set_list_separator(gchar separator);
624
625
   * If @a key cannot be found then it is created. 
625
626
   * If @a group_name cannot be found then it is created.
626
627
   * 
627
 
   * @newin2p6
 
628
   * @newin{2,6}
628
629
   * @param group_name A group name.
629
630
   * @param key A key.
630
631
   * @param value A string.
635
636
   * If @a key cannot be found then it is created.  
636
637
   * If @a group_name cannot be found then it is created.
637
638
   * 
638
 
   * @newin2p6
 
639
   * @newin{2,6}
639
640
   * @param group_name A group name.
640
641
   * @param key A key.
641
642
   * @param string A string.
645
646
  /** Associates a string value for @a key and @a locale under @a group_name.  
646
647
   * If the translation for @a key cannot be found then it is created.
647
648
   * 
648
 
   * @newin2p6
 
649
   * @newin{2,6}
649
650
   * @param group_name A group name.
650
651
   * @param key A key.
651
652
   * @param locale A locale identifier.
656
657
  /** Associates a new boolean value with @a key under @a group_name.
657
658
   * If @a key cannot be found then it is created. 
658
659
   * 
659
 
   * @newin2p6
 
660
   * @newin{2,6}
660
661
   * @param group_name A group name.
661
662
   * @param key A key.
662
663
   * @param value <tt>true</tt> or <tt>false</tt>.
666
667
  /** Associates a new integer value with @a key under @a group_name.
667
668
   * If @a key cannot be found then it is created.
668
669
   * 
669
 
   * @newin2p6
 
670
   * @newin{2,6}
670
671
   * @param group_name A group name.
671
672
   * @param key A key.
672
673
   * @param value An integer value.
718
719
   * @param key The name of a key
719
720
   * @param list A list holding object of type int
720
721
   *
721
 
   * @newin2p14
 
722
   * @newin{2,14}
722
723
   */
723
724
  void set_double_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ArrayHandle<double>& list);
724
725