亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? appconf.h

?? 這是一款2d游戲引擎
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*-*- c++ -*-*****************************************************************\
 * Project:   CppLib: C++ library for Windows/UNIX platfroms                 *
 * File:      config.h - Config class, .INI/.rc file manager                 *
 *---------------------------------------------------------------------------*
 * Language:  C++                                                            *
 * Platfrom:  any (tested under Windows NT)                                  *
 *---------------------------------------------------------------------------*
 * (c) Karsten Ball黡er & Vadim Zeitlin                                      *
 *     Ballueder@usa.net  Vadim.zeitlin@dptmaths.ens-cachan.fr               *
 *---------------------------------------------------------------------------*
 * $Id: appconf.h,v 1.2 2000/05/03 18:29:00 mbn Exp $                    *
 *---------------------------------------------------------------------------*
 * Classes:                                                                  *
 *  BaseConfig      - ABC for class that manage tree organized config info   *
 *  FileConfig      - implementation of BaseConfig based on disk files       *
 *  RegistryConfig  - implementation of BaseConfig based Win32 registry      *
 *---------------------------------------------------------------------------*
 * To do:                                                                    *
 *  - derive wxConfig                                                        *
 *  - EXTENSIVE ERROR CHECKING (none done actually)                          *
 *  - derive IniConfig for standard dumb Windows INI files using Win APIs    *
 *---------------------------------------------------------------------------*
 * History:                                                                  *
 *  25.10.97  adapted from wxConfig by Karsten Ball黡er                      *
 *  29.10.97  FileConfig now saves comments back (VZ)                        *
 *  30.10.97  Immutable entries support added (KB)                           *
 *  01.11.97  Fixed NULL pointer access in BaseConfig::setCurrentPath (KB)   *
 *            Replaced filterIn() with original function from wxConfig,      *
 *            doing environment variable expansion, too (KB)                 *
 *            Made parsing case insensitive (Compile time option) (KB)       *
 *  02.11.97  Added deleteEntry function (VZ)                                *
 *  08.11.97  Environment variable expansion on demand (VZ)                  *
 *            RegistryConfig::changeCurrentPath added (VZ)                   *
 *            AppConf defined to be used instead of File/RegistryConfig      *
 *  18.01.98  Several fixes and changes to FileConfig (KB)                   *
 *            Added recordDefaults() method (KB)                             *
\*****************************************************************************/

#ifndef   _APPCONF_H
#define   _APPCONF_H


/**@name AppConf - Configuration entry management 
 * 
 *
 * <b>Copyright</b><br>
 * This library is free software; you can redistribute it and/or      
 * modify it under the terms of the GNU Library General Public        
 * License as published by the Free Software Foundation; either       
 * version 2 of the License, or (at your option) any later version.   
 * <p>                                                                   
 * This library 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  
 * Library General Public License for more details.                   
 * <p>                                                                   
 * You should have received a copy of the GNU Library General Public  
 * License along with this library; if not, write to the Free         
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
 * <p>                                                                   
 *
 *These classes support easy to use management of configuration settings.
 *On Unix systems these settings get written to configuration files, of the
 *type used by Windows (.INI) and KDE (.lnk). On Win32 systems (Windows NT
 *or 95), the settings get written to the registry database.<br>
 *Therefor AppConfig provides a consistent API for configuration management
 *across both platforms. The API is defined by the BaseConfig virtual base
 *class and two implemenations, FileConfig and RegistryConfig are derived
 *from this. Nevertheless, you can also use FileConfig under Windows if
 *you need it for some special purpose.
 *<p>
 *The class AppConfig is defined which is the 'native' implementation on
 *each platform. 
 *<p>
 *Also, if the gettext() library function is available (use -lintl on
 *Unix systems), AppConfig can be compiled with -DAPPCONF_USE_GETTEXT=1
 *to support multiple languages in its error messages.
 *Precompiled message catalogues for German and French are included,
 *copy them to the appropriate directories under Unix 
 *(e.g. /usr/share/locale/fr/LC_MESSAGES/appconf.mo or
 * /usr/share/locale/de/LC_MESSAGES/appconf.mo).
 *<p>
 *Two simple programs demonstrating the use of AppConfig are included.
 *<p>
 *Full documentation of the classes is included in HTML format in the
 *doc directory. Please use your web browser to view it.<br>
 *The LaTeX documentation appconf.tex in the same directory contains a
 *few errors (because it was auto-generated with doc++), but is usable.
 *Just keep pressing Enter when LaTeX complains. An A4 PostScript version
 *is also included.
 *<p>
 *Feel free to contact us with any questions or suggestions. If you use
 *it in your programs, we would be pleased to hear about it.
 * @memo	A configuration management system for Unix and Windows.
 * @author	Karsten Ball&uuml;der and Vadim Zeitlin
 */
