wxExpr *listExpr = new wxExpr(wxExprList);
- wxNode *node = the_list->First();
+ wxNode *node = the_list->GetFirst();
while (node)
{
- wxExpr *expr = (wxExpr *)node->Data();
+ wxExpr *expr = (wxExpr *)node->GetData();
listExpr->Append(expr);
- node = node->Next();
+ node = node->GetNext();
}
Append(listExpr);
// First make a list of wxExpr strings
wxExpr *listExpr = new wxExpr(wxExprList);
- wxNode *node = string_list->First();
+ wxNode *node = string_list->GetFirst();
while (node)
{
wxChar *string = (wxChar*)node->GetData();
wxExpr *expr = new wxExpr(wxExprString, wxString(string));
listExpr->Append(expr);
- node = node->Next();
+ node = node->GetNext();
}
// Now make an (=, Att, Value) triple
void wxExprDatabase::BeginFind(void) // Initialise a search
{
- position = First();
+ position = GetFirst();
}
wxExpr *wxExprDatabase::FindClause(long id) // Find a term based on an integer id attribute
wxExpr *found = NULL;
while (position && !found)
{
- wxExpr *term = (wxExpr *)position->Data();
+ wxExpr *term = (wxExpr *)position->GetData();
if (term->Type() == wxExprList)
{
if (value->Type() == wxExprInteger && value->IntegerValue() == id)
found = term;
}
- position = position->Next();
+ position = position->GetNext();
}
return found;
}
wxExpr *found = NULL;
while (position && !found)
{
- wxExpr *term = (wxExpr *)position->Data();
+ wxExpr *term = (wxExpr *)position->GetData();
if (term->Type() == wxExprList)
{
(value->Type() == wxExprString && value->StringValue() == val))
found = term;
}
- position = position->Next();
+ position = position->GetNext();
}
return found;
}
wxExpr *found = NULL;
while (position && !found)
{
- wxExpr *term = (wxExpr *)position->Data();
+ wxExpr *term = (wxExpr *)position->GetData();
if (term->Type() == wxExprList)
{
if ((value->Type() == wxExprInteger) && (value->IntegerValue() == val))
found = term;
}
- position = position->Next();
+ position = position->GetNext();
}
return found;
}
wxExpr *found = NULL;
while (position && !found)
{
- wxExpr *term = (wxExpr *)position->Data();
+ wxExpr *term = (wxExpr *)position->GetData();
if (term->Type() == wxExprList)
{
if ((value->Type() == wxExprReal) && (value->RealValue() == val))
found = term;
}
- position = position->Next();
+ position = position->GetNext();
}
return found;
}
wxExpr *found = NULL;
while (position && !found)
{
- wxExpr *term = (wxExpr *)position->Data();
+ wxExpr *term = (wxExpr *)position->GetData();
if (term->Type() == wxExprList)
{
if (term->Functor() == functor)
found = term;
}
- position = position->Next();
+ position = position->GetNext();
}
return found;
}
void wxExprDatabase::ClearDatabase(void)
{
noErrors = 0;
- wxNode *node = First();
+ wxNode *node = GetFirst();
while (node)
{
- wxExpr *expr = (wxExpr *)node->Data();
+ wxExpr *expr = (wxExpr *)node->GetData();
delete expr;
delete node;
- node = First();
+ node = GetFirst();
}
if (hash_table)
bool wxExprDatabase::Write(FILE *stream)
{
noErrors = 0;
- wxNode *node = First();
+ wxNode *node = GetFirst();
while (node)
{
- wxExpr *expr = (wxExpr *)node->Data();
+ wxExpr *expr = (wxExpr *)node->GetData();
expr->WriteClause(stream);
- node = node->Next();
+ node = node->GetNext();
}
return (noErrors == 0);
}