Files
envi-code/SourceCode/Code2026/Dimension/WValList.cpp
T
2026-09-28 15:28:50 +08:00

53 lines
736 B
C++

#include "StdAfx.h"
#include "WValList.h"
WValList::WValList(const char *format,const AString &s)
{
long cur = 0, sCur = 0;
while (format[cur] != NULL)
{
WFormatUnit *pFU = new WFormatUnit(format,cur,s,sCur);
if (pFU->IsValid())
{
AddTail(pFU);
}
else
{
delete pFU;
}
}
}
WValList::WValList(const char *format,char *p)
{
long cur = 0;
char* curP = p + sizeof(char*);
while (format[cur] != NULL)
{
WFormatUnit *pFU = new WFormatUnit(format,cur,curP);
if (pFU->IsValid())
{
AddTail(pFU);
}
else
{
delete pFU;
}
}
}
WValList::~WValList()
{
}
long WValList::GetStringLength()
{
long l = 0;
for (MoveToFirst(); !IsOut(); MoveToNext())
{
l += GetCurData()->Length();
}
return l;
}