//@{

#if APPCONF_USE_CONFIG_H
# include <config.h>
#endif

#include  <iostream>
#include  <stdlib.h>

// make sure we have a Bool type
typedef   int Bool;
#ifndef    TRUE
# define    TRUE  1
# define    FALSE 0
#endif

// make sure we have NULL defined properly
// #undef  NULL
// #define NULL 0

// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------


/**@name configuration options */
//@{

/// can we use gettext() for multi language support?

#ifndef	APPCONF_USE_GETTEXT
#		define	APPCONF_USE_GETTEXT	0
#else
#		define	APPCONF_DOMAIN	"appconf"
#endif

/// shall we be case sensitive in parsing variable names?
#ifndef APPCONF_CASE_SENSITIVE
#	define	APPCONF_CASE_SENSITIVE	0
#endif

/// separates group and entry names
#ifndef APPCONF_PATH_SEPARATOR
#	define   APPCONF_PATH_SEPARATOR     '/'
#endif

/// introduces immutable entries
#ifndef APPCONF_IMMUTABLE_PREFIX
#	define   APPCONF_IMMUTABLE_PREFIX   '!'
#endif

/// length for internal character array for expansion (e.g. for gcvt())
#ifndef APPCONF_STRBUFLEN
#	define   APPCONF_STRBUFLEN          1024
#endif

/// should we use registry instead of configuration files under Win32?
#ifndef	  APPCONF_WIN32_NATIVE
#	define APPCONF_WIN32_NATIVE 		1 	// default: TRUE
#endif

//@}

/**@name helper functions */
//@{
// ----------------------------------------------------------------------------
// global functions
// ----------------------------------------------------------------------------
/** Replace environment variables ($SOMETHING) with their values.  The
   format is $VARNAME or ${VARNAME} where VARNAME contains
   alphanumeric characters and '_' only. '$' must be escaped ('\$') in
   order to be taken literally.
  @param  pointer to the string possibly contianing $VAR and/or ${VAR}
  @return the resulting string, caller must 'delete []' it
  @memo Performs environment variable substitution.  */
char *ExpandEnvVars(const char *psz);
//@}

/**@name Configuration Management Classes */
//@{

// ----------------------------------------------------------------------------
///	abstract base class config
// ----------------------------------------------------------------------------
class BaseConfig
{
public:
  /** @name Constructors and destructor */
  //@{
    /// default ctor
  BaseConfig();
    /// dtor
  virtual ~BaseConfig();
  //@}

  /** @name Set and retrieve current path */
  //@{
  /**
    Specify the new current path by its absolute name.
    @param szPath name of the group to search by default (created if !exists)
  */
  virtual void setCurrentPath(const char *szPath = "");

     /**
	Change the current path.
	Works like 'cd' and supports "..".
    @param szPath name of the group to search by default (created if !exists)
  */
  virtual void changeCurrentPath(const char *szPath = "");

