commit 2025-09-03 13:56 edit ZCChars::Init() in ZCppMain/ZtCMainChars.H
This commit is contained in:
@ -2966,10 +2966,13 @@ namespace ZNsMain
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////*/
|
//////////////////////////////////////////////////////////////////*/
|
||||||
|
|
||||||
template<typename TType> class ZtCObjPtr
|
template
|
||||||
|
<typename TType, typename TTypeArg=const TType&>
|
||||||
|
class ZtCObjPtr
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
typedef TType TypeData ;
|
typedef TType TypeData ;
|
||||||
|
typedef TTypeArg TypeArg ;
|
||||||
protected:
|
protected:
|
||||||
TypeData& mr_TypeData;
|
TypeData& mr_TypeData;
|
||||||
public :
|
public :
|
||||||
@ -2980,6 +2983,20 @@ namespace ZNsMain
|
|||||||
TypeData& operator* (){return mr_TypeData;}
|
TypeData& operator* (){return mr_TypeData;}
|
||||||
operator TypeData& (){return mr_TypeData;}
|
operator TypeData& (){return mr_TypeData;}
|
||||||
|
|
||||||
|
ZtCObjPtr& operator=(const ZtCObjPtr& rhs)
|
||||||
|
{
|
||||||
|
if(this==&rhs) return *this;
|
||||||
|
|
||||||
|
mr_TypeData = rhs.mr_TypeData; return *this;
|
||||||
|
}/*
|
||||||
|
ZtCObjPtr& operator=(const ZtCObjPtr& rhs)*/
|
||||||
|
|
||||||
|
ZtCObjPtr& operator=(TTypeArg AO_ArguData)
|
||||||
|
{
|
||||||
|
mr_TypeData = AO_ArguData; return *this;
|
||||||
|
}/*
|
||||||
|
ZtCObjPtr& operator=(TTypeArg AO_ArguData)*/
|
||||||
|
|
||||||
public :
|
public :
|
||||||
};/*
|
};/*
|
||||||
template<typename TType> class ZtCObjPtr */
|
template<typename TType> class ZtCObjPtr */
|
||||||
|
@ -278,13 +278,29 @@ namespace ZNsMain
|
|||||||
}/*
|
}/*
|
||||||
ZCChars(TypeCharC* APC_TypeChar, TypeLength AL_Length)*/
|
ZCChars(TypeCharC* APC_TypeChar, TypeLength AL_Length)*/
|
||||||
|
|
||||||
void Init(TypeCharC* APC_TypeChar=0, TypeLength AL_Length=0)
|
|
||||||
|
void Init()
|
||||||
|
{
|
||||||
|
mp_TypeChar = 0;
|
||||||
|
ml_TypeLength= 0;
|
||||||
|
}/*
|
||||||
|
void Init()*/
|
||||||
|
|
||||||
|
void Init(TypeCharC* APC_TypeChar)
|
||||||
|
{
|
||||||
|
mp_TypeChar = const_cast<TypeChar*> (APC_TypeChar);
|
||||||
|
ml_TypeLength= ZtCTypeChars::GetLength(mp_TypeChar );
|
||||||
|
}/*
|
||||||
|
void Init(TypeCharC* APC_TypeChar)*/
|
||||||
|
|
||||||
|
void Init(TypeCharC* APC_TypeChar, TypeLength AL_Length)
|
||||||
{
|
{
|
||||||
mp_TypeChar =const_cast
|
mp_TypeChar =const_cast
|
||||||
<TypeChar*>(APC_TypeChar) ;
|
<TypeChar*>(APC_TypeChar) ;
|
||||||
ml_TypeLength=AL_Length ;
|
ml_TypeLength=AL_Length ;
|
||||||
}/*
|
}/*
|
||||||
void Init(TypeCharC* APC_TypeChar=0, TypeLength AL_Length=0)*/
|
void Init(TypeCharC* APC_TypeChar, TypeLength AL_Length)*/
|
||||||
|
|
||||||
|
|
||||||
void InitData(TypeCharC* APC_TypeChar)
|
void InitData(TypeCharC* APC_TypeChar)
|
||||||
{
|
{
|
||||||
@ -298,23 +314,9 @@ namespace ZNsMain
|
|||||||
}/*
|
}/*
|
||||||
void InitLength(TypeLength AL_Length)*/
|
void InitLength(TypeLength AL_Length)*/
|
||||||
|
|
||||||
TypeChar* data()
|
TypeChar* data() {return mp_TypeChar ;}
|
||||||
{
|
TypeCharC* data() const{return mp_TypeChar ;}
|
||||||
return mp_TypeChar;
|
TypeLength size() const{return ml_TypeLength;}
|
||||||
}/*
|
|
||||||
TypeChar* data()*/
|
|
||||||
|
|
||||||
TypeCharC* data() const
|
|
||||||
{
|
|
||||||
return mp_TypeChar;
|
|
||||||
}/*
|
|
||||||
TypeCharC* data() const*/
|
|
||||||
|
|
||||||
TypeLength size() const
|
|
||||||
{
|
|
||||||
return ml_TypeLength;
|
|
||||||
}/*
|
|
||||||
TypeLength size() const*/
|
|
||||||
|
|
||||||
ZCChars& operator+=(TypeLength AI_MovePos)
|
ZCChars& operator+=(TypeLength AI_MovePos)
|
||||||
{
|
{
|
||||||
|
@ -30,12 +30,12 @@ namespace ZNsMain
|
|||||||
|
|
||||||
|
|
||||||
template< typename TType ,
|
template< typename TType ,
|
||||||
typename TTypCArg = const TType&,
|
typename TTypArgu = const TType&,
|
||||||
typename TTypCAlloc = ZCAllocator ,
|
typename TTypCAlloc = ZCAllocator ,
|
||||||
typename TTypCInit = ZCInit ,
|
typename TTypCInit = ZCInit ,
|
||||||
typename TTypSize = ZTypLong ,
|
typename TTypSize = ZTypLong ,
|
||||||
typename TMoveObj = ZNsMain::
|
typename TMoveObj = ZNsMain::
|
||||||
ZtCMoveObj<TType, TTypCArg, true>
|
ZtCMoveObj<TType, TTypArgu, true>
|
||||||
>
|
>
|
||||||
class ZtCObjList //////////////////////////////
|
class ZtCObjList //////////////////////////////
|
||||||
{
|
{
|
||||||
@ -44,7 +44,7 @@ namespace ZNsMain
|
|||||||
public:
|
public:
|
||||||
typedef TType Type ;
|
typedef TType Type ;
|
||||||
typedef TType TypeData ;
|
typedef TType TypeData ;
|
||||||
typedef TTypCArg TypeArg ;
|
typedef TTypArgu TypeArg ;
|
||||||
typedef TTypCAlloc TypeAlloc ;
|
typedef TTypCAlloc TypeAlloc ;
|
||||||
//typedef TTypCInit TypeInit ;
|
//typedef TTypCInit TypeInit ;
|
||||||
typedef TTypSize TypeSize ;
|
typedef TTypSize TypeSize ;
|
||||||
@ -2160,7 +2160,7 @@ namespace ZNsMain
|
|||||||
public:
|
public:
|
||||||
};/*
|
};/*
|
||||||
template< typename TType ,
|
template< typename TType ,
|
||||||
typename TTypCArg = const TType&,
|
typename TTypArgu = const TType&,
|
||||||
typename TTypCAlloc = ZCAllocator ,
|
typename TTypCAlloc = ZCAllocator ,
|
||||||
typename TTypCInit = ZCInit ,
|
typename TTypCInit = ZCInit ,
|
||||||
typename TTypSize = ZTypLong ,
|
typename TTypSize = ZTypLong ,
|
||||||
|
Reference in New Issue
Block a user