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

C++ CheckValid函数代码示例

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

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



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

示例1: EnableOK

void dlgRule::CheckChange()
{
    if (rule)
    {
        EnableOK(didChange() || txtSqlBox->GetText() != oldDefinition || txtComment->GetValue() != rule->GetComment());
    }
    else
    {
        wxString name = GetName();

        bool enable = true;

        CheckValid(enable, !name.IsEmpty(), _("Please specify name."));
        CheckValid(enable, rbxEvent->GetSelection() >= 0,
                   _("Please select at an event."));
        CheckValid(enable, !txtSqlBox->GetTextLength() || txtSqlBox->GetTextLength() > 6 , _("Please enter function definition."));

        EnableOK(enable);
    }
}
开发者ID:douglasresende,项目名称:pgadmin3,代码行数:20,代码来源:dlgRule.cpp


示例2: CheckValid

void nuiSprite::DelMatrixNode(uint32 index)
{
  if (!mpMatrixNodes)
    return;
  
  CheckValid();
  mpMatrixNodes->at(index)->Release();
  mpMatrixNodes->erase(mpMatrixNodes->begin() + index);
  
  DebugRefreshInfo();
}
开发者ID:jbl2024,项目名称:nui3,代码行数:11,代码来源:nuiSpriteView.cpp


示例3: PRECONDITION

//
/// Creates a bitmap object with the values found in the given bitmap structure.
/// This overload is deprecated. Use the overload that takes a reference instead.
//
TBitmap::TBitmap(const BITMAP * bitmap)
{
  PRECONDITION(bitmap);
  Handle = ::CreateBitmapIndirect((LPBITMAP)bitmap);  // API cast
  WARNX(OwlGDI, !Handle, 0, "Cannot create bitmap from BITMAP @" <<
        hex << (void*)bitmap);
  CheckValid();
  RefAdd(Handle, Bitmap);
  TRACEX(OwlGDI, OWL_CDLEVEL, "TBitmap constructed @" << (void*)this << " from BITMAP @" <<
         (void*)bitmap << ".");
}
开发者ID:Darkman-M59,项目名称:Meridian59_115,代码行数:15,代码来源:bitmap.cpp


示例4: THREAD_ANY

	void CBundle::ForceUngetService(CServiceRegistration* service)
	{
		THREAD_ANY();
		VERBOSE("WARNING [%s] Stale service reference", m_location.c_str());

		/// \todo verify
		CheckValid();

		TServicesInUseContainer::iterator it = m_servicesInUse.find(service);
		ASSERT_STRICT(it != m_servicesInUse.end());
		it->second.Reset();
	}
开发者ID:Kubiria,项目名称:SekaiFramework,代码行数:12,代码来源:CBundle.cpp


示例5: CheckValid

bool cByteBuffer::SkipRead(int a_Count)
{
	CHECK_THREAD;
	CheckValid();
	ASSERT(a_Count >= 0);
	if (!CanReadBytes(a_Count))
	{
		return false;
	}
	AdvanceReadPos(a_Count);
	return true;
}
开发者ID:Xury,项目名称:MCServer,代码行数:12,代码来源:ByteBuffer.cpp


示例6: GetName

void dlgTablespace::CheckChange()
{
	bool enable = true;
	if (tablespace)
	{
		enable = txtComment->GetValue() != tablespace->GetComment()
		         || GetName() != tablespace->GetName()
		         || cbOwner->GetValue() != tablespace->GetOwner()
		         || dirtyVars;
		if (seclabelPage && connection->BackendMinimumVersion(9, 2))
			enable = enable || !(seclabelPage->GetSqlForSecLabels().IsEmpty());
	}
	else
	{
		wxString name = GetName();

		CheckValid(enable, !GetName().IsEmpty(), _("Please specify name."));
		CheckValid(enable, !txtLocation->GetValue().IsEmpty(), _("Please specify location."));
	}
	EnableOK(enable);
}
开发者ID:xiul,项目名称:pgadmin3,代码行数:21,代码来源:dlgTablespace.cpp


示例7: EnableOK

