⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rm_jclwidestrings.hpp

📁 这是一个功能强大
💻 HPP
字号:
// CodeGear C++Builder
// Copyright (c) 1995, 2007 by CodeGear
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Rm_jclwidestrings.pas' rev: 11.00

#ifndef Rm_jclwidestringsHPP
#define Rm_jclwidestringsHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Rm_jclwidestrings
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TWideFileOptionsType { foAnsiFile, foUnicodeLB };
#pragma option pop

typedef Set<TWideFileOptionsType, foAnsiFile, foUnicodeLB>  TWideFileOptions;

#pragma option push -b-
enum TSearchFlag { sfCaseSensitive, sfIgnoreNonSpacing, sfSpaceCompress, sfWholeWordOnly };
#pragma option pop

typedef Set<TSearchFlag, sfCaseSensitive, sfWholeWordOnly>  TSearchFlags;

class DELPHICLASS TWStringList;
typedef int __fastcall (*TWStringListSortCompare)(TWStringList* List, int Index1, int Index2);

class DELPHICLASS TWStrings;
class PASCALIMPLEMENTATION TWStrings : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
public:
	WideString operator[](int Index) { return Strings[Index]; }
	
private:
	WideChar FDelimiter;
	WideChar FQuoteChar;
	WideChar FNameValueSeparator;
	WideString FLineSeparator;
	int FUpdateCount;
	WideString __fastcall GetCommaText();
	WideString __fastcall GetDelimitedText();
	WideString __fastcall GetName(int Index);
	WideString __fastcall GetValue(const WideString Name);
	void __fastcall ReadData(Classes::TReader* Reader);
	void __fastcall SetCommaText(const WideString Value);
	void __fastcall SetDelimitedText(const WideString Value);
	void __fastcall SetValue(const WideString Name, const WideString Value);
	void __fastcall WriteData(Classes::TWriter* Writer);
	WideString __fastcall GetValueFromIndex(int Index);
	void __fastcall SetValueFromIndex(int Index, const WideString Value);
	
protected:
	virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
	WideString __fastcall ExtractName(const WideString S);
	virtual System::PWideString __fastcall GetP(int Index) = 0 ;
	WideString __fastcall Get(int Index);
	virtual int __fastcall GetCapacity(void);
	virtual int __fastcall GetCount(void) = 0 ;
	virtual System::TObject* __fastcall GetObject(int Index);
	virtual WideString __fastcall GetTextStr();
	virtual void __fastcall Put(int Index, const WideString S) = 0 ;
	virtual void __fastcall PutObject(int Index, System::TObject* AObject) = 0 ;
	virtual void __fastcall SetCapacity(int NewCapacity);
	virtual void __fastcall SetTextStr(const WideString Value);
	virtual void __fastcall SetUpdateState(bool Updating);
	__property int UpdateCount = {read=FUpdateCount, nodefault};
	virtual int __fastcall CompareStrings(const WideString S1, const WideString S2);
	virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
	
public:
	__fastcall TWStrings(void);
	virtual int __fastcall Add(const WideString S);
	virtual int __fastcall AddObject(const WideString S, System::TObject* AObject);
	void __fastcall Append(const WideString S);
	virtual void __fastcall AddStrings(TWStrings* Strings)/* overload */;
	virtual void __fastcall AddStrings(Classes::TStrings* Strings)/* overload */;
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	Classes::TStrings* __fastcall CreateAnsiStringList(void);
	virtual void __fastcall AddStringsTo(Classes::TStrings* Dest);
	void __fastcall BeginUpdate(void);
	virtual void __fastcall Clear(void) = 0 ;
	virtual void __fastcall Delete(int Index) = 0 ;
	void __fastcall EndUpdate(void);
	bool __fastcall Equals(TWStrings* Strings)/* overload */;
	bool __fastcall Equals(Classes::TStrings* Strings)/* overload */;
	virtual void __fastcall Exchange(int Index1, int Index2);
	virtual WideChar * __fastcall GetText(void);
	virtual int __fastcall IndexOf(const WideString S);
	virtual int __fastcall IndexOfName(const WideString Name);
	virtual int __fastcall IndexOfObject(System::TObject* AObject);
	virtual void __fastcall Insert(int Index, const WideString S);
	virtual void __fastcall InsertObject(int Index, const WideString S, System::TObject* AObject);
	virtual void __fastcall LoadFromFile(const AnsiString FileName, TWideFileOptions WideFileOptions = TWideFileOptions() );
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream, TWideFileOptions WideFileOptions = TWideFileOptions() );
	virtual void __fastcall Move(int CurIndex, int NewIndex);
	virtual void __fastcall SaveToFile(const AnsiString FileName, TWideFileOptions WideFileOptions = TWideFileOptions() );
	virtual void __fastcall SaveToStream(Classes::TStream* Stream, TWideFileOptions WideFileOptions = TWideFileOptions() );
	virtual void __fastcall SetText(WideChar * Text);
	WideString __fastcall GetDelimitedTextEx(WideChar ADelimiter, WideChar AQuoteChar);
	void __fastcall SetDelimitedTextEx(WideChar ADelimiter, WideChar AQuoteChar, const WideString Value);
	__property int Capacity = {read=GetCapacity, write=SetCapacity, nodefault};
	__property WideString CommaText = {read=GetCommaText, write=SetCommaText};
	__property int Count = {read=GetCount, nodefault};
	__property WideChar Delimiter = {read=FDelimiter, write=FDelimiter, nodefault};
	__property WideString DelimitedText = {read=GetDelimitedText, write=SetDelimitedText};
	__property WideString Names[int Index] = {read=GetName};
	__property System::TObject* Objects[int Index] = {read=GetObject, write=PutObject};
	__property WideChar QuoteChar = {read=FQuoteChar, write=FQuoteChar, nodefault};
	__property WideString Values[WideString Name] = {read=GetValue, write=SetValue};
	__property WideString ValueFromIndex[int Index] = {read=GetValueFromIndex, write=SetValueFromIndex};
	__property WideChar NameValueSeparator = {read=FNameValueSeparator, write=FNameValueSeparator, nodefault};
	__property WideString LineSeparator = {read=FLineSeparator, write=FLineSeparator};
	__property System::PWideString PStrings[int Index] = {read=GetP};
	__property WideString Strings[int Index] = {read=Get, write=Put/*, default*/};
	__property WideString Text = {read=GetTextStr, write=SetTextStr};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TWStrings(void) { }
	#pragma option pop
	
};


