From 4c4ca8645ea1605279fdd31fe246f29b5ee13f11 Mon Sep 17 00:00:00 2001 From: sauron Date: Sat, 4 Oct 2025 22:55:41 +0900 Subject: [PATCH] commit 2025-10-04 22:55 is writing ZCppMain/ZtCLinkList.H --- ZCppMain/ZCProcess.H | 12 +- ZCppMain/ZMainHead.H | 2 +- ZCppMain/ZtCLinkList.H | 313 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 320 insertions(+), 7 deletions(-) create mode 100644 ZCppMain/ZtCLinkList.H diff --git a/ZCppMain/ZCProcess.H b/ZCppMain/ZCProcess.H index b48b732..2682b19 100644 --- a/ZCppMain/ZCProcess.H +++ b/ZCppMain/ZCProcess.H @@ -1191,23 +1191,23 @@ namespace ZNsMain bool mb_WaitCond; public : - ZtCMutexCondDataVar() + ZtCMutexCondVar() { mb_WaitCond= false; }/* - ZtCMutexCondDataVar()*/ + ZtCMutexCondVar()*/ - ZtCMutexCondDataVar(const ZtCMutexCondDataVar& rhs) + ZtCMutexCondVar(const ZtCMutexCondVar& rhs) { mb_WaitCond= false; }/* - ZtCMutexCondDataVar(const ZtCMutexCondDataVar& rhs)*/ + ZtCMutexCondVar(const ZtCMutexCondVar& rhs)*/ - ZtCMutexCondDataVar& operator=(const ZtCMutexCondDataVar& rhs) + ZtCMutexCondVar& operator=(const ZtCMutexCondVar& rhs) { return *this; // nothing to do. }/* - ZtCMutexCondDataVar& operator=(const ZtCMutexCondDataVar& rhs)*/ + ZtCMutexCondVar& operator=(const ZtCMutexCondVar& rhs)*/ _SY_ bool WaitCondOnExec() diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index 0ea1a7f..755b753 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -4405,7 +4405,7 @@ namespace ZNsMain { return GetUseHeapSize(); }/* - TypeSize size() const*/ + _NP_ TypeSize size() const*/ public: };/* diff --git a/ZCppMain/ZtCLinkList.H b/ZCppMain/ZtCLinkList.H new file mode 100644 index 0000000..a786b42 --- /dev/null +++ b/ZCppMain/ZtCLinkList.H @@ -0,0 +1,313 @@ + + +#ifndef __ZCPPMAIN__ZMAINHEAD_H__ +#define __ZCPPMAIN__ZMAINHEAD_H__ + + +#include "ZCppMain/ZMainHead.H" + + +namespace ZNsMain +{ + + template + + class ZtCLinkList; + + + template + + class ZtCLink : public TTypBase + { + public : + template + + friend class ZtCLinkList; + public : + typedef ZtCLink TypeThis ; + typedef TTypBase TypeBase ; + typedef TChild TypeChild; + protected: + ZtCLink* mp_NextLink; + ZtCLink* mp_PrevLink; + protected: + + ZtCLink* GetNextLinkPtr(){return mp_NextLink;} + ZtCLink* GetPrevLinkPtr(){return mp_PrevLink;} + + void JoinLink(ZtCLink* AP_PrevLink, ZtCLink* AP_NextLink) + { + AP_PrevLink->mp_NextLink=AP_NextLink; + AP_NextLink->mp_PrevLink=AP_PrevLink; + }/* + void JoinLink(ZtCLink* AP_PrevLink, ZtCLink* AP_NextLink)*/ + + void MakeRing(ZtCLink* AP_HeadLink, ZtCLink* AP_TailLink) + { + AP_HeadLink->mp_PrevLink=AP_TailLink; + AP_TailLink->mp_NextLink=AP_HeadLink; + }/* + void MakeRing(ZtCLink* AP_HeadLink, ZtCLink* AP_TailLink)*/ + + /*protected:*/ + public : + + ZtCLink() + { + mp_NextLink=0; + mp_PrevLink=0; + }/* + ZtCLink()*/ + + ZtCLink(const ZtCLink& rhs) + { + mp_NextLink=0; + mp_PrevLink=0; + + *(TypeBase*)(this) = rhs ; + }/* + ZtCLink(const ZtCLink& rhs)*/ + + ZtCLink& operator=(const ZtCLink& rhs) + { + static_cast(*this) = + static_cast( rhs ) ; + + return *this; + }/* + ZtCLink& operator=(const ZtCLink& rhs)*/ + + public : + };/* + template + + class ZtCLink : public TTypBase + */ + + template + class ZtCLink : public TTypBase + { + public : + template + + friend class ZtCLinkList; + public : + typedef ZtCLink TypeThis ; + typedef TTypBase /*+++++++++++++*/ TypeBase ; + typedef ZCEmpty /*+++++++++++++*/ TypeChild; + protected: + ZtCLink* mp_NextLink; + ZtCLink* mp_PrevLink; + public : + + ZtCLink* GetNextLinkPtr(){return mp_NextLink;} + ZtCLink* GetPrevLinkPtr(){return mp_PrevLink;} + + void JoinLink(ZtCLink* AP_PrevLink, ZtCLink* AP_NextLink) + { + AP_PrevLink->mp_NextLink=AP_NextLink; + AP_NextLink->mp_PrevLink=AP_PrevLink; + }/* + void JoinLink(ZtCLink* AP_PrevLink, ZtCLink* AP_NextLink)*/ + + void MakeRing(ZtCLink* AP_HeadLink, ZtCLink* AP_TailLink) + { + AP_HeadLink->mp_PrevLink=AP_TailLink; + AP_TailLink->mp_NextLink=AP_HeadLink; + }/* + void MakeRing(ZtCLink* AP_HeadLink, ZtCLink* AP_TailLink)*/ + + /*protected:*/ + public : + + ZtCLink() + { + mp_NextLink=0; + mp_PrevLink=0; + }/* + ZtCLink()*/ + + ZtCLink(const TypeThis& rhs) + { + mp_NextLink=0; + mp_PrevLink=0; + + *(TypeBase*)(this) = rhs ; + }/* + ZtCLink(const TypeThis& rhs)*/ + + TypeThis& operator=(const TypeThis& rhs) + { + static_cast(*this) = + static_cast( rhs ) ; + + return *this; + }/* + TypeThis& operator=(const TypeThis& rhs)*/ + + public : + };/* + template + class ZtCLink : public TTypBase*/ + + + template class ZtCLink + { + public : + template + + friend class ZtCLinkList; + public : + typedef ZtCLink TypeThis ; + typedef ZCEmpty /*++++++++++++*/ TypeBase ; + typedef TChild /*++++++++++++*/ TypeChild; + protected: + ZtCLink* mp_NextLink; + ZtCLink* mp_PrevLink; + protected: + + ZtCLink* GetNextLinkPtr(){return mp_NextLink;} + ZtCLink* GetPrevLinkPtr(){return mp_PrevLink;} + + void JoinLink(ZtCLink* AP_PrevLink, ZtCLink* AP_NextLink) + { + AP_PrevLink->mp_NextLink=AP_NextLink; + AP_NextLink->mp_PrevLink=AP_PrevLink; + }/* + void JoinLink(ZtCLink* AP_PrevLink, ZtCLink* AP_NextLink)*/ + + void MakeRing(ZtCLink* AP_HeadLink, ZtCLink* AP_TailLink) + { + AP_HeadLink->mp_PrevLink=AP_TailLink; + AP_TailLink->mp_NextLink=AP_HeadLink; + }/* + void MakeRing(ZtCLink* AP_HeadLink, ZtCLink* AP_TailLink)*/ + + /*protected:*/ + public : + + ZtCLink() + { + mp_NextLink=0; + mp_PrevLink=0; + }/* + ZtCLink()*/ + + ZtCLink(const TypeThis& rhs) + { + mp_NextLink=0; + mp_PrevLink=0; + }/* + ZtCLink(const TypeThis& rhs)*/ + + TypeThis& operator=(const TypeThis& rhs) + { + return *this; + }/* + TypeThis& operator=(const TypeThis& rhs)*/ + + public : + };/* + template class ZtCLink*/ + + + template<> class ZtCLink + { + public : + template + + friend class ZtCLinkList; + public : + typedef ZtCLink TypeThis ; + typedef ZCEmpty /*++++++++++++*/ TypeBase ; + typedef ZCEmpty /*++++++++++++*/ TypeChild; + protected: + ZtCLink* mp_NextLink; + ZtCLink* mp_PrevLink; + protected: + + ZtCLink* GetNextLinkPtr(){return mp_NextLink;} + ZtCLink* GetPrevLinkPtr(){return mp_PrevLink;} + + void JoinLink(ZtCLink* AP_PrevLink, ZtCLink* AP_NextLink) + { + AP_PrevLink->mp_NextLink=AP_NextLink; + AP_NextLink->mp_PrevLink=AP_PrevLink; + }/* + void JoinLink(ZtCLink* AP_PrevLink, ZtCLink* AP_NextLink)*/ + + void MakeRing(ZtCLink* AP_HeadLink, ZtCLink* AP_TailLink) + { + AP_HeadLink->mp_PrevLink=AP_TailLink; + AP_TailLink->mp_NextLink=AP_HeadLink; + }/* + void MakeRing(ZtCLink* AP_HeadLink, ZtCLink* AP_TailLink)*/ + + /*protected:*/ + public : + + ZtCLink() + { + mp_NextLink=0; + mp_PrevLink=0; + }/* + ZtCLink()*/ + + ZtCLink(const TypeThis& rhs) + { + mp_NextLink=0; + mp_PrevLink=0; + }/* + ZtCLink(const TypeThis& rhs)*/ + + TypeThis& operator=(const TypeThis& rhs) + { + return *this; + }/* + TypeThis& operator=(const TypeThis& rhs)*/ + + public : + };/* + template<> class ZtCLink*/ + + + + template + + class ZtCLinkList + { + public : + typedef TCLink ZCLink ; + typedef TCLink TypeData; + typedef TTypSize TypeSize; + private: + ZCLink* mp_HeadLink; + ZCLink* mp_TailLink; + TypeSize ml_LinkSize; + private: + + public : + + ZtCLinkList() + { + mp_HeadLink=0; + mp_TailLink=0; + ml_LinkSize=0; + }/* + ZtCLinkList()*/ + + + // is adding codes + + + public : + };/* + template + + class ZtCLinkList*/ + +}/* +namespace ZNsMain*/ + + +#endif //__ZCPPMAIN__ZMAINHEAD_H__