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

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

?? appconf.h

?? 這是一款2d游戲引擎
?? H
?? 第 1 頁 / 共 2 頁
字號:
   /// should environment variables be automatically expanded?
  void expandVariables(Bool bExpand = TRUE) { m_bExpandVariables = bExpand; }
   /// do environment variables get automatically expanded?
  Bool doesExpandVariables(void) const { return m_bExpandVariables; }
   //@}

protected:
  /// TRUE if ctor successfully initialized the object
  Bool  m_bOk;
  /// TRUE if environment variables are to be auto-expanded
  Bool  m_bExpandVariables;
  /// TRUE if default values are to be recorded
  Bool	m_bRecordDefaults; 
private:
  char *m_szCurrentPath;
};

// ----------------------------------------------------------------------------
/**
  FileConfig derives from BaseConfig and implements file based config class, 
  i.e. it uses ASCII disk files to store the information. These files are
  alternatively called INI, .conf or .rc in the documentation. They are 
  organized in groups or sections, which can nest (i.e. a group contains
  subgroups, which contain their own subgroups &c). Each group has some
  number of entries, which are "key = value" pairs. More precisely, the format 
  is: 
  <pre>
  # comments are allowed after either ';' or '#' (Win/UNIX standard)
  # blank lines (as above) are ignored
  # global entries are members of special (no name) top group
  written_for = wxWindows
  platform    = Linux
  # the start of the group 'Foo'
  [Foo]                           # may put comments like this also
  # following 3 lines are entries
  key = value
  another_key = "  strings with spaces in the beginning should be quoted, \
                   otherwise the spaces are lost"
  last_key = but you don't have to put " normally (nor quote them, like here)
  # subgroup of the group 'Foo'
  # (order is not important, only the name is: separator is '/', as in paths)
  [Foo/Bar]
  # entries prefixed with "!" are immutable, i.e. can't be changed if they are
  # set in the system wide .conf file
  !special_key = value
  bar_entry = whatever
  [Foo/Bar/Fubar]   # depth is (theoretically :-) unlimited
  # may have the same name as key in another section
  bar_entry = whatever not
  </pre>
  You {have read/write/delete}Entry functions (guess what they do) and also
  setCurrentPath to select current group. enum{Subgroups/Entries} allow you
  to get all entries in the config file (in the current group). Finally,
  flush() writes immediately all changed entries to disk (otherwise it would
  be done automatically in dtor)
  FileConfig manages not less than 2 config files for each program: global
  and local (or system and user if you prefer). Entries are read from both of
  them and the local entries override the global ones unless the latter is
  immutable (prefixed with '!') in which case a warning message is generated
  and local value is ignored. Of course, the changes are always written to local
  file only.
*/
// ----------------------------------------------------------------------------

class FileConfig : public BaseConfig
{
public:
  /** @name Constructors and destructor */
  //@{
    /**
      FileConfig will
      <ll>
      <li>1) read global config file (/etc/appname.conf under UNIX or 
             windir\<file>.ini under Windows) unless bLocalOnly is TRUE
      <li>2) read user's config file ($HOME/.appname or $HOME/.appname/config or %USERPROFILE%/file.ini
             under NT, same as global otherwise)
      <li>3) write changed entries to user's file, never to the system one.
      </ll>
      @memo   Ctor for FileConfig takes file name argument.
      @param  szFileName  Config file, default extension appended if not given
      @param  bLocalOnly  TRUE => don't look for system-wide config file
      @param  bUseSubDir  TRUE => filename is not called $HOME/.<appname> but $HOME/.<appname>/config
    */
   FileConfig(const char *szFileName, Bool bLocalOnly = FALSE,
	      Bool bUseSubDir = FALSE);
   /**
      @memo   Ctor for FileConfig for reading from a stream
      @param  input stream to read from
    */
  
   FileConfig(std::istream *iStream);
   /**
      Another constructor, creating an empty object. For use with the
      readFile() method.
   */
   FileConfig(void);

