commit 2025-10-03 23:48 add capacity() & size_free() in ZtCBaseList : ZCppMain/ZMainHead.H
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
|
||||
■ unsigned 정수형은 가급적이면 쓰지 말자. 일반적으로 많이 쓰는 signed 정수와의 호환이
|
||||
'약간' 거슬리고 있는데, 이 '약간' 이라도 왠지 찝찝하다. 2008-09-14 03:24:00
|
||||
|
||||
■ 해당 namespace 에서 필요한 상수는 그 namespace 안에서 상수전용 namespace ZNsConst 를
|
||||
만들고 그 안에 둔다.
|
||||
|
||||
@ -4111,12 +4112,6 @@ namespace ZNsMain
|
||||
}/*
|
||||
_NP_ TypeSize size() const*/
|
||||
|
||||
_NP_ TypeSize capacity() const
|
||||
{
|
||||
return GetAllHeapSize();
|
||||
}/*
|
||||
_NP_ TypeSize capacity() const*/
|
||||
|
||||
public:
|
||||
};/*
|
||||
template<typename TLinkList> class ZtCBody*/
|
||||
@ -4283,31 +4278,14 @@ namespace ZNsMain
|
||||
}/*
|
||||
_NP_ TypeSize GetUseHeapSize() const*/
|
||||
|
||||
_NP_ TypeSize GetAllHeapSize() const
|
||||
{
|
||||
return 0;
|
||||
}/*
|
||||
_NP_ TypeSize GetAllHeapSize() const*/
|
||||
|
||||
|
||||
_NP_ TypeSize size() const
|
||||
{
|
||||
return GetUseHeapSize();
|
||||
}/*
|
||||
_NP_ TypeSize GetHeapSize() const*/
|
||||
|
||||
_NP_ TypeSize capacity() const
|
||||
{
|
||||
return GetAllHeapSize();
|
||||
}/*
|
||||
_NP_ TypeSize capacity() const*/
|
||||
|
||||
|
||||
_NP_ void ChangeCapacity(TypeSize AI_AddCut)
|
||||
{
|
||||
}/*
|
||||
_NP_ void ChangeCapacity(TypeSize AI_AddCut)*/
|
||||
_NP_ TypeSize size() const*/
|
||||
|
||||
public:
|
||||
};/*
|
||||
template<typename TSnglList> class ZtCBody*/
|
||||
|
||||
@ -4435,31 +4413,13 @@ namespace ZNsMain
|
||||
}/*
|
||||
_NP_ TypeSize GetUseHeapSize() const*/
|
||||
|
||||
_NP_ TypeSize GetAllHeapSize() const
|
||||
{
|
||||
return 0;
|
||||
}/*
|
||||
_NP_ TypeSize GetAllHeapSize() const*/
|
||||
|
||||
|
||||
_NP_ TypeSize size() const
|
||||
{
|
||||
return GetUseHeapSize();
|
||||
}/*
|
||||
TypeSize size() const*/
|
||||
|
||||
_NP_ TypeSize capacity() const
|
||||
{
|
||||
return GetAllHeapSize();
|
||||
}/*
|
||||
_NP_ TypeSize capacity() const*/
|
||||
|
||||
|
||||
_NP_ void ChangeCapacity(TypeSize AI_AddCut)
|
||||
{
|
||||
}/*
|
||||
_NP_ void ChangeCapacity(TypeSize AI_AddCut)*/
|
||||
|
||||
public:
|
||||
};/*
|
||||
template<typename TLinkList> class ZtCBody*/
|
||||
|
||||
@ -5800,9 +5760,9 @@ namespace ZNsMain
|
||||
|
||||
|
||||
TypeData& AddHead()
|
||||
{ return AddHeadLink(SendFreeOut())->mo_DataObjt; }
|
||||
{ return **AddHeadLink(SendFreeOut()); }
|
||||
TypeData& AddTail()
|
||||
{ return AddTailLink(SendFreeOut())->mo_DataObjt; }
|
||||
{ return **AddTailLink(SendFreeOut()); }
|
||||
|
||||
|
||||
TypeData& AddHead(TypeArg AO_ArgData) /*########################*/
|
||||
@ -6087,6 +6047,15 @@ namespace ZNsMain
|
||||
TypeSize size() const{ return ml_LinkSize; }
|
||||
TypeSize GetSize() const{ return ml_LinkSize; }
|
||||
|
||||
_VT_ TypeSize capacity ()
|
||||
{ if(TTypeCRTP::ZEUseCRTP<1) return 0;
|
||||
return GetChildObj().capacity ();
|
||||
}
|
||||
_VT_ TypeSize size_free()
|
||||
{ if(TTypeCRTP::ZEUseCRTP<1) return 0;
|
||||
return GetChildObj().size_free();
|
||||
}
|
||||
|
||||
|
||||
void push_front(TypeArg AO_ArgData){AddHead(AO_ArgData);}
|
||||
void push_back (TypeArg AO_ArgData){AddTail(AO_ArgData);}
|
||||
|
@ -1413,10 +1413,14 @@ namespace ZNsMain
|
||||
|
||||
TypeSize GetSize () const{return ml_LinkSize;}
|
||||
TypeSize size () const{return ml_LinkSize;}
|
||||
TypeSize capacity() const{return size()+mo_FreeObjt.size();}
|
||||
|
||||
TypeSize capacity() const
|
||||
{ return size()+mo_FreeObjt.size(); }
|
||||
|
||||
TypeSize GetFreeSize() const
|
||||
{ return mo_FreeObjt.size(); }
|
||||
TypeSize size_free () const
|
||||
{ return mo_FreeObjt.size(); }
|
||||
|
||||
|
||||
ZCLink* GetHeadLinkPtr(){return mp_HeadLink;}
|
||||
|
@ -2055,28 +2055,17 @@ namespace ZNsMain
|
||||
|
||||
|
||||
inline TTypSize GetSize() const
|
||||
{
|
||||
return ml_LinkSize;
|
||||
}/*
|
||||
inline TTypSize GetSize() const*/
|
||||
|
||||
inline TTypSize size() const
|
||||
{
|
||||
return ml_LinkSize;
|
||||
}/*
|
||||
inline TTypSize size() const*/
|
||||
{ return ml_LinkSize; }
|
||||
inline TTypSize size () const
|
||||
{ return ml_LinkSize; }
|
||||
|
||||
inline TTypSize capacity() const
|
||||
{
|
||||
return size()+mo_FreeObjt.size();
|
||||
}/*
|
||||
inline TTypSize capacity() const*/
|
||||
{ return size()+mo_FreeObjt.size(); }
|
||||
|
||||
inline TypeSize GetFreeSize() const
|
||||
{
|
||||
return mo_FreeObjt.size();
|
||||
}/*
|
||||
inline TypeSize GetFreeSize() const*/
|
||||
{ return mo_FreeObjt.size(); }
|
||||
inline TypeSize size_free () const
|
||||
{ return mo_FreeObjt.size(); }
|
||||
|
||||
|
||||
inline bool IsEmpty() const
|
||||
|
Reference in New Issue
Block a user