  /**
    Query the current path.
    @return current '/' separated path
  */
  const char *getCurrentPath() const;
  /** 
    Resolve ".." and "/" in the path.
    @param  Start path (i.e. current directory)
    @param  Relative path (".." allowed) from start path
    @return Pointer to normalized path (caller should "delete []" it)
  */
  static char *normalizePath(const char *szStartPath, const char *szPath);
  //@}

   /** activates recording of default values
       @param enable TRUE to activate, FALSE to deactivate
   */
   void recordDefaults(Bool enable = TRUE);

  /**@name Enumeration of subgroups/entries */
  //@{
   /**
      This class allows access to an array of strings, which are entries or group names.
      @memo Class that supports enumeration.
      @see  enumSubgroups, enumEntries
    */
  class Enumerator
  {
  public:
    // if bOwnsStrings, it will delete them in dtor
    Enumerator(size_t nCount, Bool bOwnsStrings);
    ~Enumerator();

    // add a string
      // this one may be used only if bOwnsString was TRUE in ctor
    void AddString(const char *sz);
      // 
    void AddString(char *sz);
    
    // kludge: eliminate duplicate strings
    void MakeUnique();

    // accessors
      /// return number of elements
    size_t      Count()                   const { return m_nCount;          }
      /// return the element #nIndex
    const char *operator[](size_t nIndex) const { return m_aszData[nIndex]; }

  private:
    char    **m_aszData;
    size_t    m_nCount;
    Bool      m_bOwnsStrings;
  };
    /**
      Enumerate subgroups of the current group.
      Caller must delete the returned pointer.
      Example of usage:
      <br><pre>
      char **aszGroups;
      config.setCurrentPath("mygroup");
      BaseConfig::Enumerator *pEnum = config.enumSubgroups();
      size_t nGroups = pEnum->Count();
      for ( size_t n = 0; n < nGroups; n++ )
        cout << "Name of subgorup #" << n << " is " << (*pEnum)[n] << endl;
      delete pEnum;
      </pre>
      @param  Pointer to an array of strings which is allocated by the function
      @return Number of subgroups
      @see    Enumerator, setCurrentPath, enumEntries 
    */
  virtual Enumerator *enumSubgroups() const = 0;
    /** 
      Enumerate entries of the current group.
      @return Number of entries
      @see    Enumerator, enumSubgroups
    */
  virtual Enumerator *enumEntries() const = 0;
  //@}

  /** @name Key access */
  //@{
  /**
    Get the value of an entry, or the default value.
    @param szKey      The key to search for.
    @param szDefault  The default value to return if not found.
    @return The value of the key, or defval if not found
  */
  virtual const char *readEntry(const char *szKey, 
                                const char *szDefault = NULL) const = 0;

   /**
     Get the value of an entry, or the default value, interpreted as a
     long integer.
     @param szKey	The key to search for.
     @param Default	The default value to return if not found.
     @return The value of the key converted to long int or the default value.
   */
   long int readEntry(const char *szKey, long int Default) const;

   /**
     Get the value of an entry, or the default value, interpreted as a
     double value.
     @param szKey	The key to search for.
     @param Default	The default value to return if not found.
     @return The value of the key converted to double or the default value.
   */
   double readEntry(const char *szKey, double Default) const;

   /**
    Set the value of an entry.
    @param szKey    The key whose value to change.
    @param szValue	The new value.
    @return TRUE on success, FALSE on failure
  */
  virtual Bool writeEntry(const char *szKey, const char *szValue) = 0;

   /**
    Set the value of an entry to a long int value.
    @param szKey    The key whose value to change.
    @param Value	The new value.
    @return TRUE on success, FALSE on failure
  */
   Bool writeEntry(const char *szKey, long int Value);

   /**
    Set the value of an entry to a double value.
    @param szKey    The key whose value to change.
    @param Value	The new value.
    @return TRUE on success, FALSE on failure
  */
  Bool writeEntry(const char *szKey, double Value);