  /**
      Notice that if you're interested in error code, you should use
      flush() function.
      @memo Dtor will save unsaved data.
    */
 ~FileConfig();
  //@}

   /**
      Like reading from a local configuration file, but takes a whole
      path as argument. No default configuration files used. Use with
      FileConfig() constructor.
   */
   void readFile(const char *szFileName);
   
  /** @name Implementation of inherited pure virtual functions */
  //@{
    ///
  const char *readEntry(const char *szKey, const char *szDefault = NULL) const;
    ///
  long int readEntry(const char *szKey, long int Default) const
       { return BaseConfig::readEntry(szKey, Default); }
    ///
  double readEntry(const char *szKey, double Default) const
      { return BaseConfig::readEntry(szKey, Default); }
   ///
  Bool writeEntry(const char *szKey, const char *szValue);
   ///
  Bool writeEntry(const char *szKey, long int Value)
     { return BaseConfig::writeEntry(szKey, Value);}
   ///
  Bool writeEntry(const char *szKey, double Value)
     { return BaseConfig::writeEntry(szKey, Value); }
   ///
  Bool deleteEntry(const char *szKey);
    ///
  Bool flush(Bool bCurrentOnly = FALSE);
   /// writes changes to ostream, returns TRUE on success
  Bool flush(std::ostream *oStream, Bool /* bCurrentOnly */ = FALSE);

   /// parses one line of config file
  Bool parseLine(const char *psz);

   
    ///
  void changeCurrentPath(const char *szPath = "");
  //@}

  /** 
    @name Enumeration 
    @see  BaseConfig::enumSubgroups, BaseConfig::enumEntries
  */
  //@{
    /// Enumerate subgroups of the current group
  Enumerator *enumSubgroups() const;
    /// Enumerate entries of the current group
  Enumerator *enumEntries() const;
  //@}

//protected: --- if FileConfig::ConfigEntry is not public, functions in
//               ConfigGroup such as Find/AddEntry can't return ConfigEntry*!
  class ConfigGroup;
  class ConfigEntry
  {
  private:
    ConfigGroup *m_pParent;     // group that contains us
    ConfigEntry *m_pNext;       // next entry (in linked list)
    char        *m_szName,      // entry name
                *m_szValue,     //       value
                *m_szExpValue,  // value with expanded env variables
                *m_szComment;   // optional comment preceding the entry
    Bool         m_bDirty,      // changed since last read?
                 m_bLocal,      // read from user's file or global one?
                 m_bImmutable;  // can be overriden locally?

  public:
    ConfigEntry(ConfigGroup *pParent, ConfigEntry *pNext, const char *szName);
   ~ConfigEntry();

    // simple accessors
    const char  *Name()         const { return m_szName;     }
    const char  *Value()        const { return m_szValue;    }
    const char  *Comment()      const { return m_szComment;  }
    ConfigEntry *Next()         const { return m_pNext;      }
    Bool         IsDirty()      const { return m_bDirty;     }

    // expand environment variables and return the resulting string
    const char *ExpandedValue();

    // modify entry attributes
    void SetValue(const char *szValue, 
                  Bool bLocal = TRUE, 
                  Bool bFromFile = FALSE);
    void SetComment(char *szComment);
    void SetDirty(Bool bDirty = TRUE);
    void SetNext(ConfigEntry *pNext) { m_pNext = pNext; }
  };

protected:
  class ConfigGroup
  {
  private:
    ConfigEntry *m_pEntries,    // list of entries in this group
                *m_pLastEntry;  // last entry
    ConfigGroup *m_pSubgroups,  // list of subgroups
                *m_pLastGroup,  // last subgroup
                *m_pNext,       // next group at the same level as this one
                *m_pParent;     // parent group
    char        *m_szName,      // group's name
                *m_szComment;   // optional comment preceding this group
    Bool         m_bDirty;      // if FALSE => all subgroups are not dirty

  public:
    // ctors
    ConfigGroup(ConfigGroup *pParent, ConfigGroup *pNext, const char *szName);

    // dtor deletes all entries and subgroups also
    ~ConfigGroup();

