~ubuntu-branches/ubuntu/trusty/glibmm2.4/trusty

« back to all changes in this revision

Viewing changes to glib/glibmm/keyfile.cc

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-09-28 12:28:45 UTC
  • mfrom: (1.2.77)
  • Revision ID: package-import@ubuntu.com-20120928122845-6h032jivploan2aa
Tags: 2.33.13-0ubuntu2
* debian/rules:
  - Bump shlib version

Show diffs side-by-side

added added

removed removed

Lines of Context:
424
424
  bool retvalue = g_key_file_load_from_file(gobj(), filename.c_str(), ((GKeyFileFlags)(flags)), &(gerror));
425
425
  if(gerror)
426
426
    ::Glib::Error::throw_exception(gerror);
427
 
 
428
427
  return retvalue;
429
 
 
430
428
}
431
429
 
432
430
bool KeyFile::load_from_dirs(const std::string& file, const Glib::ArrayHandle<std::string>& search_dirs, Glib::ArrayHandle<std::string>& full_path, KeyFileFlags flags)
435
433
  bool retvalue = g_key_file_load_from_dirs(gobj(), file.c_str(), const_cast<const gchar**>(search_dirs.data()), const_cast<gchar**>(full_path.data()), ((GKeyFileFlags)(flags)), &(gerror));
436
434
  if(gerror)
437
435
    ::Glib::Error::throw_exception(gerror);
438
 
 
439
436
  return retvalue;
440
 
 
441
437
}
442
438
 
443
439
Glib::ustring KeyFile::get_start_group() const
456
452
  bool retvalue = g_key_file_has_key(const_cast<GKeyFile*>(gobj()), group_name.c_str(), key.c_str(), &(gerror));
457
453
  if(gerror)
458
454
    ::Glib::Error::throw_exception(gerror);
459
 
 
460
455
  return retvalue;
461
 
 
462
456
}
463
457
 
464
458
Glib::ustring KeyFile::get_value(const Glib::ustring& group_name, const Glib::ustring& key) const
467
461
  Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_value(const_cast<GKeyFile*>(gobj()), group_name.c_str(), key.c_str(), &(gerror)));
468
462
  if(gerror)
469
463
    ::Glib::Error::throw_exception(gerror);
470
 
 
471
464
  return retvalue;
472
 
 
473
465
}
474
466
 
475
467
Glib::ustring KeyFile::get_string(const Glib::ustring& group_name, const Glib::ustring& key) const
478
470
  Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_string(const_cast<GKeyFile*>(gobj()), group_name.c_str(), key.c_str(), &(gerror)));
479
471
  if(gerror)
480
472
    ::Glib::Error::throw_exception(gerror);
481
 
 
482
473
  return retvalue;
483
 
 
484
474
}
485
475
 
486
476
Glib::ustring KeyFile::get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const
489
479
  Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_locale_string(const_cast<GKeyFile*>(gobj()), group_name.c_str(), key.c_str(), locale.c_str(), &(gerror)));
490
480
  if(gerror)
491
481
    ::Glib::Error::throw_exception(gerror);
492
 
 
493
482
  return retvalue;
494
 
 
495
483
}
496
484
 
497
485
bool KeyFile::get_boolean(const Glib::ustring& group_name, const Glib::ustring& key) const
500
488
  bool retvalue = g_key_file_get_boolean(const_cast<GKeyFile*>(gobj()), group_name.c_str(), key.c_str(), &(gerror));
501
489
  if(gerror)
502
490
    ::Glib::Error::throw_exception(gerror);
503
 
 
504
491
  return retvalue;
505
 
 
506
492
}
507
493
 
508
494
int KeyFile::get_integer(const Glib::ustring& group_name, const Glib::ustring& key) const
511
497
  int retvalue = g_key_file_get_integer(const_cast<GKeyFile*>(gobj()), group_name.c_str(), key.c_str(), &(gerror));
512
498
  if(gerror)
513
499
    ::Glib::Error::throw_exception(gerror);
514
 
 
515
500
  return retvalue;
516
 
 
517
501
}
518
502
 
519
503
gint64 KeyFile::get_int64(const Glib::ustring& group_name, const Glib::ustring& key) const
522
506
  gint64 retvalue = g_key_file_get_int64(const_cast<GKeyFile*>(gobj()), group_name.c_str(), key.c_str(), &(gerror));
523
507
  if(gerror)
524
508
    ::Glib::Error::throw_exception(gerror);
525
 
 
526
509
  return retvalue;
527
 
 
528
510
}
529
511
 
530
512
guint64 KeyFile::get_uint64(const Glib::ustring& group_name, const Glib::ustring& key) const
533
515
  guint64 retvalue = g_key_file_get_uint64(const_cast<GKeyFile*>(gobj()), group_name.c_str(), key.c_str(), &(gerror));
534
516
  if(gerror)
535
517
    ::Glib::Error::throw_exception(gerror);
536
 
 
537
518
  return retvalue;
538
 
 
539
519
}
540
520
 