struct TWStringItem;
typedef TWStringItem *PWStringItem;

struct TWStringItem
{
	
public:
	WideString FString;
	System::TObject* FObject;
} ;

class PASCALIMPLEMENTATION TWStringList : public TWStrings 
{
	typedef TWStrings inherited;
	
private:
	Classes::TList* FList;
	bool FSorted;
	Classes::TDuplicates FDuplicates;
	bool FCaseSensitive;
	Classes::TNotifyEvent FOnChange;
	Classes::TNotifyEvent FOnChanging;
	void __fastcall SetSorted(bool Value);
	void __fastcall SetCaseSensitive(const bool Value);
	
protected:
	PWStringItem __fastcall GetItem(int Index);
	virtual void __fastcall Changed(void);
	virtual void __fastcall Changing(void);
	virtual System::PWideString __fastcall GetP(int Index);
	virtual int __fastcall GetCapacity(void);
	virtual int __fastcall GetCount(void);
	virtual System::TObject* __fastcall GetObject(int Index);
	virtual void __fastcall Put(int Index, const WideString Value);
	virtual void __fastcall PutObject(int Index, System::TObject* AObject);
	virtual void __fastcall SetCapacity(int NewCapacity);
	virtual void __fastcall SetUpdateState(bool Updating);
	virtual int __fastcall CompareStrings(const WideString S1, const WideString S2);
	
public:
	__fastcall TWStringList(void);
	__fastcall virtual ~TWStringList(void);
	virtual int __fastcall AddObject(const WideString S, System::TObject* AObject);
	virtual void __fastcall Clear(void);
	virtual void __fastcall Delete(int Index);
	virtual void __fastcall Exchange(int Index1, int Index2);
	virtual bool __fastcall Find(const WideString S, int &Index);
	virtual int __fastcall IndexOf(const WideString S);
	virtual void __fastcall InsertObject(int Index, const WideString S, System::TObject* AObject);
	virtual void __fastcall Sort(void);
	virtual void __fastcall CustomSort(TWStringListSortCompare Compare);
	__property Classes::TDuplicates Duplicates = {read=FDuplicates, write=FDuplicates, nodefault};
	__property bool Sorted = {read=FSorted, write=SetSorted, nodefault};
	__property bool CaseSensitive = {read=FCaseSensitive, write=SetCaseSensitive, nodefault};
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
	__property Classes::TNotifyEvent OnChanging = {read=FOnChanging, write=FOnChanging};
};


typedef TWStringList TWideStringList;
;

typedef TWStrings TWideStrings;
;

