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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? stdstring.h

?? 字符串處理源代碼:StdString
?? H
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
// ================================================================================================-
//  FILE:  StdString.h
//  AUTHOR:	Joe O'Leary (with outside help noted in comments)
//  REMARKS:
//		This header file declares the CStdString class.  This string class is
//		derived from the Standard C++ Libarary string classes (one of them)
//		and adds to them the MFC CString conveniences of
//			- UNICODE support and
//			- implicit casts to PCTSTR
//			- loading from resource files
//			- formatting (via Format()) function.
//			- writing to/reading from COM IStream interfaces
//			- Functional objects for use in STL algorithms
//
//		This header also declares our own version of the MFC/ATL UNICODE-MBCS
//		conversion macros.  Our version looks exactly like the Microsoft's to
//		facilitate portability.
//
// COPYRIGHT:
//		1999 Joseph M. O'Leary.  This code is free.  Use it anywhere you want.  Rewrite
//		it, restructure it, whatever you want.  Please don't blame me if it causes your
//		$30 billion dollar satellite to explode.  If you redistribute it in any form, I
//		would appreciate it if you would leave this notice here.
//
//		If you find any bugs, please let me know:
//
//				jmoleary@earthlink.net
// =================================================================================================

#ifndef _STDSTRING_H_
#define _STDSTRING_H_


// Turn off browser references

#ifdef _MSC_VER
	#pragma component(browser, off, references, "CStdString")
#endif

// Avoid legacy code screw up -- if _UNICODE is defined, then UNICODE must be as well
#if defined (_UNICODE) && !defined (UNICODE)
	#define UNICODE
#endif

// If this class is not being built as a part of the W32 library, then we have not
// yet included W32Base.h so we've got to include and define all the necessary stuff here 

#ifndef _W32BASE_H_

	#define W32DLLSPEC		// define this to nothing (i.e. we're not part of W32.DLL)
	#include <locale>
	#include <TCHAR.H>
	#ifndef STRICT
		#define STRICT
	#endif
	#include <windows.h>

	// In non-MFC builds, ASSERT and VERIFY probably won't be defined, so
	// check to see if they are defined and, if not, define them ourself.

	#ifndef ASSERT
		#include <crtdbg.h>	// probably already included but do it just in case
		#define ASSERT(f) _ASSERTE((f))
	#endif
	#ifndef VERIFY
		#ifdef _DEBUG
			#define VERIFY(x) ASSERT((x))
		#else
			#define VERIFY(x) x
		#endif
	#endif

	#ifndef TRACE
		#define TRACE
	#endif

#endif

#include <functional>		// needed for StdStringLessNoCase, et al

// If this is a recent enough version of VC include comdef.h, we can write many CStdString
// functions to deal with COM types and compiler support classes like _bstr_t

#if defined (_MSC_VER) && (_MSC_VER >= 1100)
	#include <comdef.h>
	#define STDSTRING_INC_COMDEF		// signal that we #included MS comdef.h file
#endif

// Microsoft defines PCSTR, PCWSTR, etc, but no PCTSTR.  I hate to use the versions
// with the "L" in front of them because that's a leftover from Win 16 days, even
// though it evaluates to the same thing.  Define a PCSTR as an LPCTSTR.

#ifndef PCTSTR_DEFINED
	typedef const TCHAR* PCTSTR;
	#define PCTSTR_DEFINED
#endif

#ifndef PCOLESTR
	#define PCOLESTR	LPCOLESTR
#endif
#ifndef POLESTR
	#define POLESTR		LPOLESTR
#endif

// UNICODE/MBCS conversion macros.  These are made to work just like the MFC/ATL ones.  We
// will not define them if
//		_NO_STDCONVERSION	- the developer explicitly turned them off
//		USES_CONVERSION		- this is an ATL/MFC build and they are already defined

