/* * Copyright (C) 2004-2005 Vadim Berezniker * http://www.kryptolus.com * * This Program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This Program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU Make; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * http://www.gnu.org/copyleft/gpl.html * */ #include "stdafx.h" #include "common.h" kryPrefSection::kryPrefSection() { this->m_data = new kryHash (g_str_hash, g_str_equal, kry_free_minimal, (GDestroyNotify) kryPrefValue::Free); } kryPrefSection::~kryPrefSection() { this->Free(); } void kryPrefSection::Free() { kry_free(this->m_name); delete this->m_data; } void kryPrefSection::FreeStatic(kryPrefSection *section) { section->Free(); } kryPrefValue *kryPrefSection::Lookup(char *key) { return this->m_data->Lookup(key); } void kryPrefSection::GetKeysIterator(kryListIterator *iter) { return this->m_data->GetKeysIterator(iter); } void kryPrefSection::Remove(char *key) { this->m_data->Remove(key); } char *kryPrefSection::GetName() { return this->m_name; } void kryPrefSection::SetName(char *name) { this->m_name = name; } void kryPrefSection::Replace(char *key, kryPrefValue *value) { this->m_data->Replace(key, value); }