   /**
    Delets the entry. Notice that there is intentionally no such function 
    as deleteGroup: the group is automatically deleted when it's last entry 
    is deleted.

    @memo   Deletes the entry.
    @param  szKey    The key to delete
    @return TRUE on success, FALSE on failure
  */
  virtual Bool deleteEntry(const char *szKey) = 0;
  //@}

  /** @name Other functions */
  //@{
    /// permanently writes changes, returns TRUE on success
  virtual Bool flush(Bool /* bCurrentOnly */ = FALSE) { return TRUE; }
    /// returns TRUE if object was correctly initialized
  Bool isInitialized() const { return m_bOk; }
  //@}

  /** 
    @name Filter functions.
    All key values should pass by these functions, derived classes should
    call them in their read/writeEntry functions.
    Currently, these functions only escape meta-characters (mainly spaces
    which would otherwise confuse the parser), but they could also be used 
    to encode/decode key values.
  */
  //@{
    /// should be called from writeEntry, returns pointer to dynamic buffer
  static char *filterOut(const char *szValue);
    /// should be called from readEntry, returns pointer to dynamic buffer
  static char *filterIn(const char *szValue);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人黄色国产精品网站大全在线免费观看| 亚洲午夜视频在线观看| 欧美一区二区三区四区久久| 99久久99久久精品免费观看| 国产福利不卡视频| fc2成人免费人成在线观看播放| 国产一区二区三区免费观看| 免费观看在线综合色| 国产黄色精品网站| 国产成人日日夜夜| 日本久久一区二区三区| 欧美女孩性生活视频| 久久婷婷成人综合色| 亚洲国产视频a| 韩国在线一区二区| 欧美日本精品一区二区三区| 日韩一区二区三区免费看| 久久综合999| 亚洲精品欧美激情| 成人精品一区二区三区四区| 91久久国产综合久久| 国产香蕉久久精品综合网| 天堂一区二区在线免费观看| 极品尤物av久久免费看| 欧洲色大大久久| 欧美国产欧美亚州国产日韩mv天天看完整 | 51精品久久久久久久蜜臀| 久久网站热最新地址| 亚洲国产日韩综合久久精品| 综合自拍亚洲综合图不卡区| 日本vs亚洲vs韩国一区三区| 国产精品一区二区三区四区 | 亚洲蜜臀av乱码久久精品| 国产大陆精品国产| 久久精品一区二区三区av | 色哟哟国产精品| 久久久综合激的五月天| 国产一区二区三区在线观看免费视频| 欧美剧情电影在线观看完整版免费励志电影 | 国产亚洲精品福利| 国产激情一区二区三区桃花岛亚洲| 欧美日韩精品福利| 五月天亚洲精品| 欧美一级理论性理论a| 韩国在线一区二区| 国产欧美精品一区aⅴ影院 | 亚洲欧美日韩国产手机在线| av男人天堂一区| 亚洲一区在线观看视频| 欧美肥大bbwbbw高潮| 日韩av网站免费在线| 精品国精品自拍自在线| 国产另类ts人妖一区二区| 国产欧美日韩精品一区| 成人高清免费观看| 午夜婷婷国产麻豆精品| 日韩欧美国产精品| av综合在线播放| 日产欧产美韩系列久久99| 久久精品免视看| 成人av免费在线| 青青草精品视频| 国产日韩在线不卡| 日韩精品在线网站| 在线亚洲欧美专区二区| 精久久久久久久久久久| 久久久久久一级片| 欧美日韩1234| 91久久免费观看| 国产精品一区2区| 美女视频黄a大片欧美| 亚洲精品国产成人久久av盗摄| 欧美日韩在线综合| 色综合视频在线观看| 国产一区不卡精品| 国产在线观看免费一区| 日韩精品电影一区亚洲| 亚洲色图视频网| 国产精品乱人伦中文| 久久久噜噜噜久噜久久综合| 欧美高清你懂得| 日韩一区二区不卡| 99国产精品久| 国产美女精品人人做人人爽| 天天操天天色综合| 美女mm1313爽爽久久久蜜臀| 日韩成人一级片| 蜜臀a∨国产成人精品| 亚洲妇女屁股眼交7| 午夜视黄欧洲亚洲| 日韩成人伦理电影在线观看| 日本成人中文字幕在线视频| 麻豆成人免费电影| 国产一区二区免费看| 顶级嫩模精品视频在线看| 99视频国产精品| 欧美高清一级片在线| 久久婷婷一区二区三区| 日韩一区二区三区在线观看| 日韩欧美一区在线观看| 精品国产一区久久| 国产精品初高中害羞小美女文| 一区二区在线电影| 久久99最新地址| av电影天堂一区二区在线 | 国产精品国产精品国产专区不片| 亚洲线精品一区二区三区| 亚洲一区二区三区国产| 国内国产精品久久| 色女孩综合影院| 欧美电影影音先锋| 中文字幕一区二区三| 久久99久久久久| 欧洲在线/亚洲| 亚洲欧洲日产国码二区| 日本不卡视频在线| 欧美福利视频导航| 亚洲另类在线一区| 懂色av噜噜一区二区三区av| www国产精品av| 午夜电影网一区| 在线这里只有精品| 一区二区理论电影在线观看| 91在线精品秘密一区二区| 欧美国产精品劲爆| 国产成人啪午夜精品网站男同| 4438成人网| 免费观看久久久4p| 欧美电影免费观看高清完整版在| 亚洲成av人片| 欧美一区二区性放荡片| 午夜精品一区在线观看| 亚洲精品乱码久久久久久黑人| k8久久久一区二区三区| 亚洲免费看黄网站| 欧美专区亚洲专区| 国产酒店精品激情| 欧美三级电影网站| 亚洲视频一区二区在线观看| 色哟哟一区二区| 亚洲视频在线观看三级| 在线播放日韩导航| 国产自产视频一区二区三区| 国产人妖乱国产精品人妖| 99re视频这里只有精品| 亚洲国产美国国产综合一区二区| 欧美午夜精品电影| 国产经典欧美精品| 五月开心婷婷久久| 国产色91在线| 欧美va日韩va| 在线一区二区三区| 精品在线一区二区三区| 中文在线一区二区| 色爱区综合激月婷婷| 午夜av区久久| 中文字幕精品在线不卡| 欧美二区在线观看| 成人91在线观看| 国产v日产∨综合v精品视频| 亚洲与欧洲av电影| 中文字幕在线一区免费| 国产日产欧美一区| 日韩三级中文字幕| 欧美丰满嫩嫩电影| 欧美美女一区二区三区| 99国产精品视频免费观看| 国产成人精品免费在线| 精品综合久久久久久8888| 一区二区三区在线看| 夜夜操天天操亚洲| 一区二区三区精品久久久| 久久精品亚洲麻豆av一区二区| 久久久久久久久蜜桃| 69堂精品视频| av午夜精品一区二区三区| 日韩中文字幕一区二区三区| 国产精品久久福利| 亚洲同性同志一二三专区| 亚洲综合丁香婷婷六月香| 中文字幕一区二区三区四区| 亚洲情趣在线观看| 亚洲香肠在线观看| 免费观看在线综合| 成人在线综合网站| 91视频你懂的| 欧美午夜精品一区二区三区| 日韩三级伦理片妻子的秘密按摩| 欧美日韩日日夜夜| 国产亚洲欧美在线| 亚洲人精品一区| 日本不卡123| 国产suv精品一区二区883| 在线视频一区二区免费| 欧美日韩国产a| 欧美国产视频在线| 国产精品久久久久久久久免费桃花| 一区二区三区小说| 久久99九九99精品| 欧美中文字幕一区二区三区|