add conditions collector and also complete generate summary ...
need to test ...
This commit is contained in:
@@ -191,7 +191,7 @@ public:
|
||||
|
||||
//
|
||||
T iItem;
|
||||
bool isValid = iItem.Parse(content);
|
||||
bool isValid = iItem.ParseModel(content);
|
||||
if (isValid)
|
||||
{
|
||||
//
|
||||
@@ -224,14 +224,51 @@ public:
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = item.IsValid();
|
||||
result = item.IsModelValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
string content = item.ToString();
|
||||
string content = item.ToModelString();
|
||||
result = IsValid(content);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
string storePath = GetStorePath();
|
||||
int mFileHandler = FileOpen(
|
||||
storePath,
|
||||
FILE_READ | FILE_WRITE | FILE_TXT);
|
||||
result = mFileHandler != INVALID_HANDLE;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
FileSeek(mFileHandler, 0, SEEK_END);
|
||||
FileWrite(mFileHandler, content);
|
||||
FileFlush(mFileHandler);
|
||||
FileClose(mFileHandler);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Add Item ...
|
||||
bool Add(
|
||||
string content // Content
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = IsValid(content);
|
||||
if (!result)
|
||||
{
|
||||
@@ -282,7 +319,7 @@ public:
|
||||
T iItem = items[i];
|
||||
|
||||
//
|
||||
if (!iItem.IsValid())
|
||||
if (!iItem.IsModelValid())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -309,7 +346,7 @@ public:
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = item.IsValid();
|
||||
result = item.IsModelValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user