commit 2025-10-07 22:28 edit a bit ZCppMain/ZtCArray.H
This commit is contained in:
@ -259,44 +259,12 @@ namespace ZNsMain
|
|||||||
|
|
||||||
Type& operator[](TypeSize AL_Index)
|
Type& operator[](TypeSize AL_Index)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AL_Index>=ml_UseSize)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'Type& operator[](TypeSize AL_Index)"<<std::endl;
|
|
||||||
fileout<<" AL_Index>=ml_UseSize"<<", "<<AL_Index<<">="<<ml_UseSize<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
|
|
||||||
::exit(1);
|
|
||||||
}/*
|
|
||||||
if(AL_Index>=ml_UseSize)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return mp_TypeArr[AL_Index] ;
|
return mp_TypeArr[AL_Index] ;
|
||||||
}/*
|
}/*
|
||||||
Type& operator[](TypeSize AL_Index)*/
|
Type& operator[](TypeSize AL_Index)*/
|
||||||
|
|
||||||
const Type& operator[](TypeSize AL_Index) const
|
const Type& operator[](TypeSize AL_Index) const
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AL_Index>=ml_UseSize)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt", std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'const Type& operator[](TypeSize AL_Index) const"<<std::endl;
|
|
||||||
fileout<<" AL_Index>=ml_UseSize"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
|
|
||||||
::exit(1);
|
|
||||||
}/*
|
|
||||||
if(AL_Index>=ml_UseSize)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return mp_TypeArr[AL_Index] ;
|
return mp_TypeArr[AL_Index] ;
|
||||||
}/*
|
}/*
|
||||||
const Type& operator[](TypeSize AL_Index) const*/
|
const Type& operator[](TypeSize AL_Index) const*/
|
||||||
@ -304,44 +272,12 @@ namespace ZNsMain
|
|||||||
|
|
||||||
Type& GetData(TypeSize AL_Index)
|
Type& GetData(TypeSize AL_Index)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AL_Index>=ml_UseSize)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'Type& GetData(TypeSize AL_Index)"<<std::endl;
|
|
||||||
fileout<<" AL_Index>=ml_UseSize"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
|
|
||||||
::exit(1);
|
|
||||||
}/*
|
|
||||||
if(AL_Index>=ml_UseSize)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return mp_TypeArr[AL_Index] ;
|
return mp_TypeArr[AL_Index] ;
|
||||||
}/*
|
}/*
|
||||||
Type& GetData(TypeSize AL_Index)*/
|
Type& GetData(TypeSize AL_Index)*/
|
||||||
|
|
||||||
const Type& GetData(TypeSize AL_Index) const
|
const Type& GetData(TypeSize AL_Index) const
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AL_Index>=ml_UseSize)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'const Type& GetData(TypeSize AL_Index) const"<<std::endl;
|
|
||||||
fileout<<" AL_Index>=ml_UseSize"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
|
|
||||||
::exit(1);
|
|
||||||
}/*
|
|
||||||
if(AL_Index>=ml_UseSize)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return mp_TypeArr[AL_Index];
|
return mp_TypeArr[AL_Index];
|
||||||
}/*
|
}/*
|
||||||
const Type& GetData(TypeSize AL_Index) const*/
|
const Type& GetData(TypeSize AL_Index) const*/
|
||||||
@ -354,8 +290,8 @@ namespace ZNsMain
|
|||||||
for(TypeSize i=ml_UseSize-2; i>=0; --i)
|
for(TypeSize i=ml_UseSize-2; i>=0; --i)
|
||||||
{
|
{
|
||||||
mp_TypeArr[i+1]=mp_TypeArr[i] ;
|
mp_TypeArr[i+1]=mp_TypeArr[i] ;
|
||||||
}/*
|
}
|
||||||
for(TypeSize i=ml_UseSize-2; i>=0; --i)*/
|
/*:::::::::::::::::::::::::::::::::::*/
|
||||||
|
|
||||||
mp_TypeArr[0]=AR_TypeArg ;
|
mp_TypeArr[0]=AR_TypeArg ;
|
||||||
}/*
|
}/*
|
||||||
@ -370,8 +306,8 @@ namespace ZNsMain
|
|||||||
for(TypeSize i=ml_UseSize-2; i>=0; --i)
|
for(TypeSize i=ml_UseSize-2; i>=0; --i)
|
||||||
{
|
{
|
||||||
mp_TypeArr[i+1]=mp_TypeArr[i] ;
|
mp_TypeArr[i+1]=mp_TypeArr[i] ;
|
||||||
}/*
|
}
|
||||||
for(TypeSize i=ml_UseSize-2; i>=0; --i)*/
|
/*:::::::::::::::::::::::::::::::::::*/
|
||||||
|
|
||||||
return mp_TypeArr[0] ;
|
return mp_TypeArr[0] ;
|
||||||
}/*
|
}/*
|
||||||
@ -404,7 +340,7 @@ namespace ZNsMain
|
|||||||
Type& push_front(){return AddHead();}
|
Type& push_front(){return AddHead();}
|
||||||
Type& push_back (){return AddTail();}
|
Type& push_back (){return AddTail();}
|
||||||
|
|
||||||
ZCIterator begin() {return ZCIterator(*this);}
|
/***/ ZCIterator begin() {return ZCIterator(*this);}
|
||||||
const ZCIterator begin() const{return ZCIterator(*this);}
|
const ZCIterator begin() const{return ZCIterator(*this);}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user