void dlgTextSearchParser::CheckChange()
{
	if (parser)
	{
		EnableOK(txtName->GetValue() != parser->GetName()
		         || cbSchema->GetValue() != parser->GetSchema()->GetName()
		         || txtComment->GetValue() != parser->GetComment());
	}
	else
	{
		wxString name = GetName();
		bool enable = true;
		CheckValid(enable, !name.IsEmpty(), _("Please specify name."));
		CheckValid(enable, cbStart->GetValue().Length() > 0 , _("Please select a start function."));
		CheckValid(enable, cbGetToken->GetValue().Length() > 0 , _("Please select a gettoken function."));
		CheckValid(enable, cbEnd->GetValue().Length() > 0 , _("Please select an end function."));
		CheckValid(enable, cbLextypes->GetValue().Length() > 0 , _("Please select a lextypes function."));

		EnableOK(enable);
	}
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:21,代码来源:dlgTextSearchParser.cpp


示例8: CheckValid

void dlgLanguage::CheckChange()
{
	bool enable = true;
	wxString name = cbName->GetValue();
	if (language)
	{
		enable = name != language->GetName()
		         || txtComment->GetValue() != language->GetComment()
		         || (connection->BackendMinimumVersion(8, 3) && cbOwner->GetValue() != language->GetOwner());
		if (seclabelPage && connection->BackendMinimumVersion(9, 1))
			enable = enable || !(seclabelPage->GetSqlForSecLabels().IsEmpty());
	}
	else
	{
		bool useTemplate = (cbName->FindString(name) >= 0);

		CheckValid(enable, !name.IsEmpty(), _("Please specify name."));
		CheckValid(enable, useTemplate || !cbHandler->GetValue().IsEmpty(), _("Please specify language handler."));
	}
	EnableOK(enable);
}
开发者ID:SokilV,项目名称:pgadmin3,代码行数:21,代码来源:dlgLanguage.cpp


示例9: EnableOK

void dlgRepPath::CheckChange()
{
	if (path)
	{
		EnableOK(txtConnInfo->GetValue() != path->GetConnInfo()
		         ||   StrToLong(txtConnRetry->GetValue()) != path->GetConnRetry());
	}
	else
	{
		bool enable = true;
		CheckValid(enable, cbServer->GetCount() > 0, _("No provider node without path definition left."));
		CheckValid(enable, cbServer->GetCurrentSelection() >= 0, _("Please select provider node."));

		wxString connInfo = txtConnInfo->GetValue();
		CheckValid(enable, connInfo.Find(wxT("host=")) >= 0, _("Please provide host in connect info."));
		CheckValid(enable, connInfo.Find(wxT("dbname=")) >= 0, _("Please provide dbname in connect info."));
		CheckValid(enable, connInfo.Find(wxT("user=")) >= 0, _("Please provide user in connect info."));

		EnableOK(enable);
	}
}
开发者ID:SokilV,项目名称:pgadmin3,代码行数:21,代码来源:dlgRepPath.cpp


示例10: EnableOK

void dlgRepCluster::CheckChange()
{
	if (cluster)
	{
		int sel = cbAdminNode->GetCurrentSelection();
		bool changed = (sel >= 0 && (long)cbAdminNode->wxEvtHandler::GetClientData() != cluster->GetAdminNodeID());

		EnableOK(changed || txtComment->GetValue() != cluster->GetComment());
	}
	else
	{
		size_t i;
		bool enable = true;

		CheckValid(enable, chkJoinCluster->GetValue() || (!createScript.IsEmpty()),
		           _("Slony-I creation scripts not available; only joining possible."));

		if (chkJoinCluster->GetValue())
			CheckValid(enable, !cbClusterName->GetValue().IsEmpty(), _("Please select a cluster name."));
		else
			CheckValid(enable, !txtClusterName->GetValue().IsEmpty(), _("Please specify name."));

		long nodeId = StrToLong(txtNodeID->GetValue());
		CheckValid(enable, nodeId > 0, _("Please specify local node ID."));
		for (i = 0 ; i < usedNodes.GetCount() && enable; i++)
			CheckValid(enable, nodeId != usedNodes[i], _("Node ID is already in use."));

		CheckValid(enable, !txtNodeName->GetValue().IsEmpty(), _("Please specify local node name."));

		txtAdminNodeName->Enable(nodeId != StrToLong(txtAdminNodeID->GetValue()));

		EnableOK(enable);
	}
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:34,代码来源:dlgRepCluster.cpp


示例11: PRECONDITION

//
/// Constructs a cursor object from the specified resource ID.
//
TCursor::TCursor(HINSTANCE instance, TResId resId)
{
  PRECONDITION(resId);
  Handle = ::LoadCursor(instance, resId);
  if(!Handle && instance != GetGlobalModule().GetHandle()){ // default load from OWL DLL
    Handle = GetGlobalModule().LoadCursor(resId);
    instance = GetGlobalModule().GetHandle();
  }
  ShouldDelete = (instance != 0);
  CheckValid();
  TRACEX(OwlGDI, OWL_CDLEVEL, "TCursor @" << (void*)this <<
    " loaded from resource " << resId);
}
开发者ID:Meridian59,项目名称:Meridian59,代码行数:16,代码来源:cursor.cpp


示例12: GetSqlForTypes

void dlgForeignTable::CheckChange()
{
	bool enable = true;
	if (foreigntable)
	{
		enable = txtComment->GetValue() != foreigntable->GetComment()
		         || cbSchema->GetValue() != foreigntable->GetSchema()->GetName()
		         || cbOwner->GetValue() != foreigntable->GetOwner()
		         || GetSqlForTypes() != wxEmptyString
		         || GetSql().Length() > 0;
		if (seclabelPage && connection->BackendMinimumVersion(9, 1))
			enable = enable || !(seclabelPage->GetSqlForSecLabels().IsEmpty());
	}
	else
	{
		wxString name = GetName();

		CheckValid(enable, !name.IsEmpty(), _("Please specify name."));
		CheckValid(enable, cbForeignServer->GetCurrentSelection() >= 0, _("Please specify a foreign server."));
	}
	EnableOK(enable);
}
开发者ID:aiht,项目名称:pgadmin3,代码行数:22,代码来源:dlgForeignTable.cpp


示例13: GetName

void dlgSchedule::CheckChange()
{
	timEnd->Enable(calEnd->GetValue().IsValid());

	wxString name = GetName();
	bool enable = true;

	if (statusBar)
		statusBar->SetStatusText(wxEmptyString);

	InitSelectAll();

	CheckValid(enable, !name.IsEmpty(), _("Please specify name."));
	CheckValid(enable, calStart->GetValue().IsValid(), _("Please specify start date."));

	if (enable)
	{
		EnableOK(!GetSql().IsEmpty());
	}
	else
		EnableOK(false);
}
开发者ID:aiht,项目名称:pgadmin3,代码行数:22,代码来源:dlgSchedule.cpp


示例14: GetName

void dlgView::CheckChange()
{
    bool enable = true;
    wxString name = GetName();

    CheckValid(enable, !name.IsEmpty(), _("Please specify name."));
    CheckValid(enable, txtSqlBox->GetText().Trim(true).Trim(false).Length() > 0 , _("Please enter function definition."));

    if(enable)
    {
        if (view)
            enable = txtComment->GetValue() != view->GetComment()
                     || txtSqlBox->GetText().Trim(true).Trim(false) != oldDefinition.Trim(true).Trim(false)
                     || cbOwner->GetValue() != view->GetOwner()
                     || cbSchema->GetValue() != view->GetSchema()->GetName()
                     || name != view->GetName();

        if (seclabelPage && connection->BackendMinimumVersion(9, 1))
            enable = enable || !(seclabelPage->GetSqlForSecLabels().IsEmpty());

        if (connection->BackendMinimumVersion(9, 2))
        {
            if (view)
            {
                if (chkSecurityBarrier->GetValue())
                    enable = enable || !(view->GetSecurityBarrier() == wxT("true"));
                else
                    enable = enable || (view->GetSecurityBarrier() == wxT("true"));
            }
            else
            {
                enable = enable || (chkSecurityBarrier->GetValue());
            }
        }
    }

    EnableOK(enable);
}
开发者ID:ubershmekel,项目名称:pgadmin3,代码行数:38,代码来源:dlgView.cpp


示例15: SetupNbLines

static int SetupNbLines(HEX_DUMP *hex_dump, int h)
{
  int htline, h_result ;

  htline                       = hex_dump->h_char + hex_dump->interline ;
  hex_dump->nb_lines_on_window = h / htline ;
  if ( hex_dump->nb_lines_on_window > hex_dump->total_nb_lines )
    hex_dump->nb_lines_on_window = hex_dump->total_nb_lines ;
  h_result = (int) (hex_dump->nb_lines_on_window * htline) ;

  CheckValid( hex_dump ) ;

  return( h_result ) ;
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:14,代码来源:HEXDUMP.C


示例16: realloc

CQuickBuildString& CQuickBuildString::operator=(char c)
{
	m_iLength = 1;
	realloc(iBlockSize); // Use iBlocksize instead of 2 as this will, in all probability, grow
	
	((int*)(m_szContent))[0] = c;
	// Above is Quick assignment cheat assigns word instead of this:
	//m_szContent[0] = c;
	//m_szContent[1] = 0;

	CheckValid();

	return *this;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:14,代码来源:QuickBuildString.cpp


示例17: CheckValid

void dlgSynonym::CheckChange()
{
	bool enable = true;
	CheckValid(enable, !txtName->GetValue().IsEmpty(), _("Please specify name."));
	CheckValid(enable, !cbTargetType->GetValue().IsEmpty(), _("Please select target type."));
	// Public Synonyms does supported in public only
	if (!synonymSchema && cbTargetType->GetValue() != _("Public synonym"))
		CheckValid(enable, !cbTargetSchema->GetValue().IsEmpty(), _("Please select target schema."));
	CheckValid(enable, !cbTargetObject->GetValue().IsEmpty(), _("Please select target object."));

	if (!enable)
	{
		EnableOK(enable);
		return;
	}

	if (synonym)
		EnableOK(synonym->GetTargetObject() != cbTargetObject->GetValue());
	else if (privSynonym)
		EnableOK(privSynonym->GetTargetObject() != cbTargetObject->GetValue());
	else
		EnableOK(txtName->GetValue() != wxEmptyString && cbTargetObject->GetValue() != wxEmptyString);
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:23,代码来源:dlgSynonym.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ CheckValidIndex函数代码示例发布时间:2022-05-30
下一篇:
C++ CheckUnique函数代码示例发布时间: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