541
521
double KeyFile::get_double(const Glib::ustring& group_name, const Glib::ustring& key) const
544
524
  double retvalue = g_key_file_get_double(const_cast<GKeyFile*>(gobj()), group_name.c_str(), key.c_str(), &(gerror));
545
525
  if(gerror)
546
526
    ::Glib::Error::throw_exception(gerror);
547
 
 
548
527
  return retvalue;
549
 
 
550
528
}
551
529
 
552
530
void KeyFile::set_double(const Glib::ustring& group_name, const Glib::ustring& key, double value)
553
531
{
554
 
  g_key_file_set_double(gobj(), group_name.c_str(), key.c_str(), value); 
 
532
  g_key_file_set_double(gobj(), group_name.c_str(), key.c_str(), value);
555
533
}
556
534
 
557
535
Glib::ustring KeyFile::get_comment(const Glib::ustring& group_name, const Glib::ustring& key) const
560
538
  Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_comment(const_cast<GKeyFile*>(gobj()), group_name.c_str(), key.c_str(), &(gerror)));
561
539
  if(gerror)
562
540
    ::Glib::Error::throw_exception(gerror);
563
 
 
564
541
  return retvalue;
565
 
 
566
542
}
567
543
 
568
544
void KeyFile::set_list_separator(gchar separator)
569
545
{
570
 
  g_key_file_set_list_separator(gobj(), separator); 
 
546
  g_key_file_set_list_separator(gobj(), separator);
571
547
}
572
548
 
573
549
void KeyFile::set_value(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& value)
574
550
{
575
 
  g_key_file_set_value(gobj(), group_name.c_str(), key.c_str(), value.c_str()); 
 
551
  g_key_file_set_value(gobj(), group_name.c_str(), key.c_str(), value.c_str());
576
552
}
577
553
 
578
554
void KeyFile::set_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& string)
579
555
{
580
 
  g_key_file_set_string(gobj(), group_name.c_str(), key.c_str(), string.c_str()); 
 
556
  g_key_file_set_string(gobj(), group_name.c_str(), key.c_str(), string.c_str());
581
557
}
582
558
 
583
559
void KeyFile::set_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ustring& string)
584
560
{
585
 
  g_key_file_set_locale_string(gobj(), group_name.c_str(), key.c_str(), locale.c_str(), string.c_str()); 
 
561
  g_key_file_set_locale_string(gobj(), group_name.c_str(), key.c_str(), locale.c_str(), string.c_str());
586
562
}
587
563
 
588
564
void KeyFile::set_boolean(const Glib::ustring& group_name, const Glib::ustring& key, bool value)
589
565
{
590
 
  g_key_file_set_boolean(gobj(), group_name.c_str(), key.c_str(), static_cast<int>(value)); 
 
566
  g_key_file_set_boolean(gobj(), group_name.c_str(), key.c_str(), static_cast<int>(value));
591
567
}
592
568
 
593
569
void KeyFile::set_integer(const Glib::ustring& group_name, const Glib::ustring& key, int value)
594
570
{
595
 
  g_key_file_set_integer(gobj(), group_name.c_str(), key.c_str(), value); 
 
571
  g_key_file_set_integer(gobj(), group_name.c_str(), key.c_str(), value);
596
572
}
597
573
 
598
574
void KeyFile::set_int64(const Glib::ustring& group_name, const Glib::ustring& key, gint64 value)
599
575
{
600
 
  g_key_file_set_int64(gobj(), group_name.c_str(), key.c_str(), value); 
 
576
  g_key_file_set_int64(gobj(), group_name.c_str(), key.c_str(), value);
601
577
}
602
578
 
603
579
void KeyFile::set_uint64(const Glib::ustring& group_name, const Glib::ustring& key, guint64 value)
604
580
{
605
 
  g_key_file_set_uint64(gobj(), group_name.c_str(), key.c_str(), value); 
 
581
  g_key_file_set_uint64(gobj(), group_name.c_str(), key.c_str(), value);
606
582
}
607
583
 
608
584
void KeyFile::set_comment(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& comment)
612
588
  if(gerror)
613
589
    ::Glib::Error::throw_exception(gerror);
614
590
 
615
 
 
616
591
}
617
592
 
618
593
void KeyFile::remove_comment(const Glib::ustring& group_name, const Glib::ustring& key)
622
597
  if(gerror)
623
598
    ::Glib::Error::throw_exception(gerror);
624
599
 
625
 
 
626
600
}
627
601
 
628
602
void KeyFile::remove_key(const Glib::ustring& group_name, const Glib::ustring& key)
632
606
  if(gerror)
633
607
    ::Glib::Error::throw_exception(gerror);
634
608
 
635
 
 
636
609
}
637
610
 
638
611
void KeyFile::remove_group(const Glib::ustring& group_name)
642
615
  if(gerror)
643
616
    ::Glib::Error::throw_exception(gerror);
644
617
 
645
 
 
646
618
}
647
619
 
648
620