commit 2025-08-31 01:34 refine class ZtCMoveObj in ZCppMain/ZtCStringEx.H

This commit is contained in:
2025-08-31 13:35:05 +09:00
parent a57179f7bb
commit b5a6a5c944
4 changed files with 501 additions and 271 deletions

View File

@ -345,7 +345,7 @@ namespace ZNsMain
{
/* VP_CSearchInfo=&ARR_InfoList.AddTailDefault()->GetData();
위 코드처럼 하면 ARR_InfoList 를 일반화 하기가 어렵다. */
위 코드처럼 하면 ARR_InfoList 를 일반화하기가 어렵다. */
VP_CSearchInfo= &(ZCSearchInfo&)ARR_InfoList;
VP_CSearchInfo->mp_Char= VP_Origin+i ;
@ -1679,7 +1679,7 @@ namespace ZNsMain
}
else if(AL_ReplaceLen<AL_SearchLen)
{
VL_Index=VO_CSearchInfoList.GetHeadData().ml_Pos;
VL_Index = VO_CSearchInfoList.GetHeadData().ml_Pos;
for(TypeLength i=1; i<=VL_InfoEntrySize; ++i)
{
@ -8314,9 +8314,94 @@ namespace ZNsMain
#if (_CODE_OLD_)
template ////////////////////////////////////////////////////////////
<
template<typename, typename, typename, typename>
class ZtCStringBase,
typename TTypCh , typename TAlloc,
typename TAllocSize, typename TTypeString
>
class ZtCMoveObj /*################################################*/
<
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString> ,
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString>&, true
>
/////////////////////////////////////////////////////////////////////
{
public:
typedef ZtCStringBase
<TTypCh, TAlloc, TAllocSize, TTypeString> ZCStringBase;
public:
enum {ZEUseMoveObj = 1};
public:
static void Exec(ZCStringBase& AR_TypeArg1, ZCStringBase& AR_TypeArg2)
{
AR_TypeArg1.Fetch(AR_TypeArg2) ;
}/*
static void Exec(ZCStringBase& AR_TypeArg1, ZCStringBase& AR_TypeArg2)*/
public:
};/*
class ZtCMoveObj ##################################################*/
#endif //_CODE_OLD_
#if (_CODE_NEW_)
template
<
typename TTypCh , typename TAlloc,
typename TAllocSize, typename TTypeString
>
class ZtCMoveObj /*################################################*/
<
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString> ,
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString>&, true
>
/////////////////////////////////////////////////////////////////////
{
public:
typedef ZtCStringBase
<TTypCh, TAlloc, TAllocSize, TTypeString> ZCStringBase;
public:
enum {ZEUseMoveObj = 1};
public:
static void Exec(ZCStringBase& AR_TypeArg1, ZCStringBase& AR_TypeArg2)
{
AR_TypeArg1.Fetch(AR_TypeArg2) ;
}/*
static void Exec(ZCStringBase& AR_TypeArg1, ZCStringBase& AR_TypeArg2)*/
public:
};/*
template
<
typename TTypCh , typename TAlloc,
typename TAllocSize, typename TTypeString
>
class ZtCMoveObj /*##################################################
<
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString> ,
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString>&, true
>
///////////////////////////////////////////////////////////////////*/
#endif //_CODE_NEW_
namespace ZNsFunc
{
#if (_CODE_OLD_)
template //////////////////////////////////////////////////////////////////
<
typename TTypCh , typename TAlloc,
@ -8345,9 +8430,49 @@ namespace ZNsMain
>
void ZftMoveFast ////////////////////////////////////////////////////////*/
#endif //_CODE_OLD_
#if (_CODE_BAD_)
template //////////////////////////////////////////////////////////////////
<
template<typename, typename, typename, typename>
class ZtCStringBase,
typename TTypCh , typename TAlloc,
typename TAllocSize, typename TTypeString
>
void ZftMoveFast //////////////////////////////////////////////////////////
(
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString>& AR_CString1,
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString>& AR_CString2,
)
{
#ifdef _DEBUG_FAST_MOVE_OBJ_
cout<<" ▶▶ ZftMoveFast(ZCString&, ZCString&) Start!"<<endl;
#endif //_DEBUG_FAST_MOVE_OBJ_
AR_CString1.Fetch(AR_CString2);
#ifdef _DEBUG_FAST_MOVE_OBJ_
cout<<" ▶▶ ZftMoveFast(ZCString&, ZCString&) Close!"<<endl;
#endif //_DEBUG_FAST_MOVE_OBJ_
}/*
template //////////////////////////////////////////////////////////////////
<
typename TTypCh , typename TAlloc,
typename TAllocSize, typename TTypeString
>
void ZftMoveFast ////////////////////////////////////////////////////////*/
#endif //_CODE_BAD_
}/*
namespace ZNsFunc*/
}/*
namespace ZNsMain */