本文整理汇总了C++中checkState函数的典型用法代码示例。如果您正苦于以下问题:C++ checkState函数的具体用法?C++ checkState怎么用?C++ checkState使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了checkState函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: executeInstructionOnStack
void Engine::push(char c) {
if (!checkState())
return;
if (state == sStart) {
executeInstructionOnStack("Copy"); // No tr
if (!checkState()) {
setError("Failed to copy some data"); // No tr
return;
}
dStack.top()->clear();
if (!dStack.top()->push(c, false)) {
delete dStack.pop();
return;
}
dStack.top()->clear();
changeState(sAppend);
} else {
if (!Qtopia::mousePreferred() && !iStack.isEmpty() && *iStack.top() == "EvaluateLine") // No tr
hardReset();
changeResetState(drSoft);
if (!dStack.top()->push(c, false)) {
return;
}
}
dStack.top()->push(c);
emit(stackChanged());
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:28,代码来源:engine.cpp
示例2: main
int main(int argc, char **argv)
{
initialize();
initialize_TIMER0();
clear_array();
PORTC = 0;
USART_send_string("Currently outputing color: \n");
while(1){
for(unsigned int i = 0; i < 8; ++i){
PORTE = i;
switch (state){
case RED:
//PORTE = 1;
update_row(224,0,0);
checkState();
break;
case GREEN:
update_row(0,7,0);
checkState();
break;
case YELLOW:
led_off();
update_row(yellowRow,0,0);
update_row(yellowRow,0,0);
update_row(yellowRow,yellowRow,0);
update_row(yellowRow,0,0);
update_row(yellowRow,0,0);
led_off();
checkState();
break;
}
}
}
}
开发者ID:Nrpickle,项目名称:EECS162,代码行数:34,代码来源:main.c
示例3: ASSERT
void Resource::fileLoaded(FS::IFile& file, bool success)
{
m_is_waiting_for_load = false;
if (m_desired_state != State::READY) return;
ASSERT(m_current_state != State::READY);
ASSERT(m_empty_dep_count == 1);
if (!success)
{
g_log_error.log("Core") << "Could not open " << getPath().c_str();
--m_empty_dep_count;
++m_failed_dep_count;
checkState();
m_is_waiting_for_load = false;
return;
}
if (!load(file))
{
++m_failed_dep_count;
}
--m_empty_dep_count;
checkState();
m_is_waiting_for_load = false;
}
开发者ID:dreamsxin,项目名称:LuxEngine,代码行数:27,代码来源:resource.cpp
示例4: connect
bool KbdKeeper::setup()
{
connect(&m_layout, SIGNAL(keyboardChanged()), SLOT(keyboardChanged()));
connect(&m_layout, SIGNAL(layoutChanged(uint)), SLOT(layoutChanged(uint)));
connect(&m_layout, SIGNAL(checkState()), SLOT(checkState()));
return true;
}
开发者ID:pritambaral,项目名称:lxqt-panel,代码行数:8,代码来源:kbdkeeper.cpp
示例5: setChecked
void CLabel::mousePressEvent(QMouseEvent *ev){
if( checkState() == Qt::Checked ){
setChecked(Qt::Unchecked);
} else {
setChecked(Qt::Checked);
}
emit clicked();
emit clicked(checkState() == Qt::Checked);
QLabel::mousePressEvent(ev);
}
开发者ID:CoActionOS,项目名称:CoActionOS-Desktop,代码行数:10,代码来源:CLabel.cpp
示例6: treeWidget
void
tag_lvitem::set_on(bool b)
{
treeWidget()->blockSignals(true);
if ((checkState(0)==Qt::Unchecked && b==true) ||
(checkState(0)==Qt::Checked && b==false)) {
DBG_PRINTF(5, "set_on changes state");
setCheckState(0, b ? Qt::Checked : Qt::Unchecked);
last_known_state = (b ? Qt::Checked : Qt::Unchecked);
colorize();
}
treeWidget()->blockSignals(false);
}
开发者ID:AleksKots,项目名称:Manitou,代码行数:13,代码来源:tagsbox.cpp
示例7: writer
//------------------------------------------------------------------------
bool XmlRepresentationHelper::startEndCell ()
{
if (!checkState (kInCell))
return false;
StringWriter writer (stream);
String string;
string.printf ("<%s/>", CELL_TAG);
writer.write (string);
writer.write (ENDLINE_A);
if (!checkState (kInPage))
return false;
return true;
}
开发者ID:KennyWZhang,项目名称:RenderMan,代码行数:16,代码来源:vstrepresentation.cpp
示例8: checkState
/*!
\brief Destructs the VtkPropRenderer.
*/
mitk::VtkPropRenderer::~VtkPropRenderer()
{
// Workaround for GLDisplayList Bug
{
m_MapperID=0;
checkState();
}
if (m_LightKit != NULL)
m_LightKit->Delete();
if (m_VtkRenderer!=NULL)
{
m_CameraController = NULL;
m_VtkRenderer->Delete();
m_VtkRenderer = NULL;
}
else
m_CameraController = NULL;
if (m_WorldPointPicker != NULL)
m_WorldPointPicker->Delete();
if (m_PointPicker != NULL)
m_PointPicker->Delete();
if (m_CellPicker != NULL)
m_CellPicker->Delete();
if (m_TextRenderer != NULL)
m_TextRenderer->Delete();
}
开发者ID:GHfangxin,项目名称:MITK,代码行数:34,代码来源:mitkVtkPropRenderer.cpp
示例9: memorySave
// Memory
void Engine::memorySave() {
if (!checkState())
return;
//save previous data on stack
executeInstructionOnStack("Copy"); // No tr
if (mem) {
dStack.push(mem);
executeInstructionOnStack("Add"); // No tr
}
if (state != sError)
mem = dStack.pop();
executeInstructionOnStack("Factory"); // No tr
if (mem->getFormattedOutput() != dStack.top()->getFormattedOutput()) {
if (memMark) memMark->show();
} else {
delete mem;
mem = 0;
if (memMark) memMark->hide();
}
delete dStack.pop();
qApp->processEvents();
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:26,代码来源:engine.cpp
示例10: msa
PairAlign::PairAlign(MSAEditor* _msa)
: msa(_msa), pairwiseAlignmentWidgetsSettings(_msa->getPairwiseAlignmentWidgetsSettings()),
distanceCalcTask(NULL), settingsWidget(NULL),
showHideSequenceWidget(NULL), showHideSettingsWidget(NULL), showHideOutputWidget(NULL),
saveController(NULL), savableTab(this, GObjectViewUtils::findViewByName(_msa->getName())),
showSequenceWidget(_msa->getPairwiseAlignmentWidgetsSettings()->showSequenceWidget),
showAlgorithmWidget(_msa->getPairwiseAlignmentWidgetsSettings()->showAlgorithmWidget),
showOutputWidget(_msa->getPairwiseAlignmentWidgetsSettings()->showOutputWidget),
firstSequenceSelectionOn(false), secondSequenceSelectionOn(false),
sequencesChanged(true), sequenceNamesIsOk(false), alphabetIsOk(false)
{
SAFE_POINT(NULL != msa, "MSA Editor is NULL.", );
SAFE_POINT(NULL != pairwiseAlignmentWidgetsSettings, "pairwiseAlignmentWidgetsSettings is NULL.", );
setupUi(this);
firstSeqSelectorWC = new SequenceSelectorWidgetController(msa);
firstSeqSelectorWC->setObjectName("firstSeqSelectorWC");
secondSeqSelectorWC = new SequenceSelectorWidgetController(msa);
secondSeqSelectorWC->setObjectName("secondSeqSelectorWC");
firstSequenceLayout->addWidget(firstSeqSelectorWC);
secondSequenceLayout->addWidget(secondSeqSelectorWC);
initLayout();
initSaveController();
connectSignals();
initParameters();
U2WidgetStateStorage::restoreWidgetState(savableTab);
checkState();
}
开发者ID:ggrekhov,项目名称:ugene,代码行数:33,代码来源:PairAlign.cpp
示例11: checkState
void
FutureBucket::makeLive(Application& app)
{
checkState();
assert(!isLive());
assert(hasHashes());
auto& bm = app.getBucketManager();
if (hasOutputHash())
{
setLiveOutput(bm.getBucketByHash(hexToBin256(getOutputHash())));
}
else
{
assert(mState == FB_HASH_INPUTS);
mInputCurrBucket =
bm.getBucketByHash(hexToBin256(mInputCurrBucketHash));
mInputSnapBucket =
bm.getBucketByHash(hexToBin256(mInputSnapBucketHash));
assert(mInputShadowBuckets.empty());
for (auto const& h : mInputShadowBucketHashes)
{
auto b = bm.getBucketByHash(hexToBin256(h));
assert(b);
CLOG(DEBUG, "Bucket") << "Reconstituting shadow " << h;
mInputShadowBuckets.push_back(b);
}
mState = FB_LIVE_INPUTS;
startMerge(app);
assert(isLive());
}
}
开发者ID:AnthonyAkentiev,项目名称:stellar-core,代码行数:31,代码来源:FutureBucket.cpp
示例12: postSend
void socket::postSend()
{
if (!checkState())
return;
if (_sendQueue.size() == 0)
return;
_sendBuf.clear();
while ((_sendQueue.size() > 0) && (_sendBuf.size() + _sendQueue.front()->size() < IO_BUFFER_SIZE))
{
auto& buf = _sendQueue.front();
msg_size_t size = 0;
size += buf->size() &0xFFFF;
_sendBuf.append((uint8_t*)&size, sizeof(msg_size_t));
_sendBuf.append(buf->data(), buf->size());
_sendQueue.pop_front();
}
if (0 == _sendBuf.size())
{
NET_LOG.console("Temp to send to [%s] 0 bytes message.", get_remoteaddress().c_str());
return;
}
_isSending = true;
asio::async_write(
_socket,
asio::buffer(_sendBuf.data(), _sendBuf.size()),
std::bind(&socket::handleSend, shared_from_this(), std::placeholders::_1, std::placeholders::_2));
}
开发者ID:ZhHong,项目名称:moon_net,代码行数:34,代码来源:socket.cpp
示例13: checkState
void ResourceSkin::checkState(const MapStateInfo& _states)
{
for (MapStateInfo::const_iterator iter = _states.begin(); iter != _states.end(); ++iter)
{
checkState(iter->first);
}
}
开发者ID:dayongxie,项目名称:MyGUI,代码行数:7,代码来源:MyGUI_ResourceSkin.cpp
示例14: printf
void GLFrameBuffer::pushColorAttachment( GLenum iformat )
{
if( num_color_attachments == GL_MAX_COLOR_ATTACHMENTS-1 )
{
printf( "ERROR: Trying to attach a new color attachment to fbo but hit max color attachments!\n" );
return;
}
bind();
glGenTextures( 1, &texture_id[num_color_attachments] );
glActiveTexture( GL_TEXTURE0 );
glBindTexture( GL_TEXTURE_2D, texture_id[num_color_attachments] );
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexImage2D( GL_TEXTURE_2D, 0, iformat, res[0], res[1], 0,
//GL_RGB, GL_UNSIGNED_BYTE, 0 );
GL_RGB, GL_FLOAT, 0 );
glFramebufferTexture2D( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+num_color_attachments,
GL_TEXTURE_2D, texture_id[num_color_attachments], 0 );
num_color_attachments++;
checkState();
}
开发者ID:methmtican,项目名称:SSRAO,代码行数:28,代码来源:GLFrameBuffer.cpp
示例15: createLeaf
Node<Status, T> createLeaf(
const typename NodeTypes<Status, T>::ValueList& originalValueList,
int depthRemaining,
const State& collectedState)
{
typedef typename NodeTypes<Status, T>::ValuePtr ValuePtr;
typedef typename NodeTypes<Status, T>::ValueList ValueList;
ValueList valueList;
if (checker_) {
boost::remove_copy_if(
originalValueList,
std::back_inserter(valueList),
[this, &collectedState](const ValuePtr& value)
{
State state(collectedState);
for (Point p: value->first.state()) {
state.addStone(p);
}
return !checkState(*checker_, value->first.table(), state);
});
} else {
valueList = originalValueList;
}
advanceProgress(valueList.size(), depthRemaining);
return LeafNode<Status, T>(std::move(valueList));
}
开发者ID:petersohn,项目名称:sokoban,代码行数:27,代码来源:NodeBuilder.hpp
示例16: devWrite
// You may have to modify this to suit your needs
bool PS2Emu::handshake() {
unsigned char data = 0x00;
// tell host we are ready to connect
devWrite(0xAA);
// wait for response
while (checkState(dat, LOW, 5000)) {
devRead(&data);
devWrite(0xFA);
switch(data) {
case 0x00: // second bit of 0xED or 0xF3
break;
case 0xED: // set/reset LEDs
break;
case 0xF2: // ID
devWrite(0xAB);
devWrite(0x83);
break;
case 0xF3: // set/reset typematic delay
break;
case 0xF4: // keyboard is enabled, break loop
return true;
}
}
return false;
}
开发者ID:CAOXP,项目名称:arduino,代码行数:28,代码来源:PS2Emu.cpp
示例17: while
// spin, modifying the state to different values
void MyInfo::modifyThreadFunc(
robot_interaction::LockedRobotState* locked_state,
int* counter,
double offset)
{
bool go = true;
while(go)
{
double val = offset;
for (int loops = 0 ; loops < 100 ; ++loops)
{
val += 0.0001;
locked_state->modifyState(boost::bind(&MyInfo::modifyFunc,
this,
_1,
val));
}
cnt_lock_.lock();
go = !quit_;
++*counter;
cnt_lock_.unlock();
checkState(*locked_state);
val += 0.000001;
}
}
开发者ID:ehuang3,项目名称:moveit_ros,代码行数:30,代码来源:locked_robot_state_test.cpp
示例18: checkState
Slice Encrypt::start() {
checkState(State::INITIAL, State::PROGRESS, "Start already called");
updateAad(version_);
updateAad(entity_);
return buffer_(0, VERSION_SIZE + config_.ivLength);
}
开发者ID:facebook,项目名称:conceal,代码行数:7,代码来源:Encrypt.cpp
示例19: clearFilter
void MessageFilterDialog::existingFilterSelectionChanged(QListBoxItem * item)
{
if (item)
{
// get the current filter number from the listbox item
m_currentFilterNum = ((MessageFilterListBoxText*)item)->data();
// get the specified filter
m_currentFilter = m_filters->filter(m_currentFilterNum);
// set the GroupBox's label
m_filterGroup->setTitle(m_currentFilter->name() + " &Filter");
// setup all the filter values
m_name->setText(m_currentFilter->name());
m_pattern->setText(m_currentFilter->regexp().pattern());
// select all the message types
uint64_t messageTypes = m_currentFilter->types();
uint32_t messageType;
for (QListBoxItem* currentLBT = m_messageTypes->firstItem();
currentLBT;
currentLBT = currentLBT->next())
{
messageType = ((MessageFilterListBoxText*)currentLBT)->data();
m_messageTypes->setSelected(currentLBT, ((uint64_t(1) << messageType) & messageTypes) != 0);
}
}
else // no item selected, clear all filter setup
clearFilter();
// check the current state
checkState();
}
开发者ID:carriercomm,项目名称:showeq,代码行数:34,代码来源:messagefilterdialog.cpp
示例20: checkState
void
LedgerDelta::modEntry(EntryFrame::pointer entry)
{
checkState();
auto k = entry->getKey();
auto mod_it = mMod.find(k);
if (mod_it != mMod.end())
{
// collapse mod
mod_it->second = entry;
}
else
{
auto new_it = mNew.find(k);
if (new_it != mNew.end())
{
// new + mod = new (with latest value)
new_it->second = entry;
}
else
{
assert(mDelete.find(k) == mDelete.end()); // delete + mod is illegal
mMod[k] = entry;
}
}
}
开发者ID:graydon,项目名称:stellar-core-old,代码行数:26,代码来源:LedgerDelta.cpp
注:本文中的checkState函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论