• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ClearData函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ClearData函数的典型用法代码示例。如果您正苦于以下问题:C++ ClearData函数的具体用法?C++ ClearData怎么用?C++ ClearData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ClearData函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: connect

void MainWindow::connectSignals()
{
	connect(m_assign1, &QPushButton::clicked, this, [this] { AssignData(*m_model); });
	connect(m_assign2, &QPushButton::clicked, this, [this] { AssignData(*m_viewModel1); });
	connect(m_assign3, &QPushButton::clicked, this, [this] { AssignData(*m_viewModel2); });

	connect(m_upsert1, &QPushButton::clicked, this, [this] { UpsertData(*m_model); });
	connect(m_upsert2, &QPushButton::clicked, this, [this] { UpsertData(*m_viewModel1); });
	connect(m_upsert3, &QPushButton::clicked, this, [this] { UpsertData(*m_viewModel2); });

	connect(m_clear1, &QPushButton::clicked, this, [this] { ClearData(*m_model); });
	connect(m_clear2, &QPushButton::clicked, this, [this] { ClearData(*m_viewModel1); });
	connect(m_clear3, &QPushButton::clicked, this, [this] { ClearData(*m_viewModel2); });
}
开发者ID:dmlys,项目名称:QtTools,代码行数:14,代码来源:MainWindow.cpp


示例2: ClearData

void CSingleArenaTotemExt::LoadData()
{
   //清空数据
    ClearData();

    //父类加载数据
    CSingleArenaTotemData::LoadData();

    //分析匹配key
    for( CSingleArenaTotemData::UInt32SingleArenaTotemMap::iterator iter = id_singlearenatotem_map.begin();
        iter != id_singlearenatotem_map.end();
        ++iter )
    {
        if( 0 == iter->second->rank )
            continue;
        rank_map[iter->second->rank].push_back(iter->second);
    }

    //打印信息
    for( std::map<uint32, std::vector<SData*> >::iterator iter = rank_map.begin();
        iter != rank_map.end();
        ++iter )
    {
        LOG_DEBUG("rank:%d,count:%d", iter->first, (uint32)iter->second.size());
    }
}
开发者ID:quinsmpang,项目名称:phone-code,代码行数:26,代码来源:r_singlearenatotemext.cpp


示例3: assert

// Initializer
void MeshModelRender::AttachKernel(MeshModelKernel* pKernel)
{
    assert(pKernel != NULL);
    kernel = pKernel;

    ClearData();
}
开发者ID:hywei,项目名称:Parameterization,代码行数:8,代码来源:MeshModelRender.cpp


示例4: ClearData

void RBACData::LoadFromDB()
{
    ClearData();

    TC_LOG_DEBUG("rbac", "RBACData::LoadFromDB [Id: %u Name: %s]: Loading permissions", GetId(), GetName().c_str());
    // Load account permissions (granted and denied) that affect current realm
    PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_FUN_ACCOUNT_PERMISSIONS);
    stmt->setUInt32(0, GetId());
    stmt->setInt32(1, GetRealmId());

    PreparedQueryResult result = LoginDatabase.Query(stmt);
    if (result)
    {
        do
        {
            Field* fields = result->Fetch();
            if (fields[1].GetBool())
                GrantPermission(fields[0].GetUInt32());
            else
                DenyPermission(fields[0].GetUInt32());
        }
        while (result->NextRow());
    }

    // Add default permissions
    RBACPermissionContainer const& permissions = sAccountMgr->GetRBACDefaultPermissions(_secLevel);
    for (RBACPermissionContainer::const_iterator itr = permissions.begin(); itr != permissions.end(); ++itr)
        GrantPermission(*itr);

    // Force calculation of permissions
    CalculateNewPermissions();
}
开发者ID:GetPlay,项目名称:TC,代码行数:32,代码来源:RBAC.cpp


示例5: ClearData