#ifndef _NO_STDCONVERSION
	#if defined (USES_CONVERSION)

		#define _NO_STDCONVERSION	// Let StdString.cpp know it should not compile functions

	#else

		// In MFC builds we can just use the MFC UNICODE conversion macros.
		// In NON-MFC builds will have to define them ourselves

		#include <malloc.h>

		#ifdef _MFC_VER

			#include <afxconv.h>
			#define _NO_STDCONVERSION	// Let StdString.cpp know it should not compile functions

		#else

			// Define our conversion macros to look exactly like Microsoft's to facilitate
			// using this stuff both with and without MFC/ATL

			#ifndef _DEBUG
				#define USES_CONVERSION int _convert; _convert
			#else
				#define USES_CONVERSION int _convert = 0
			#endif

			W32DLLSPEC PWSTR  StdA2WHelper(PWSTR pw, PCSTR pa, int nChars);
			W32DLLSPEC PSTR   StdW2AHelper(PSTR pa, PCWSTR pw, int nChars);

			#define A2W(pa) (\
				((PCSTR)(pa) == NULL) ? NULL : (\
					_convert = (strlen((pa))+1),\
					StdA2WHelper((LPWSTR) alloca(_convert*2), (pa), _convert)))

			#define W2A(pw) (\
				((PCWSTR)(pw) == NULL) ? NULL : (\
					_convert = (wcslen((pw))+1)*2,\
					StdW2AHelper((PSTR) alloca(_convert), (pw), _convert)))

			#define A2CW(pa) ((PCWSTR)A2W((pa)))
			#define W2CA(pw) ((PCSTR)W2A((pw)))

			#ifdef _UNICODE
				#define T2A W2A
				#define A2T A2W
				inline PWSTR T2W(PTSTR p) { return p; }
				inline PTSTR W2T(PWSTR p) { return p; }
				#define T2CA W2CA
				#define A2CT A2CW
				inline PCWSTR T2CW(PCTSTR p) { return p; }
				inline PCTSTR W2CT(PCWSTR p) { return p; }
			#else
				#define T2W A2W
				#define W2T W2A
				inline PSTR T2A(PTSTR p) { return p; }
				inline PTSTR A2T(PSTR p) { return p; }
				#define T2CW A2CW
				#define W2CT W2CA
				inline PCSTR T2CA(PCTSTR p) { return p; }
				inline PCTSTR A2CT(PCSTR p) { return p; }
			#endif // #ifdef _UNICODE

			#if defined(_UNICODE)
			// in these cases the default (TCHAR) is the same as OLECHAR
				inline size_t ocslen(PCOLESTR x) { return wcslen(x); }
				inline OLECHAR* ocscpy(POLESTR dest, PCOLESTR src) { return wcscpy(dest, src); }
				inline PCOLESTR T2COLE(PCTSTR p) { return p; }
				inline PCTSTR OLE2CT(PCOLESTR p) { return p; }
				inline POLESTR T2OLE(PTSTR p) { return p; }
				inline PTSTR OLE2T(POLESTR p) { return p; }
			#elif defined(OLE2ANSI)
			// in these cases the default (TCHAR) is the same as OLECHAR
				inline size_t ocslen(PCOLESTR x) { return strlen(x); }
				inline OLECHAR* ocscpy(POLESTR dest, LPCOLESTR src) { return strcpy(dest, src); }
				inline PCOLESTR T2COLE(PCTSTR p) { return p; }
				inline PCTSTR OLE2CT(PCOLESTR p) { return p; }
				inline POLESTR T2OLE(PTSTR p) { return p; }
				inline PTSTR OLE2T(POLESTR p) { return p; }
			#else
				inline size_t ocslen(PCOLESTR x) { return wcslen(x); }
				inline OLECHAR* ocscpy(POLESTR dest, PCOLESTR src)
				{return (POLESTR) memcpy(dest, src, (wcslen(src)+1)*sizeof(WCHAR));}
				//CharNextW doesn't work on Win95 so we use this
				#define T2COLE(pa)	A2CW((pa))
				#define T2OLE(pa)	A2W((pa))
				#define OLE2CT(po)	W2CA((po))
				#define OLE2T(po)	W2A((po))
			#endif

			#ifdef OLE2ANSI
				inline POLESTR A2OLE(PSTR p) { return p;}
				inline PSTR OLE2A(POLESTR p) { return p;}
				#define W2OLE W2A
				#define OLE2W A2W
				inline PCOLESTR A2COLE(PCSTR p) { return p;}
				inline PCSTR OLE2CA(PCOLESTR p) { return p;}
				#define W2COLE W2CA
				#define OLE2CW A2CW
			#else
				inline POLESTR W2OLE(PWSTR p) { return p; }
				inline PWSTR OLE2W(POLESTR p) { return p; }
				#define A2OLE A2W
				#define OLE2A W2A
				inline PCOLESTR W2COLE(PCWSTR p) { return p; }
				inline PCWSTR OLE2CW(PCOLESTR p) { return p; }
				#define A2COLE A2CW
				#define OLE2CA W2CA
			#endif

			inline BSTR OLE2BSTR(PCOLESTR p) {return ::SysAllocString(p);}
			#if defined(_UNICODE)
			// in these cases the default (TCHAR) is the same as OLECHAR
				inline BSTR T2BSTR(PCTSTR p) {return ::SysAllocString(p);}
				inline BSTR A2BSTR(PCSTR p) {USES_CONVERSION; return ::SysAllocString(A2COLE(p));}
				inline BSTR W2BSTR(PCWSTR p) {return ::SysAllocString(p);}
			#elif defined(OLE2ANSI)
			// in these cases the default (TCHAR) is the same as OLECHAR
				inline BSTR T2BSTR(PCTSTR p) {return ::SysAllocString(p);}
				inline BSTR A2BSTR(PCSTR p) {return ::SysAllocString(p);}
				inline BSTR W2BSTR(PCWSTR p) {USES_CONVERSION; return ::SysAllocString(W2COLE(p));}
			#else
				inline BSTR T2BSTR(PCTSTR p) {USES_CONVERSION; return ::SysAllocString(T2COLE(p));}
				inline BSTR A2BSTR(PCSTR p) {USES_CONVERSION; return ::SysAllocString(A2COLE(p));}
				inline BSTR W2BSTR(PCWSTR p) {return ::SysAllocString(p);}
			#endif

		#endif // #ifdef _MFC_VER

	#endif // #ifndef USES_CONVERSION
#endif // #ifndef _NO_STDCONVERSION

// Define our own macros for "other" type to TCHAR type conversion
// i.e. in a UNICODE build "other" would be char.  In a non-UNICODE
// build, "other" would be wchar_t  These macros make the declaration
// of the CStdString class a lot cleaner

#ifdef _UNICODE
	#define O2T A2T				// "other" type string to generic text type string
	#define O2CT A2CT			// constant "other" type string to generic text type string
	#define T2O T2A				// generic text type string to "other" type string.
	#define T2CO T2CA			// generic text type string to constant "other type string.
#else
	#define	O2T W2T
	#define O2CT W2CT
	#define T2O T2W
	#define T2CO T2CW
#endif

// Define some short names for types that we will refer to in our definition of
// the CStdString class.

#ifdef _UNICODE
	#define TOTHER	char		// the "other" char type			(opposite of TCHAR)
	#define	POSTR PSTR			// the "other" string type			(opposite of PTSTR)
	#define	PCOSTR PCSTR		// the "other" const string type	(oppsite of PCTSTR)
	const PCOSTR szONull = "";	// an empty string of the "other" type.
#else
	#define TOTHER wchar_t		
	#define POSTR PWSTR		
	#define PCOSTR PCWSTR		
	const PCOSTR szONull = L"";
#endif

const PCTSTR szTNull = _T("");	// an empty string of the TCHAR" type

typedef std::basic_string<TCHAR> STRBASE;	// our base class
typedef std::basic_string<TOTHER> STROTHER; // opposite of our base

// Define TSTRING -- this is a basic_string built around the TCHAR type, kind of like MFC CString
// It is also our base class.

#ifndef _TSTRING_DEFINED_
#define _TSTRING_DEFINED_
	typedef std::basic_string<TCHAR> TSTRING;
#endif

//			Now we can define the class (finally!)
// =====================================================================================================
// CLASS: CStdString
// REMARKS:
//		This class is a simplified version of the Standard C++ Library string or basic string class.  It
//		is derived from basic_string<TCHAR> and adds some MFC CString-like functionality
//
//		Basically, this is my attempt to make Standard C++ library strings as easy to use as the MFC
//		CString class.
// =====================================================================================================