    // simple accessors
    const char  *Name()     const { return m_szName;      }
    const char  *Comment()  const { return m_szComment;   }
    ConfigGroup *Next()     const { return m_pNext;       }
    ConfigGroup *Parent()   const { return m_pParent;     }
    ConfigGroup *Subgroup() const { return m_pSubgroups;  }
    ConfigEntry *Entries()  const { return m_pEntries;    }
    Bool         IsDirty()  const { return m_bDirty;      }

    // full name ('/' separated path from top)
    // caller must free buffer
    char *FullName() const;

    // find entry/subgroup (NULL if not found)
    ConfigGroup *FindSubgroup(const char *szName) const;
    ConfigEntry *FindEntry   (const char *szName) const;

    // delete entry/subgroup, return FALSE if doesn't exist
    Bool DeleteSubgroup(const char *szName);
    Bool DeleteEntry   (const char *szName);

    // create new entry/subgroup returning pointer to newly created element
    ConfigGroup *AddSubgroup(const char *szName);
    ConfigEntry *AddEntry   (const char *szName);

    // will also recursively call parent's dirty flag
    void SetDirty(Bool bDirty = TRUE);
    
    // comment shouldn't be empty if this function is used
    void SetComment(char *szComment);
    
    // write dirty data
    Bool flush(std::ostream *ostr);
  };

  // delete current group if has no more entries/subgroups
  // NB: changes m_pCurGroup is returns TRUE (i.e. the group was deleted)
  Bool DeleteIfEmpty();

  ConfigGroup *m_pRootGroup,  // there is one and only one root group
              *m_pCurGroup;   // and also unique current (default) one

  // create all groups found in the strem under group pRootGroup or
  // m_pRootGroup if parameter is NULL
  // returns TRUE on success
  Bool readStream(std::istream *istr, ConfigGroup *pRootGroup = NULL);

  // construct global and local filenames based on the base file name
  // (which nevertheless may contain "/")
    // get the name of system-wide config file
  const char *GlobalConfigFile() const;
    // get the name of user's config file
  const char *LocalConfigFile() const;

  /// trivial initialization of member variables (common to all ctors)
  void Init();

private:
  char     *m_szFileName;        // config file name
 
  const char *m_szFullFileName;  // full file name for error messages
  unsigned  m_uiLine;            // line number for error messages
  Bool      m_bParsingLocal;     // TRUE while parsing user's config file
  Bool      m_bUseSubDir;	// shall we use a subdirectory for config file?  
  // we store in a variable all comments + whitespace preceding the
  // current entry or group in order to be able to store it later
  void      AppendCommentLine(const char *psz = NULL);
  char     *m_szComment;
};

// ----------------------------------------------------------------------------
/// RegistryConfig uses Win32 registry API to store configuration info
// ----------------------------------------------------------------------------
#ifdef  __WIN32__

class RegistryConfig : public BaseConfig
{
public:
  /** @name Constructors and destructor */
  //@{
    /** 
      szRootKey is the name of the top registry key (relative to HKLM\Software
      for system-wide settings and to HKCU\Software for user settings)
      @memo Ctor takes a string - root for our keys in registry.
     */
  RegistryConfig(const char *szRootKey);
    /// dtor frees the resources
 ~RegistryConfig();
  //@}

  /** @name Implementation of inherited pure virtual functions */
  //@{
    ///
   const char *readEntry(const char *szKey, const char *szDefault = NULL) const;
   ///
   long int readEntry(const char *szKey, long int Default) const
      { return BaseConfig::readEntry(szKey, Default); }
    ///
   double readEntry(const char *szKey, double Default) const
      { return BaseConfig::readEntry(szKey, Default); }

    ///
   Bool writeEntry(const char *szKey, const char *szValue);
    ///
   Bool writeEntry(const char *szKey, long int Value)
     { return BaseConfig::writeEntry(szKey, Default);}
   ///
   Bool writeEntry(const char *szKey, double Value)
     { return BaseConfig::writeEntry(szKey, Default); }

    ///
  Bool deleteEntry(const char *szKey);
  //@}