//-- var, const, procedure ---------------------------------------------------
static const WideChar WideNull = WideChar(0x0);
static const WideChar WideTabulator = WideChar(0x9);
static const WideChar WideSpace = WideChar(0x20);
static const WideChar WideLF = WideChar(0xa);
static const WideChar WideLineFeed = WideChar(0xa);
static const WideChar WideVerticalTab = WideChar(0xb);
static const WideChar WideFormFeed = WideChar(0xc);
static const WideChar WideCR = WideChar(0xd);
static const WideChar WideCarriageReturn = WideChar(0xd);
extern PACKAGE WideString WideCRLF;
static const WideChar WideLineSeparator = WideChar(0x2028);
static const WideChar WideParagraphSeparator = WideChar(0x2029);
static const WideChar BOM_LSB_FIRST = WideChar(0xfeff);
static const WideChar BOM_MSB_FIRST = WideChar(0xfffe);
extern PACKAGE WideChar __fastcall CharToWideChar(char Ch);
extern PACKAGE char __fastcall WideCharToChar(WideChar Ch);
extern PACKAGE void __fastcall MoveWideChar(const void *Source, void *Dest, int Count);
extern PACKAGE WideChar * __fastcall StrAllocW(unsigned WideSize);
extern PACKAGE WideChar * __fastcall StrNewW(const WideChar * Str)/* overload */;
extern PACKAGE WideChar * __fastcall StrNewW(const WideString Str)/* overload */;
extern PACKAGE void __fastcall StrDisposeW(WideChar * Str);
extern PACKAGE void __fastcall StrDisposeAndNilW(WideChar * &Str);
extern PACKAGE int __fastcall StrLICompW(const WideChar * Str1, const WideChar * Str2, unsigned MaxLen);
extern PACKAGE int __fastcall StrLICompW2(const WideChar * Str1, const WideChar * Str2, unsigned MaxLen);
extern PACKAGE int __fastcall StrCompW(const WideChar * Str1, const WideChar * Str2);
extern PACKAGE int __fastcall StrLCompW(const WideChar * Str1, const WideChar * Str2, unsigned MaxLen);
extern PACKAGE int __fastcall StrICompW(const WideChar * Str1, const WideChar * Str2, unsigned MaxLen);
extern PACKAGE WideChar * __fastcall StrPosW(const WideChar * Str, const WideChar * SubStr);
extern PACKAGE unsigned __fastcall StrLenW(const WideChar * Str);
extern PACKAGE WideChar * __fastcall StrScanW(const WideChar * Str, WideChar Ch)/* overload */;
extern PACKAGE WideChar * __fastcall StrEndW(const WideChar * Str);
extern PACKAGE WideChar * __fastcall StrCopyW(WideChar * Dest, const WideChar * Source);
extern PACKAGE WideChar * __fastcall StrECopyW(WideChar * Dest, const WideChar * Source);
extern PACKAGE WideChar * __fastcall StrLCopyW(WideChar * Dest, const WideChar * Source, unsigned MaxLen);
extern PACKAGE WideChar * __fastcall StrCatW(WideChar * Dest, const WideChar * Source);
extern PACKAGE WideChar * __fastcall StrLCatW(WideChar * Dest, const WideChar * Source, unsigned MaxLen);
extern PACKAGE WideChar * __fastcall StrMoveW(WideChar * Dest, const WideChar * Source, unsigned Count);
extern PACKAGE WideChar * __fastcall StrPCopyWW(WideChar * Dest, const WideString Source);
extern PACKAGE WideChar * __fastcall StrPLCopyWW(WideChar * Dest, const WideString Source, unsigned MaxLen);
extern PACKAGE WideChar * __fastcall StrRScanW(const WideChar * Str, WideChar Chr);
extern PACKAGE void __fastcall StrSwapByteOrder(WideChar * Str);
extern PACKAGE int __fastcall StrNScanW(const WideChar * Str1, const WideChar * Str2);
extern PACKAGE int __fastcall StrRNScanW(const WideChar * Str1, const WideChar * Str2);
extern PACKAGE WideChar * __fastcall StrScanW(WideChar * Str, WideChar Chr, unsigned StrLen)/* overload */;
extern PACKAGE unsigned __fastcall StrBufSizeW(const WideChar * Str);
extern PACKAGE WideChar * __fastcall StrPCopyW(WideChar * Dest, const AnsiString Source);
extern PACKAGE WideChar * __fastcall StrPLCopyW(WideChar * Dest, const AnsiString Source, unsigned MaxLen);
extern PACKAGE int __fastcall WidePos(const WideString SubStr, const WideString S);
extern PACKAGE WideString __fastcall WideQuotedStr(const WideString S, WideChar Quote);
extern PACKAGE WideString __fastcall WideExtractQuotedStr(WideChar * &Src, WideChar Quote);
extern PACKAGE WideString __fastcall TrimW(const WideString S);
extern PACKAGE WideString __fastcall TrimLeftW(const WideString S);
extern PACKAGE WideString __fastcall TrimRightW(const WideString S);
extern PACKAGE int __fastcall TrimLeftLengthW(const WideString S);
extern PACKAGE int __fastcall TrimRightLengthW(const WideString S);

}	/* namespace Rm_jclwidestrings */
using namespace Rm_jclwidestrings;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Rm_jclwidestrings

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -