X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsinfgapp%2Fsettings.h;fp=synfig-studio%2Ftrunk%2Fsrc%2Fsinfgapp%2Fsettings.h;h=d67f1738b7d149877655e487ee82d58c3f8c0e22;hb=3a3c4bca3a17137bec5d7960560934b91ef4146e;hp=0000000000000000000000000000000000000000;hpb=41257b650db1defb40ac20072ffeef70d5985f5e;p=synfig.git diff --git a/synfig-studio/trunk/src/sinfgapp/settings.h b/synfig-studio/trunk/src/sinfgapp/settings.h new file mode 100644 index 0000000..d67f173 --- /dev/null +++ b/synfig-studio/trunk/src/sinfgapp/settings.h @@ -0,0 +1,78 @@ +/* === S I N F G =========================================================== */ +/*! \file template.h +** \brief Template Header +** +** $Id: settings.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $ +** +** \legal +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This software and associated documentation +** are CONFIDENTIAL and PROPRIETARY property of +** the above-mentioned copyright holder. +** +** You may not copy, print, publish, or in any +** other way distribute this software without +** a prior written agreement with +** the copyright holder. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SINFG_SETTINGS_H +#define __SINFG_SETTINGS_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace sinfgapp { + +class Settings +{ +public: + + typedef std::list KeyList; + typedef std::map ValueBaseMap; + typedef std::map DomainMap; + +private: + ValueBaseMap simple_value_map; + + DomainMap domain_map; + +public: + Settings(); + virtual ~Settings(); + + virtual bool get_value(const sinfg::String& key, sinfg::String& value)const; + virtual bool set_value(const sinfg::String& key,const sinfg::String& value); + virtual KeyList get_key_list()const; + + sinfg::String get_value(const sinfg::String& key)const; + void add_domain(Settings* domain, const sinfg::String& name); + void remove_domain(const sinfg::String& name); + + bool load_from_string(const sinfg::String& data); + bool save_to_string(sinfg::String& data); + + bool load_from_file(const sinfg::String& filename); + bool save_to_file(const sinfg::String& filename)const; +}; // END of class Settings + +}; // END of namespace sinfgapp + +/* === E N D =============================================================== */ + +#endif