  /** 
    @name Enumeration 
    @see  Enumerator, BaseConfig::enumSubgroups, BaseConfig::enumEntries
  */
  //@{
    /// Enumerate subgroups of the current group
  Enumerator *enumSubgroups() const;
    /// Enumerate entries of the current group
  Enumerator *enumEntries() const;
  //@}

  // intercept this function and change m_hCurrentKey
  virtual void changeCurrentPath(const char *szPath = "");

private:
  const char *ReadValue(void *hKey, const char *szValue) const;
  static Bool KeyIsEmpty(void *hKey);

  void *m_hGlobalRootKey,       // top of system settings
       *m_hLocalRootKey,        // top of user settings
       *m_hGlobalCurKey,        // current registry key (child of global root)
       *m_hLocalCurKey;         //                                local

  char *m_pLastRead;      // pointer to last read value (###)
};

#endif  // WIN32

/// AppConfig is mapped on the class most appropriate for the target platform
#if	  APPCONF_WIN32_NATIVE && defined(__WIN32__)
  typedef class RegistryConfig AppConfig;
#else
  typedef class FileConfig     AppConfig;
#endif

//@}

//@}
#endif  //_APPCONF_H

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
人人爽香蕉精品| 国产91在线看| av午夜一区麻豆| 欧美一级在线视频| 中文字幕亚洲在| 久久国产精品无码网站| 在线观看网站黄不卡| 中文字幕欧美日本乱码一线二线| 婷婷综合另类小说色区| 99精品在线免费| 久久一二三国产| 日韩和欧美一区二区三区| 欧美最新大片在线看| 国产精品美女一区二区| 久久国产夜色精品鲁鲁99| 欧美日韩电影在线播放| 亚洲乱码精品一二三四区日韩在线| 国产在线一区观看| 日韩精品一区在线| 日韩中文字幕区一区有砖一区| 一本大道久久a久久精品综合| 国产午夜精品一区二区三区四区| 亚洲国产成人av网| 一本大道久久精品懂色aⅴ| 亚洲欧洲精品一区二区三区| 岛国av在线一区| 久久午夜国产精品| 精品一区二区综合| 精品国产一区二区三区久久久蜜月 | 99久免费精品视频在线观看| 久久精品视频网| 国产一区二区在线视频| 欧美mv日韩mv国产网站app| 天天色图综合网| 日韩欧美一级二级三级久久久| 日本特黄久久久高潮| 欧美猛男超大videosgay| 午夜电影一区二区三区| 6080yy午夜一二三区久久| 天天爽夜夜爽夜夜爽精品视频| 91麻豆精品国产91久久久更新时间| 亚洲高清在线精品| 91精品欧美综合在线观看最新 | 欧美一级精品在线| 日本免费在线视频不卡一不卡二| 91精品国产综合久久小美女| 美女视频第一区二区三区免费观看网站| 91精品中文字幕一区二区三区| 久久精品国产77777蜜臀| 久久午夜电影网| 91一区一区三区| 亚洲国产wwwccc36天堂| 欧美v亚洲v综合ⅴ国产v| 国产99久久久久久免费看农村| 1024成人网| 欧美精品视频www在线观看| 男人的天堂久久精品| 久久精品视频免费| 色综合色狠狠天天综合色| 五月综合激情婷婷六月色窝| 欧美成人欧美edvon| 在线观看一区日韩| 香蕉久久夜色精品国产使用方法| 日韩欧美一区二区三区在线| 成人18视频在线播放| 午夜av一区二区| 国产区在线观看成人精品| 欧美亚洲综合另类| 国产一区二区三区免费播放 | 久久精品国产77777蜜臀| 欧美激情在线一区二区| 欧美性感一类影片在线播放| 狠狠色2019综合网| 亚洲欧美电影院| 久久品道一品道久久精品| 色婷婷综合激情| 韩国女主播成人在线观看| 亚洲精品视频在线| 26uuu国产在线精品一区二区| 91原创在线视频| 韩日av一区二区| 亚洲成av人片| 国产精品久久久久久久久晋中 | 日本不卡一二三区黄网| 国产精品成人免费| 精品乱人伦一区二区三区| 欧美体内she精高潮| 高清在线不卡av| 紧缚捆绑精品一区二区| 午夜婷婷国产麻豆精品| 中文字幕 久热精品 视频在线 | 国产成人精品免费看| 日本亚洲最大的色成网站www| 国产精品久久毛片av大全日韩| 欧美岛国在线观看| 91精品国产全国免费观看| 91精彩视频在线| www.av亚洲| 国产成人在线电影| 久久精品国产一区二区三 | 极品美女销魂一区二区三区| 中文字幕av在线一区二区三区| 日韩视频国产视频| 欧美日韩国产首页| 色先锋aa成人| 91在线观看美女| 99re热这里只有精品视频| 国产乱一区二区| 久久66热偷产精品| 麻豆国产欧美日韩综合精品二区| 日韩影院精彩在线| 水野朝阳av一区二区三区| 一区二区三区不卡在线观看| 《视频一区视频二区| 中文无字幕一区二区三区| 久久久久久久电影| 国产精品水嫩水嫩| 国产精品女主播在线观看| 欧美国产成人精品| 亚洲欧美一区二区三区久本道91| 中文字幕乱码日本亚洲一区二区| 国产亚洲成aⅴ人片在线观看| 中文字幕免费不卡| 亚洲日本韩国一区| 亚洲成a人片在线不卡一二三区| 日韩国产在线观看| 麻豆成人免费电影| 国产精品一区二区在线播放| 福利91精品一区二区三区| 成人在线一区二区三区| 色婷婷精品大在线视频| 欧美视频在线观看一区二区| 91麻豆精品国产91久久久更新时间| 日韩欧美专区在线| 久久精品人人做| 国产精品的网站| 亚洲国产精品一区二区www| 午夜精彩视频在线观看不卡| 九色综合狠狠综合久久| 国产成人av一区二区三区在线| 99久久久精品| 在线成人av网站| 国产亚洲精品bt天堂精选| 樱桃视频在线观看一区| 日本伊人精品一区二区三区观看方式| 精一区二区三区| av电影在线观看不卡| 欧美乱熟臀69xxxxxx| 久久日韩精品一区二区五区| 亚洲人成在线观看一区二区| 日本大胆欧美人术艺术动态| 国产成人夜色高潮福利影视| 91黄视频在线观看| 精品国产一区二区三区久久影院| 亚洲精品国产成人久久av盗摄| 日韩—二三区免费观看av| 成人av中文字幕| 欧美一区二区三区免费视频| 国产精品网站在线观看| 日韩电影一区二区三区| 成+人+亚洲+综合天堂| 日韩一区二区三区在线| 1区2区3区欧美| 久久国产精品无码网站| 精品污污网站免费看| 欧美国产视频在线| 奇米影视7777精品一区二区| 99久久伊人精品| 久久久久88色偷偷免费| 日本中文字幕不卡| 99riav一区二区三区| 国产亚洲精品免费| 美美哒免费高清在线观看视频一区二区| 国产成人午夜99999| 日韩欧美在线综合网| 亚洲一区二区三区四区五区中文 | 久久精品99国产精品| 欧美午夜精品久久久| 亚洲欧洲日产国码二区| 国产成人精品免费在线| 欧美一区二区三区四区久久| 一区二区三区**美女毛片| 99精品久久只有精品| 欧美国产亚洲另类动漫| 久久99精品久久只有精品| 欧美丰满少妇xxxxx高潮对白| 樱花草国产18久久久久| 一本到高清视频免费精品| 国产精品久久久久久久岛一牛影视| 激情五月婷婷综合网| 日韩免费看的电影| 免费在线观看成人| 91精品一区二区三区久久久久久 | 成人午夜视频网站| 26uuu国产日韩综合| 国产伦精品一区二区三区免费| 欧美变态tickling挠脚心| 三级久久三级久久| 678五月天丁香亚洲综合网| 日韩制服丝袜av|