代码拉取完成,页面将自动刷新
#include "TFunctionF.h"
#include <time.h>
#include <Windows.h>
#include <qdebug.h>
TFunctionL::TFunctionL()
{
}
TFunctionL::~TFunctionL()
{
}
void TFunctionL::run()
{
L();
sendUpdateSignal();
TFunctions* tf = static_cast<TFunctions*> (tf_func);
if (tf) {
qDebug() << " func L(C) turn to func C";
tf->run();
}
}
void TFunctionR::run()
{
R();
sendUpdateSignal();
TFunctions* tf = static_cast<TFunctions*> (tf_func);
if (tf) {
qDebug() << " func R(C) turn to func C";
tf->run();
}
}
TFunctionF::TFunctionF()
{
}
TFunctionF::~TFunctionF()
{
}
void TFunctionF::prepareTestSample1()
{
m_cells[115] = 'e';
m_cells[116] = 'e';
}
void TFunctionF::prepareTestSample2()
{
m_cells[115] = 'e';
m_cells[116] = 'e';
m_cells[118] = 'a';
}
void TFunctionF::prepareTestSample3()
{
m_cells[115] = 'e';
m_cells[116] = 'e';
m_cells[117] = 'a';
}
void TFunctionF::run()
{
qDebug() << " func F is starting...";
while ('e' != m_cells[m_index]) {
m_index--; //
if (m_index < 0) {
qDebug() << "index out of range.";
return;
}
sendUpdateSignal();
//Sleep(500);
}
if ('e' == m_cells[m_index]) {
m_index--; //
if (m_index < 0) {
qDebug() << "index out of range.";
return;
}
sendUpdateSignal();
//Sleep(500);
qDebug() << " func F turn to F1";
f1(tf_func, tf_funb, tf_searchA);
}
}
void TFunctionF::f1(void * func, void * funb, char searchA)
{
while ((searchA != m_cells[m_index]) && ('\0' != m_cells[m_index])) {
m_index++; //
if (m_index >= maxCellsSize - 1) {
qDebug() << "index out of range.";
return;
}
sendUpdateSignal();
//Sleep(500);
}
if (searchA==m_cells[m_index] ) {
TFunctions* tf = static_cast<TFunctions*> (func);
if (tf) {
qDebug() << " func F1 turn to func C";
tf->run();
}
}else if ('\0' == m_cells[m_index]) {
m_index++; //
if (m_index >= maxCellsSize - 1) {
qDebug() << "index out of range.";
return;
}
sendUpdateSignal();
//Sleep(500);
qDebug() << " func F1 turn to func F2";
f2(func, funb, searchA);
}
}
void TFunctionF::f2(void * func, void * funb, char searchA)
{
if (searchA == m_cells[m_index]) {
TFunctions* tf = static_cast<TFunctions*> (func);
if (tf) {
qDebug() << " func F1 turn to func C";
tf->run();
}
}else if ((searchA != m_cells[m_index]) && ('\0' != m_cells[m_index])) {
m_index++; //
if (m_index >= maxCellsSize - 1) {
qDebug() << "index out of range.";
return;
}
sendUpdateSignal();
//Sleep(500);
qDebug() << " func F2 turn to func F1";
f1(func, funb, searchA);
}else if ('\0' == m_cells[m_index]) {
m_index++; //
if (m_index >= maxCellsSize - 1) {
qDebug() << "index out of range.";
return;
}
sendUpdateSignal();
//Sleep(500);
TFunctions* tf = static_cast<TFunctions*> (funb);
if (tf) {
qDebug() << " func F2 turn to func B";
tf->run();
}
}
}
TFunctionFR::TFunctionFR()
:TFunctionF()
{
}
TFunctionFR::~TFunctionFR()
{
}
void TFunctionFR::run()
{
TFunctions* tf = static_cast<TFunctions*> (tf_func);
TFunctionR tf_r;
if (tf) {
tf_r.setFunc(tf);
}
setFunc(&tf_r);
TFunctionF::run();
}
TFunctionFL::TFunctionFL()
:TFunctionF()
{
}
TFunctionFL::~TFunctionFL()
{
}
void TFunctionFL::run()
{
TFunctions* tf = static_cast<TFunctions*> (tf_func);
TFunctionL tf_l;
if (tf) {
tf_l.setFunc(tf);
}
setFunc(&tf_l);
TFunctionF::run();
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。