//**************************************************************************************
void CBCGPToolbarComboBoxButton::CopyFrom (const CBCGPToolbarButton& s)
{
	CBCGPToolbarButton::CopyFrom (s);
	POSITION pos;

	m_lstItems.RemoveAll ();

	const CBCGPToolbarComboBoxButton& src = (const CBCGPToolbarComboBoxButton&) s;
	for (pos = src.m_lstItems.GetHeadPosition (); pos != NULL;)
	{
		m_lstItems.AddTail (src.m_lstItems.GetNext (pos));
	}

	ClearData ();

	m_lstItemData.RemoveAll ();
	for (pos = src.m_lstItemData.GetHeadPosition (); pos != NULL;)
	{
		m_lstItemData.AddTail (src.m_lstItemData.GetNext (pos));
	}

	DuplicateData ();
	ASSERT (m_lstItemData.GetCount () == m_lstItems.GetCount ());

	m_dwStyle = src.m_dwStyle;
	m_iWidth = src.m_iWidth;
	m_iSelIndex = src.m_iSelIndex;
	m_nDropDownHeight = src.m_nDropDownHeight;
	m_uiMenuResID = src.m_uiMenuResID;

	m_bIsRibbon = src.m_bIsRibbon;
	m_bIsRibbonFloaty = src.m_bIsRibbonFloaty;
	m_bIsCtrl = src.m_bIsCtrl;
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:35,代码来源:BCGPToolbarComboBoxButton.cpp


示例6: ClearData

inline void REClip::SetData(REClipData* d)
{
    if(_d == d) return;
    ClearData();
    ++d->_refs;
    _d = d;
}
开发者ID:Salimlou,项目名称:reflow,代码行数:7,代码来源:REClip.cpp


示例7: ClearData

// method to expose data to JavaScript by using properties
void QmitkHistogramJSWidget::ComputeHistogram(HistogramType* histogram)
{
  m_Histogram = histogram;
  HistogramConstIteratorType startIt = m_Histogram->End();
  HistogramConstIteratorType endIt = m_Histogram->End();
  HistogramConstIteratorType it  = m_Histogram->Begin();
  ClearData();
  unsigned int i = 0;
  bool firstValue = false;
  // removes frequencies of 0, which are outside the first and last bin
  for (; it != m_Histogram->End(); ++it)
  {
    if (it.GetFrequency() > 0.0)
    {
      endIt = it;
      if (!firstValue)
      {
        firstValue = true;
        startIt = it;
      }
    }
  }
  ++endIt;
  // generating Lists of measurement and frequencies
  for (it = startIt ; it != endIt; ++it, ++i)
  {
    QVariant frequency = QVariant::fromValue(it.GetFrequency());
    QVariant measurement = it.GetMeasurementVector()[0];
    m_Frequency.insert(i, frequency);
    m_Measurement.insert(i, measurement);
  }
  m_IntensityProfile = false;
  this->SignalDataChanged();
}
开发者ID:GHfangxin,项目名称:MITK,代码行数:35,代码来源:QmitkHistogramJSWidget.cpp


示例8: SendMessage

/*
** Handles the ClosePlayer bang.
**
*/
void PlayerCAD::ClosePlayer()
{
	SendMessage(m_PlayerWindow, WM_USER, 0, IPC_CLOSE);
	// TODO
	m_Initialized = false;
	ClearData();
}
开发者ID:AlonTzarafi,项目名称:rainmeter,代码行数:11,代码来源:PlayerCAD.cpp


示例9: ClearData

void SimpleSkeletalAnimatedObject_cl::SetMode(SampleMode_e newMode)
{
  ClearData();
  m_eSampleMode = newMode;

  switch (newMode)
  {
  case MODE_SINGLEANIM:
    StartSingleAnimation(false); break;
  case MODE_BLENDTWOANIMS:
    BlendTwoAnimations(); break;
  case MODE_LISTENTOEVENTS:
    ListenToEvents(); break;
  case MODE_SETANIMATIONTIME:
    SetAnimationTime(); break;
  case MODE_LAYERTWOANIMATIONS:
    LayerTwoAnimations(); break;
  case MODE_FORWARDKINEMATICS:
    ForwardKinematics(); break;
  case MODE_LOOKAT:
    LookAt(); break;
  }

  // disable motion delta for this sample
  if (GetAnimConfig() != NULL)
    GetAnimConfig()->SetFlags(GetAnimConfig()->GetFlags() & ~APPLY_MOTION_DELTA);
}
开发者ID:RexBaribal,项目名称:projectanarchy,代码行数:27,代码来源:SimpleSkeletalAnimatedObject.cpp


示例10: GetFlags

//---------------------------------------------------------------------------
void __fastcall TfrmHeartMonitor::DisplayHeartRateMeasurementData(TBytes Data) {
	THRMFlags *Flags = GetFlags(Data[0]);
	int LBPM = 0;
	if (Flags->HRValue16bits) {
		LBPM = Data[1] + (Data[2] * 16);
	}
	else {
		LBPM = Data[1];
	}
	switch (Flags->SensorContactStatus) {
	case NonSupported:
		lblContactStatus->Text = "";
		break;
	case NonDetected:
		lblContactStatus->Text = "Sensor contact non detected";
		break;
	case Detected:
		lblContactStatus->Text = "Sensor contact detected";
		break;
	}
	if (Flags->SensorContactStatus == NonDetected) {
		ClearData();
	}
	else {
		lblBPM->Text = IntToStr(LBPM) + " bpm";
		imgHeart->Visible = !imgHeart->Visible;
	}
}
开发者ID:FMXExpress,项目名称:Firemonkey,代码行数:29,代码来源:UHeartRateForm.cpp


示例11: defined

//---------------------------------------------------------------------------
void __fastcall TfrmHeartMonitor::EnableHRMMonitorize(bool Enabled) {
	TBluetoothGattDescriptor * LDescriptor;

	if (FHRMeasurementGattCharact != NULL) {
#if defined(_WIN32) || defined(_WIN64)
		LDescriptor = FHRMeasurementGattCharact->Descriptors->Items[0];
		LDescriptor->Notification = Enabled;
		FBLEDevice->WriteDescriptor(LDescriptor);
#endif
		FBLEDevice->SetCharacteristicNotification(FHRMeasurementGattCharact,
			Enabled);

		if (Enabled) {
			btnMonitorize->Text = "Stop monitoring";
		}
		else {
			btnMonitorize->Text = "Start monitoring";
			ClearData();
		}
		btnMonitorize->Enabled = true;
	}
	else {
		Memo1->Lines->Add("HRM Characteristic not found");
		lblBPM->Text = "HRM Characteristic not found";
		btnMonitorize->Enabled = false;
	}
}
开发者ID:FMXExpress,项目名称:Firemonkey,代码行数:28,代码来源:UHeartRateForm.cpp


示例12: Pop

    void Pop(const Callback& cb)
    {
        boost::unique_lock<boost::mutex> lock(m_Mutex);

        // check persistent queue
        if (m_FilePath.empty())
        {
            // there is no persistent queue yet
            if (!m_Queue.empty())
            {
                m_ByteSize -= m_Queue.front().m_Size;
                m_Queue.pop_front();
            }

            if (!m_Queue.empty())
            {
                const auto next = m_Queue.front();
                lock.unlock();

                // write next packet
                cb(next);
            }
        }
        else
        {
            // all data must be in the file buffer
            assert(m_Queue.empty());

            m_ByteSize -= m_CurrentPacket.m_Size;
            if (!m_ByteSize)
            {
                // we have just written last packet, clear persistent queue
                m_Stream.seekg(0, std::ios::end);
                assert(m_Stream.tellg() == m_ReadOffset);
                ClearData();
                return;
            }

            // extract last packet from persistent queue
            m_Stream.seekg(m_ReadOffset);

            m_Stream.read(reinterpret_cast<char*>(&m_CurrentPacket.m_Size), sizeof(m_CurrentPacket.m_Size));

            if (m_CurrentSize < m_CurrentPacket.m_Size)
            {
                // not enough memory, allocate new buffer
                m_CurrentPacket.m_Memory = boost::make_shared_noinit<char[]>(m_CurrentPacket.m_Size);
                m_CurrentSize = m_CurrentPacket.m_Size;
            }

            m_Stream.read(m_CurrentPacket.m_Memory.get(), m_CurrentPacket.m_Size);

            // increment read offset
            m_ReadOffset += (m_CurrentPacket.m_Size + sizeof(m_CurrentPacket.m_Size));
            lock.unlock();

            // write packet
            cb(m_CurrentPacket);
        }
    }
开发者ID:CLRN,项目名称:net,代码行数:60,代码来源:persistent_queue.hpp


示例13: file

int NetworkCommunication::loadData(QString datafile)
{
    QFile file(datafile);


    if (file.open(QIODevice::ReadOnly | QIODevice::Text))
    {
        qDebug() << "NetworkCommunication::LoadData: File " << datafile << "is open";
        ClearData();
        QTextStream in(&file);
        int counter=0;
        while(!in.atEnd()) {
            counter++;
            QString line = in.readLine();
            QStringList fields = line.split(" ",QString::SkipEmptyParts);
            if(fields.length() == 2)
            {
                AddData(fields[0].toDouble(),fields[1].toDouble());
            }
        }
        file.close();
        emit(updateUI());
        return(0);
    }
    else
    {
        qDebug() << "NetworkCommunication::LoadData: File " << datafile << " can not be opened";
        return(1);
    }



}
开发者ID:jkomppula,项目名称:Disc,代码行数:33,代码来源:networkcommunication.cpp


示例14: ClearData

	//! ResourceUninit
	void Texture::ResourceUninit()
	{
		if (!m_pImpl)
			return;

		m_pImpl->GraphicUnload();
		ClearData();		
	}
开发者ID:aminere,项目名称:StarportsPublic,代码行数:9,代码来源:Texture.cpp


示例15: BeginWaitCursor

void CFoulerDoc::OnEditClearAll() 
{
	BeginWaitCursor();
	ClearData();
	m_pLeftView->Refresh();
	m_pRightView->Refresh();
	EndWaitCursor();
}
开发者ID:WisemanLim,项目名称:femos,代码行数:8,代码来源:FoulerDoc.cpp


示例16: SetName

Camera::Camera( const char * _name)
{
  SetName( _name);

  ClearData();

  SetProjTransform( STARTNEARPLANE, STARTFARPLANE, STARTFOV);
}
开发者ID:vgck,项目名称:opendr2,代码行数:8,代码来源:camera.cpp


示例17: ClearData

NS_IMETHODIMP
DataTransfer::ClearData(const nsAString& aFormat)
{
  Optional<nsAString> format;
  format = &aFormat;
  ErrorResult rv;
  ClearData(format, Some(nsContentUtils::SubjectPrincipal()), rv);
  return rv.StealNSResult();
}
开发者ID:philbooth,项目名称:gecko-dev,代码行数:9,代码来源:DataTransfer.cpp


示例18: ClearData

NS_IMETHODIMP
DataTransfer::ClearData(const nsAString& aFormat)
{
  Optional<nsAString> format;
  format = &aFormat;
  ErrorResult rv;
  ClearData(format, rv);
  return rv.ErrorCode();
}
开发者ID:Mardak,项目名称:tiles-dev,代码行数:9,代码来源:DataTransfer.cpp


示例19: ClearData

//---------------------------------------------------------------------------
void __fastcall TfrmHeartMonitor::DoScan(void) {
	ClearData();
	lblDevice->Text = "";
	lblBodyLocation->Text = "";
	lblContactStatus->Text = "";
	GUID Services[1];
	Services[0] = HRSERVICE;
	BluetoothLE1->DiscoverDevices(2500, &Services[0], 0);
}
开发者ID:FMXExpress,项目名称:Firemonkey,代码行数:10,代码来源:UHeartRateForm.cpp


示例20: ClearData

void CJXCRetailOnlineDlg::OnBnClickedButtonClear()
{
	if (IDOK == MsgBox(L"取消本次销售吗?", MB_OKCANCEL | MB_ICONQUESTION))
	{
		m_strAllMoney.Empty();
		ClearData();
		UpdateData(FALSE);
	}
}
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:9,代码来源:JXCRetailOnlineDlg.cpp



注:本文中的ClearData函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ClearDrawScreen函数代码示例发布时间:2022-05-30
下一篇:
C++ ClearCondition函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap