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

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

?? misc.h

?? common c++提供socket
?? H
?? 第 1 頁 / 共 2 頁
字號:
// Copyright (C) 1999-2005 Open Source Telecom Corporation.//// 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 of the License, 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 this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.// // As a special exception, you may use this file as part of a free software// library without restriction.  Specifically, if other files instantiate// templates or use macros or inline functions from this file, or you compile// this file and link it with other files to produce an executable, this// file does not by itself cause the resulting executable to be covered by// the GNU General Public License.  This exception does not however    // invalidate any other reasons why the executable file might be covered by// the GNU General Public License.    //// This exception applies only to the code released under the name GNU// Common C++.  If you copy code from other releases into a copy of GNU// Common C++, as the General Public License permits, the exception does// not apply to the code that you add in this way.  To avoid misleading// anyone as to the status of such modified files, you must delete// this exception notice from them.//// If you write modifications of your own for GNU Common C++, it is your choice// whether to permit this exception to apply to your modifications.// If you do not wish that, delete this exception notice.///** * @file misc.h * @short Memory management, configuration keydata objects and string * tokenizer. **/#ifndef	CCXX_MISC_H_#define	CCXX_MISC_H_#ifndef CCXX_MISSING_H_#include <cc++/missing.h>#endif#ifndef CCXX_THREAD_H_#include <cc++/thread.h>#endif#define	KEYDATA_INDEX_SIZE	97#define	KEYDATA_PAGER_SIZE	512#if defined(PATH_MAX)#if PATH_MAX > 512#define KEYDATA_PATH_SIZE	512#else#define	KEYDATA_PATH_SIZE	PATH_MAX#endif#else#define	KEYDATA_PATH_SIZE	256#endif#ifdef	CCXX_NAMESPACESnamespace ost {#endifclass __EXPORT Runlist;class __EXPORT Runable;/** * The memory pager is used to allocate cumulative memory pages for * storing object specific "persistant" data that is presumed to persist * during the life of a given derived object.  When the object is * destroyed, all accumulated data is automatically purged. *  * There are a number of odd and specialized utility classes found in Common * C++.  The most common of these is the "MemPager" class.  This is basically * a class to enable page-grouped "cumulative" memory allocation; all * accumulated allocations are dropped during the destructor.  This class has * found it's way in a lot of other utility classes in Common C++. * * @author David Sugar <dyfet@ostel.com> * @short Accumulative object memory allocator. */class __EXPORT MemPager{private:	friend class String;	friend class MemPagerObject;	size_t pagesize;	unsigned int pages;	struct _page	{		struct _page *next;		size_t used;	} *page;protected:	/**	 * Allocate first workspace from paged memory.  This method	 * scans all currently allocated blocks for available space	 * before adding new pages and hence is both slower and more	 * efficient.	 *	 * @param size size of memory to allocate.	 * @return pointer to allocated memory.	 */	virtual void* first(size_t size);	/**	 * Allocate memory from either the currently active page, or	 * allocate a new page for the object.	 *	 * @param size size of memory to allocate.	 * @return pointer to allocated memory.	 */	virtual void* alloc(size_t size);	/**	 * Allocate a string from the memory pager pool and copy the	 * string into it's new memory area.  This method allocates	 * memory by first searching for an available page, and then	 * allocating a new page if no space is found.	 *	 * @param str string to allocate and copy into paged memory pool.	 * @return copy of string from allocated memory.	 */	char* first(char *str);	/**	 * Allocate a string from the memory pager pool and copy the	 * string inti it's new memory area.  This checks only the	 * last active page for available space before allocating a	 * new page.	 *	 * @param str string to allocate and copy into paged memory pool.	 * @return copy of string from allocated memory.	 */	char* alloc(const char *str);	/**	 * Create a paged memory pool for cumulative storage.  This	 * pool allocates memory in fixed "pagesize" chunks.  Ideal	 * performance is achived when the pool size matches the	 * system page size.  This pool can only exist in derived	 * objects.	 *	 * @param pagesize page size to allocate chunks.	 */	MemPager(size_t pagesize = 4096);	/**	 * purge the current memory pool.	 */	void purge(void);	/**	 * Clean for memory cleanup before exiting.	 */	void clean(void);	/**	 * Delete the memory pool and all allocated memory.	 */	virtual ~MemPager();public:	/**	 * Return the total number of pages that have been allocated	 * for this memory pool.	 *	 * @return number of pages allocated.	 */	inline int getPages(void)		{return pages;};};/** * The StackPager provides a repository to stash and retrieve working * data in last-in-first-out order.  The use of a mempager to support * it's operation allows storage of arbitrary sized objects with no * fixed limit. * * @author David Sugar <dyfet@ostel.com> * @short last in first out object pager. */class __EXPORT StackPager : protected MemPager{private:	typedef struct frame	{		struct frame *next;		char data[1];	}	frame_t;	frame_t *stack;public:	/**	 * Create a lifo pager as a mempager.	 *	 * @param pagesize for memory allocation	 */	StackPager(size_t pagesize);	/**	 * Push an arbitrary object onto the stack.	 *	 * @return stack memory location.	 * @param object pointer to data	 * @param size of data.	 */	void *push(const void *object, size_t size);	/**	 * Push a string onto the stack.	 *	 * @return stack memory location.	 * @param string pointer.	 */	void *push(const char *string);	/**	 * Retrieve next object from stack.	 *	 * @return object.	 */	void *pull(void);	/**	 * Purge the stack of all objects and memory allocations.	 */	void purge(void);};/** * The shared mempager uses a mutex to protect key access methods. * This class is used when a mempager will be shared by multiple * threads. * * @author David Sugar <dyfet@ostel.com> * @short mutex protected memory pager. */class __EXPORT SharedMemPager : public MemPager, public Mutex{protected:	/**	 * Create a mempager mutex pool.	 *	 * @param pagesize page size for allocation.	 * @param name a name for the pool.	 */	SharedMemPager(size_t pagesize = 4096, const char *name = NULL);	/**	 * Purge the memory pool while locked. 	 */	void purge(void);	/**	 * Get the first memory page after locking.	 *	 * @return allocated memory space.	 * @param size of request.	 */	void* first(size_t size);	/**	 * Get the last memory page after locking.	 *	 * @return allocated memory space.	 * @param size of request.	 */	void* alloc(size_t size);};/** * Keydata objects are used to load and hold "configuration" data for * a given application. * * This class is used to load and then hold "<code>keyword = value</code>" pairs parsed from a text * based "config" file that has been divided into "<code>[sections]</code>". The syntax is: * * <code><pre> * [section_name] * key1=value1 * key2=value2</pre></code> * * Essentially, the "path" is a "keypath" into a theoretical namespace of key * pairs, hence one does not use "real" filepaths that may be OS dependent. The "<code>/</code>" path refers * to "<code>/etc</code>" prefixed (on UNIX) directories and this is processed within the constructor. It * could refer to the <code>/config</code> prefix on QNX, or even, gasp, a "<code>C:\WINDOWS</code>". Hence, a keypath of * "<code>/bayonne.d/vmhost/smtp</code>" actually resolves to a "<code>/etc/bayonne.d/vmhost.conf</code>" and loads key * value pairs from the <code>[smtp]</code> section of that <code>.conf</code> file.  * * Similarly, something like "<code>~bayonne/smtp</code>" path refers to a "<code>~/.bayonnerc</code>" and loads key pairs * from the <code>[smtp]</code> section. This coercion occurs before the name is passed to the open call.  * * I actually use derived keydata based classes as global initialized objects, and they hence * automatically load and parse config file entries even before "main" has started.  * * Keydata can hold multiple values for the same key pair.  This can * occur either from storing a "list" of data items in a config file, * or when overlaying multiple config sources (such as <code>/etc/....conf</code> and * <code>~/.confrc</code> segments) into a single object.  The keys are stored as * cumulative (read-only/replacable) config values under a hash index * system for quick retrieval. *  * Keydata can * also load a table of "initialization" values for keyword pairs that were * not found in the external file. * * One typically derives an application specific keydata class to load a * specific portion of a known config file and initialize it's values.  One * can then declare a global instance of these objects and have * configuration data initialized automatically as the executable is loaded. *  * Hence, if I have a "[paths]" section in a "<code>/etc/server.conf?</code>" file, I might * define something like: * * <code><pre> * class KeyPaths : public Keydata * { *   public: *     KeyPaths() : Keydata("/server/paths") *     { *       static Keydata::Define *defvalues = { * 	  {"datafiles", "/var/server"}, * 	  {NULL, NULL}}; *  *       // override with [paths] from "~/.serverrc" if avail. *  *       load("~server/paths"); *       load(defvalues); *     } * }; *  * KeyPaths keypaths; * </pre></code> * * @author David Sugar <dyfet@ostel.com> * @short load text configuration files into keyword pairs. */class __EXPORT Keydata : protected MemPager{public:#ifdef	CCXX_PACKED#pragma pack(1)#endif	struct Keyval	{		Keyval *next;		char val[1];	};	struct Keysym	{		Keysym *next;		Keyval *data;		const char **list;		short count;		char sym[1];	};	struct Define	{		char *keyword;		char *value;	};#ifdef	CCXX_PACKED#pragma pack()#endifprivate:	static std::ifstream *cfgFile;	static char lastpath[KEYDATA_PATH_SIZE + 1];	static int count;	static int sequence;	int link;	Keysym *keys[KEYDATA_INDEX_SIZE];	/**	 * Compute a hash key signature id for a symbol name.	 *	 * @return key signature index path.	 * @param sym symbol name.	 */	unsigned getIndex(const char *sym);protected:	Keysym* getSymbol(const char *sym, bool create);public:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av网站免费线看精品| 777久久久精品| 日韩黄色片在线观看| 国产欧美日韩卡一| 91麻豆精品91久久久久同性| a级精品国产片在线观看| 美女mm1313爽爽久久久蜜臀| 亚洲精品日产精品乱码不卡| 国产日韩精品视频一区| 欧美精品丝袜中出| 94色蜜桃网一区二区三区| 久久99最新地址| 日韩精品亚洲一区二区三区免费| 国产欧美一区二区三区沐欲 | 国产精品1区2区| 亚洲一区二区在线观看视频 | 日韩一级精品视频在线观看| 91小视频在线| 成人午夜免费av| 国产在线视视频有精品| 久久精品国产网站| 天堂蜜桃91精品| 亚洲午夜久久久久久久久电影网| 中文av一区特黄| 国产亚洲精品aa| 国产欧美一区二区三区鸳鸯浴| 精品国产在天天线2019| 欧美精品一二三四| 91.麻豆视频| 欧美年轻男男videosbes| 色综合婷婷久久| 成人精品视频一区| 成人h精品动漫一区二区三区| 国产成人免费av在线| 国产一区二区精品久久99| 国内精品国产成人| 国产麻豆视频一区二区| 国产在线精品一区二区三区不卡 | eeuss国产一区二区三区| 国产99久久精品| 成人午夜视频在线| 不卡的av中国片| 99视频一区二区三区| www.欧美.com| 色偷偷一区二区三区| 色94色欧美sute亚洲线路一ni| 色婷婷久久久久swag精品 | 国产欧美一区二区精品仙草咪| 久久精品网站免费观看| 国产精品伦理在线| 亚洲精品网站在线观看| 亚洲成人精品影院| 另类的小说在线视频另类成人小视频在线 | 国产精品免费久久久久| 亚洲人快播电影网| 亚洲国产精品人人做人人爽| 日本怡春院一区二区| 国产麻豆精品视频| 99久久免费国产| 欧美无人高清视频在线观看| 日韩亚洲欧美综合| 欧美国产精品中文字幕| 亚洲免费在线播放| 奇米影视7777精品一区二区| 国产成人夜色高潮福利影视| 成人app在线| 欧美久久久久久蜜桃| 精品久久久久一区| 亚洲特级片在线| 日韩av在线发布| 丁香婷婷综合色啪| 欧美一a一片一级一片| 日韩精品一区二区三区视频播放| 久久久久国产精品人| 中文字幕在线观看一区二区| 亚洲成年人影院| 国产一区二区导航在线播放| av成人老司机| 日韩欧美国产一区二区在线播放| 欧美—级在线免费片| 偷窥国产亚洲免费视频| 欧美午夜视频网站| 26uuu亚洲| 亚洲综合一区二区精品导航| 精品无码三级在线观看视频| 91美女蜜桃在线| 欧美va亚洲va香蕉在线| 一区二区三区四区av| 久久成人羞羞网站| 91极品视觉盛宴| 国产亚洲精品aa| 日韩av中文字幕一区二区三区| 成人一区二区视频| 9191国产精品| 亚洲免费在线视频| 国产精品一品二品| 日韩午夜在线观看| 一区二区高清视频在线观看| 国产制服丝袜一区| 在线成人免费观看| 亚洲欧美电影一区二区| 国产一区二区在线看| 欧美电影在线免费观看| 亚洲精品第一国产综合野| 国产精品99久久久久久似苏梦涵| 欧美男人的天堂一二区| 国产精品久久三| 国产在线不卡一区| 日韩欧美色电影| 香蕉成人伊视频在线观看| 色综合久久综合网欧美综合网| 久久久久久久久蜜桃| 肉丝袜脚交视频一区二区| 91美女视频网站| 中文字幕在线不卡| 成人精品视频网站| 国产日本欧美一区二区| 激情都市一区二区| 日韩欧美成人午夜| 日韩精品免费专区| 欧美人伦禁忌dvd放荡欲情| 一区二区三区.www| 色成人在线视频| 亚洲免费观看高清完整版在线观看 | 91亚洲永久精品| 中文欧美字幕免费| 成人禁用看黄a在线| 国产欧美日韩另类一区| 国产a久久麻豆| 国产亚洲欧美一级| 国产福利一区在线| 欧美激情一区二区三区不卡| 国产福利91精品一区| 2020日本不卡一区二区视频| 久久不见久久见中文字幕免费| 欧美一区二区三区公司| 麻豆免费看一区二区三区| 日韩精品一区二区三区四区| 精品夜夜嗨av一区二区三区| 精品区一区二区| 国产精品一区二区久久精品爱涩| 国产亚洲精品福利| 99精品一区二区| 亚洲视频免费在线| 欧美亚洲综合色| 七七婷婷婷婷精品国产| 日韩一区二区三区av| 精品在线一区二区| 欧美国产日韩一二三区| 91在线精品秘密一区二区| 亚洲精品水蜜桃| 91精品国产91久久久久久一区二区 | 欧美aaaaa成人免费观看视频| 欧美一级午夜免费电影| 精品一区二区三区日韩| 亚洲成人av电影在线| 欧美一区二区福利视频| 国产精品12区| 中文字幕综合网| 91精品国产乱码| 国产精品一区二区不卡| 亚洲视频中文字幕| 欧美性猛交一区二区三区精品 | 丰满放荡岳乱妇91ww| 亚洲三级在线免费观看| 欧美嫩在线观看| 国产精品资源在线看| 亚洲精品国产视频| 日韩欧美国产综合在线一区二区三区 | 久久久久国产精品麻豆ai换脸| 波多野结衣一区二区三区| 亚洲va欧美va人人爽午夜| 久久综合久久综合亚洲| 色婷婷综合久色| 久久99精品久久久久久久久久久久| 欧美高清在线一区| 9191国产精品| 91色porny蝌蚪| 久久99精品视频| 樱桃国产成人精品视频| 日韩美女天天操| 在线观看中文字幕不卡| 国内精品自线一区二区三区视频| 亚洲欧美电影一区二区| 欧美精品一区二| 91福利在线导航| 国产成人超碰人人澡人人澡| 亚洲va天堂va国产va久| 国产精品久久久久久久第一福利| 欧美日韩国产免费一区二区| 国产99久久久国产精品免费看| 亚洲成av人影院| 国产精品久久久久久久浪潮网站 | 2欧美一区二区三区在线观看视频| 91在线porny国产在线看| 国产在线国偷精品免费看| 性久久久久久久久| 亚洲人成网站在线| 国产欧美日韩另类视频免费观看| 欧美精品日日鲁夜夜添|