commit 2025-09-24 11:20 add ZtCFreeHeapSngl<>::MakeEqual() in ZCppMain/ZtCObjList.H and ZtCSimList.H
This commit is contained in:
@ -3847,6 +3847,12 @@ namespace ZNsMain
|
|||||||
void DeleteHeap(){}
|
void DeleteHeap(){}
|
||||||
|
|
||||||
|
|
||||||
|
void MakeEuqal(ZtCBody& rhs)
|
||||||
|
{
|
||||||
|
}/*
|
||||||
|
void MakeEuqal(ZtCBody& rhs)*/
|
||||||
|
|
||||||
|
|
||||||
TypeSize GetUseHeapSize() const
|
TypeSize GetUseHeapSize() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -4025,6 +4031,12 @@ namespace ZNsMain
|
|||||||
void DeleteHeap(){}
|
void DeleteHeap(){}
|
||||||
|
|
||||||
|
|
||||||
|
void MakeEuqal(ZtCBody& rhs)
|
||||||
|
{
|
||||||
|
}/*
|
||||||
|
void MakeEuqal(ZtCBody& rhs)*/
|
||||||
|
|
||||||
|
|
||||||
TypeSize GetUseHeapSize() const
|
TypeSize GetUseHeapSize() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -4165,6 +4177,12 @@ namespace ZNsMain
|
|||||||
void DeleteHeap(){}
|
void DeleteHeap(){}
|
||||||
|
|
||||||
|
|
||||||
|
void MakeEuqal(ZtCBody& rhs)
|
||||||
|
{
|
||||||
|
}/*
|
||||||
|
void MakeEuqal(ZtCBody& rhs)*/
|
||||||
|
|
||||||
|
|
||||||
TypeSize GetUseHeapSize() const
|
TypeSize GetUseHeapSize() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -730,6 +730,19 @@ namespace ZNsMain
|
|||||||
TypeSize Fetch(ZtCBody& rhs, TypeSize AI_FetchSize)*/
|
TypeSize Fetch(ZtCBody& rhs, TypeSize AI_FetchSize)*/
|
||||||
|
|
||||||
|
|
||||||
|
void MakeEqual(ZtCBody& rhs)
|
||||||
|
{
|
||||||
|
// 갯수만 맞춘다.
|
||||||
|
|
||||||
|
if(this==&rhs) return;
|
||||||
|
|
||||||
|
if(this->size() > rhs.size())
|
||||||
|
DeleteHeap( this->size() - rhs. size() );
|
||||||
|
else AddHeap ( rhs. size() - this->size() );
|
||||||
|
}/*
|
||||||
|
void MakeEqual(ZtCBody& rhs)*/
|
||||||
|
|
||||||
|
|
||||||
TypeSize GetUseHeapSize() const
|
TypeSize GetUseHeapSize() const
|
||||||
{
|
{
|
||||||
return ml_UseSize;
|
return ml_UseSize;
|
||||||
|
@ -723,6 +723,7 @@ namespace ZNsMain
|
|||||||
this->ml_AllSize += AI_FetchSize ;
|
this->ml_AllSize += AI_FetchSize ;
|
||||||
this->ml_UseSize += AI_FetchSize ;
|
this->ml_UseSize += AI_FetchSize ;
|
||||||
this->mp_NoUseTail = VP_RhsCutTail;
|
this->mp_NoUseTail = VP_RhsCutTail;
|
||||||
|
|
||||||
rhs. ml_AllSize -= AI_FetchSize ;
|
rhs. ml_AllSize -= AI_FetchSize ;
|
||||||
rhs. ml_UseSize -= AI_FetchSize ;
|
rhs. ml_UseSize -= AI_FetchSize ;
|
||||||
rhs. mp_NoUseHead = VP_RhsNewHead;
|
rhs. mp_NoUseHead = VP_RhsNewHead;
|
||||||
@ -732,6 +733,19 @@ namespace ZNsMain
|
|||||||
TypeSize Fetch(ZtCBody& rhs, TypeSize AI_FetchSize)*/
|
TypeSize Fetch(ZtCBody& rhs, TypeSize AI_FetchSize)*/
|
||||||
|
|
||||||
|
|
||||||
|
void MakeEqual(ZtCBody& rhs)
|
||||||
|
{
|
||||||
|
// 갯수만 맞춘다.
|
||||||
|
|
||||||
|
if(this==&rhs) return;
|
||||||
|
|
||||||
|
if(this->size() > rhs.size())
|
||||||
|
DeleteHeap( this->size() - rhs. size() );
|
||||||
|
else AddHeap ( rhs. size() - this->size() );
|
||||||
|
}/*
|
||||||
|
void MakeEqual(ZtCBody& rhs)*/
|
||||||
|
|
||||||
|
|
||||||
TypeSize GetUseHeapSize() const
|
TypeSize GetUseHeapSize() const
|
||||||
{
|
{
|
||||||
return ml_UseSize;
|
return ml_UseSize;
|
||||||
|
@ -197,6 +197,18 @@ namespace ZNsMain
|
|||||||
cout<<"# list10 capacity : " <<VO_ListOfStr10.capacity ()<<endl;
|
cout<<"# list10 capacity : " <<VO_ListOfStr10.capacity ()<<endl;
|
||||||
cout<<"# list11 capacity : " <<VO_ListOfStr11.capacity ()<<endl;
|
cout<<"# list11 capacity : " <<VO_ListOfStr11.capacity ()<<endl;
|
||||||
|
|
||||||
|
VO_ListOfStr11.GetCFreeHeap().AddHeap(2);
|
||||||
|
VO_ListOfStr10.GetCFreeHeap().MakeEqual( VO_ListOfStr11.GetCFreeHeap() );
|
||||||
|
|
||||||
|
cout<<"# After adding free 2 in list11 and MakeEqual() : list10 and list11"<<endl;
|
||||||
|
|
||||||
|
cout<<"# list10 size : " <<VO_ListOfStr10.size ()<<endl;
|
||||||
|
cout<<"# list11 size : " <<VO_ListOfStr11.size ()<<endl;
|
||||||
|
cout<<"# list10 free size: " <<VO_ListOfStr10.GetFreeSize ()<<endl;
|
||||||
|
cout<<"# list11 free size: " <<VO_ListOfStr11.GetFreeSize ()<<endl;
|
||||||
|
cout<<"# list10 capacity : " <<VO_ListOfStr10.capacity ()<<endl;
|
||||||
|
cout<<"# list11 capacity : " <<VO_ListOfStr11.capacity ()<<endl;
|
||||||
|
|
||||||
cout<<"# list11 IterElement ####" <<endl;
|
cout<<"# list11 IterElement ####" <<endl;
|
||||||
{
|
{
|
||||||
VO_ListOfStr11.IterElement(&ShowDataInNode);
|
VO_ListOfStr11.IterElement(&ShowDataInNode);
|
||||||
|
Reference in New Issue
Block a user