RedPanda-CPP/RedPandaIDE/parser/statementmodel.cpp

24 lines
525 B
C++
Raw Normal View History

2021-08-05 23:13:21 +08:00
#include "statementmodel.h"
StatementModel::StatementModel(QObject *parent) : QObject(parent)
{
2021-08-07 14:08:51 +08:00
mCount = 0;
mClearing = false;
mBatchDeleteCount = 0;
}
2021-08-05 23:13:21 +08:00
2021-08-07 14:08:51 +08:00
const StatementMap &StatementModel::childrenStatements(PStatement statement)
{
if (!statement) {
return mGlobalStatements;
} else {
return statement->children;
}
}
const StatementMap &StatementModel::childrenStatements(std::weak_ptr<Statement> statement)
{
PStatement s = statement.lock();
return childrenStatements(s);
2021-08-05 23:13:21 +08:00
}