#define CStdString _SS	// Make CStdString actually use a shorter name to avoid compiler warning 4786
class W32DLLSPEC CStdString : public STRBASE
{
public:

	typedef std::allocator<TCHAR> MYALLOC;
	// constructors
	CStdString();
	CStdString(const CStdString& str);
	CStdString(const STRBASE& str);
	CStdString(const STROTHER& str);
	CStdString(PCTSTR pT);
	CStdString(PCOSTR pO);
	CStdString(const_iterator first, const_iterator last);
	CStdString(size_type nSize, value_type ch, const allocator_type& al=std::allocator<TCHAR>());
#ifdef STDSTRING_INC_COMDEF
	CStdString(const _bstr_t& bstr);							// takes the _bstr_t MS compiler COM support class
#endif

	// assignment operators
	CStdString&			operator=(const CStdString& str);		// copy constructor
	CStdString&			operator=(const STRBASE& str);			// takes a base std string type (string or wstring)
	CStdString&			operator=(const STROTHER& str);			// takes the other std string type (string or wstring)
	CStdString&			operator=(PCTSTR pT);					// takes const TCHAR pointer
	CStdString&			operator=(PCOSTR pO);					// takes const pointer to "other" type (opposite of PCTSTR)

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品乱码久久久久久| 久久亚洲一级片| 日韩激情在线观看| 国产美女久久久久| 亚洲三级小视频| 久久久久成人黄色影片| 91精品国产丝袜白色高跟鞋| 懂色中文一区二区在线播放| 日本va欧美va欧美va精品| 一区二区三区中文字幕| 国产午夜精品福利| 精品免费国产二区三区| 欧美乱妇一区二区三区不卡视频| www.欧美亚洲| 国产xxx精品视频大全| 久久99久久久久久久久久久| 亚洲国产精品综合小说图片区| 亚洲欧洲无码一区二区三区| 精品播放一区二区| 欧美一区二区三区视频在线观看| 色婷婷综合久色| 99re在线视频这里只有精品| 国产精品自产自拍| 久久99精品久久久久| 青青草成人在线观看| 亚洲一本大道在线| 亚洲影视在线观看| 一区二区高清在线| 一区二区高清视频在线观看| 亚洲欧美另类小说| 亚洲另类在线视频| 亚洲男同1069视频| 亚洲精品国产a| 一区二区三区不卡在线观看 | 亚洲一区二区av在线| 亚洲精品久久久久久国产精华液| 亚洲国产精品精华液2区45| 国产亚洲精品aa| 国产色91在线| 亚洲国产精品黑人久久久| 亚洲国产精品ⅴa在线观看| 国产色产综合色产在线视频| 国产日韩精品一区二区浪潮av| 久久午夜羞羞影院免费观看| 久久久影视传媒| 久久久精品免费免费| 国产日本欧洲亚洲| 国产精品久久二区二区| 国产精品久久三区| 亚洲综合免费观看高清在线观看| 亚洲综合色在线| 午夜精品福利久久久| 美腿丝袜亚洲综合| 国产精品69久久久久水密桃| 成年人国产精品| 色综合久久久久| 欧美在线视频全部完| 制服丝袜激情欧洲亚洲| 欧美大肚乱孕交hd孕妇| 国产欧美日韩精品一区| 亚洲女同一区二区| 日韩二区三区四区| 国产伦精品一区二区三区在线观看 | 5858s免费视频成人| 欧美本精品男人aⅴ天堂| 国产欧美日韩精品a在线观看| 国产麻豆视频一区二区| 成人午夜激情视频| 91福利国产成人精品照片| 884aa四虎影成人精品一区| 久久久久久久久久久久久久久99| 欧美激情一区二区三区蜜桃视频| 亚洲精品免费在线播放| 视频一区在线播放| 国产不卡免费视频| 欧美综合亚洲图片综合区| 欧美电影免费提供在线观看| 国产精品理论片在线观看| 亚洲国产日日夜夜| 国产成人午夜视频| 精品婷婷伊人一区三区三| 精品粉嫩aⅴ一区二区三区四区| 中文字幕一区二区三区四区不卡| 亚洲成人av一区二区三区| 国产成人av电影在线播放| 欧美日韩一卡二卡| 欧美国产视频在线| 青青青伊人色综合久久| 成人av网在线| 日韩视频不卡中文| 亚洲欧美日韩成人高清在线一区| 蜜臀99久久精品久久久久久软件| av在线这里只有精品| 欧美大片拔萝卜| 亚洲无线码一区二区三区| 风间由美一区二区av101| 777亚洲妇女| 亚洲精品va在线观看| 国产成人日日夜夜| 欧美一级午夜免费电影| 一区二区三区四区在线播放 | 亚洲男人的天堂网| 国产成人综合网站| 欧美一级二级三级蜜桃| 一区二区三区四区视频精品免费| 国产精品一级在线| 欧美成人一区二区三区在线观看 | 精品国产精品网麻豆系列| 亚洲国产精品视频| 成人av在线资源网| 久久人人超碰精品| 久久精品国产成人一区二区三区| 欧美体内she精高潮| 国产福利一区二区三区在线视频| 91精品国产综合久久香蕉麻豆| 一区二区三区国产| 色综合天天天天做夜夜夜夜做| 26uuu成人网一区二区三区| 日韩二区三区在线观看| 欧美日韩成人高清| 亚洲午夜激情网站| 欧美在线999| 樱桃国产成人精品视频| 91在线无精精品入口| 欧美激情一区二区在线| 国产成人在线网站| 国产日韩v精品一区二区| 精品一区二区三区在线播放视频| 日韩丝袜美女视频| 美女一区二区视频| 日韩欧美精品在线| 久久精品国产99| 欧美白人最猛性xxxxx69交| 蜜臀av一区二区在线观看| 91精品黄色片免费大全| 日韩精品1区2区3区| 欧美一区二区在线播放| 日本色综合中文字幕| 日韩欧美在线观看一区二区三区| 无吗不卡中文字幕| 在线播放视频一区| 久久精品久久精品| 日韩免费观看高清完整版在线观看| 免费成人在线网站| 久久久青草青青国产亚洲免观| 国产美女久久久久| 中日韩av电影| 国产日韩欧美综合在线| 成人av资源在线| 亚洲男人的天堂在线观看| 欧美日韩免费一区二区三区| 日日夜夜精品免费视频| 精品第一国产综合精品aⅴ| 国产精品一区在线观看乱码 | 亚洲综合一区二区精品导航| 欧美亚洲一区二区三区四区| 午夜精品久久久久久久久| 日韩三区在线观看| 国产成人av资源| 亚洲人成在线播放网站岛国| 欧美日韩免费电影| 国产剧情一区在线| 亚洲视频在线观看一区| 9191精品国产综合久久久久久| 九九精品视频在线看| 国产精品二区一区二区aⅴ污介绍| 欧洲国内综合视频| 激情深爱一区二区| 亚洲欧美激情一区二区| 91精品国产全国免费观看| 国产mv日韩mv欧美| 亚洲综合区在线| 久久综合久久综合久久综合| 99re在线精品| 蜜臀久久久久久久| 国产精品麻豆视频| 欧美日韩你懂得| 国产91富婆露脸刺激对白| 一区二区三区电影在线播| 亚洲精品一区二区三区福利| 91在线视频在线| 国产综合色产在线精品| 亚洲最色的网站| 国产亚洲成aⅴ人片在线观看| 欧美午夜一区二区三区免费大片| 狠狠色2019综合网| 亚洲国产精品一区二区久久恐怖片| 久久亚洲影视婷婷| 欧美精品xxxxbbbb| 精品成人一区二区三区| 91老师国产黑色丝袜在线| 另类人妖一区二区av| 亚洲综合清纯丝袜自拍| 国产日产欧美一区二区三区| 欧美二区三区的天堂| 91视频在线观看免费| 国产精品一区二区久久精品爱涩 | 国产清纯在线一区二区www| 欧美精品第1页| 在线一区二区视频|