本文整理汇总了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);
}
}
示例2: CheckValid
void nuiSprite::DelMatrixNode(uint32 index)
{
if (!mpMatrixNodes)
return;
CheckValid();
mpMatrixNodes->at(index)->Release();
mpMatrixNodes->erase(mpMatrixNodes->begin() + index);
DebugRefreshInfo();
}
示例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 << ".");
}
示例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();
}
示例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;
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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 ) ;
}