當前位置: 首頁>>代碼示例>>C++>>正文


C++ CheckValid函數代碼示例

本文整理匯總了C++中CheckValid函數的典型用法代碼示例。如果您正苦於以下問題:C++ CheckValid函數的具體用法?C++ CheckValid怎麽用?C++ CheckValid使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CheckValid函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的CheckValid函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。