本文整理汇总了C++中IsDefined函数的典型用法代码示例。如果您正苦于以下问题:C++ IsDefined函数的具体用法?C++ IsDefined怎么用?C++ IsDefined使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsDefined函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: OpenRequest
HINTERNET OpenRequest(LPCSTR lpszVerb, LPCSTR lpszObjectName,
LPCSTR lpszVersion, LPCSTR lpszReferer,
LPCSTR *lplpszAcceptTypes,
DWORD dwFlags,
DWORD_PTR dwContext) const {
assert(IsDefined());
return ::HttpOpenRequestA(Get(),
lpszVersion, lpszObjectName,
lpszVersion, lpszReferer,
lplpszAcceptTypes,
dwFlags,
dwContext);
}
开发者ID:joachimwieland,项目名称:xcsoar-jwieland,代码行数:14,代码来源:WinINet.hpp
示例2: GetScreenPosition
/**
* Returns the position on the screen.
*/
gcc_pure
const PixelRect GetScreenPosition() const
{
assert(IsDefined());
PixelRect rc;
#ifndef USE_WINUSER
rc = GetPosition();
ToScreen(rc);
#else
::GetWindowRect(hWnd, &rc);
#endif
return rc;
}
开发者ID:kwtskran,项目名称:XCSoar,代码行数:17,代码来源:Window.hpp
示例3: assert
//------------------------------------------------------------------------------
void
Canvas::Stretch(int dest_x, int dest_y,
unsigned dest_width, unsigned dest_height,
const Bitmap &_src)
{
#if 0
assert(IsDefined());
assert(_src.IsDefined());
ConstImageBuffer src = _src.GetNative();
Stretch(dest_x, dest_y, dest_width, dest_height,
src, 0, 0, src.width, src.height);
#endif
}
开发者ID:Exadios,项目名称:YCSoar,代码行数:15,代码来源:Canvas.cpp
示例4: assert
void
Canvas::Stretch(int dest_x, int dest_y,
unsigned dest_width, unsigned dest_height,
const Bitmap &src,
int src_x, int src_y,
unsigned src_width, unsigned src_height)
{
assert(IsDefined());
assert(src.IsDefined());
Stretch(dest_x, dest_y, dest_width, dest_height,
src.GetNative(),
src_x, src_y, src_width, src_height);
}
开发者ID:Advi42,项目名称:XCSoar,代码行数:14,代码来源:Canvas.cpp
示例5: assert
bool
FileDescriptor::CreateEventFD(unsigned initval)
{
assert(!IsDefined());
#ifdef __BIONIC__
/* Bionic provides the eventfd() function only since Android 2.3,
therefore we must roll our own system call here */
fd = syscall(__NR_eventfd2, initval, O_NONBLOCK|O_CLOEXEC);
#else
fd = ::eventfd(initval, EFD_NONBLOCK|EFD_CLOEXEC);
#endif
return fd >= 0;
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:14,代码来源:FileDescriptor.cpp
示例6: assert
void
Canvas::Stretch(PixelScalar dest_x, PixelScalar dest_y,
UPixelScalar dest_width, UPixelScalar dest_height,
const Bitmap &src,
PixelScalar src_x, PixelScalar src_y,
UPixelScalar src_width, UPixelScalar src_height,
DWORD dwRop)
{
assert(IsDefined());
assert(src.IsDefined());
Stretch(dest_x, dest_y, dest_width, dest_height,
src.GetNative(), src_x, src_y, src_width, src_height,
dwRop);
}
开发者ID:mobotics,项目名称:XCSoar,代码行数:15,代码来源:Canvas.cpp
示例7: assert
void
Pen::Reset()
{
assert(!IsDefined() || IsScreenInitialized());
if (pen != NULL) {
#ifndef NDEBUG
bool success =
#endif
::DeleteObject(pen);
assert(success);
pen = NULL;
}
}
开发者ID:DRIZO,项目名称:xcsoar,代码行数:15,代码来源:Pen.cpp
示例8: assert
bool
IOThread::Start()
{
assert(!IsDefined());
assert(loop.IsEmpty());
quit = false;
if (!pipe.Create())
return false;
loop.Add(pipe.GetReadFD(), READ, *this);
return Thread::Start();
}
开发者ID:DRIZO,项目名称:xcsoar,代码行数:15,代码来源:IOThread.cpp
示例9: assert
bool
IOThread::Start()
{
assert(!IsDefined());
assert(files.empty());
modified = quit = running = false;
if (!pipe.Create())
return false;
poll.SetMask(pipe.GetReadFD(), Poll::READ);
return Thread::Start();
}
开发者ID:StefanL74,项目名称:XCSoar,代码行数:15,代码来源:IOThread.cpp
示例10: assert
void
DockWindow::SetWidget(Widget *_widget)
{
assert(IsDefined());
assert(widget == nullptr);
widget = _widget;
if (widget != nullptr) {
const PixelRect rc = GetClientRect();
widget->Initialise(*this, rc);
widget->Prepare(*this, rc);
widget->Show(rc);
}
}
开发者ID:Advi42,项目名称:XCSoar,代码行数:15,代码来源:DockWindow.cpp
示例11: assert
void
Thread::Join()
{
assert(IsDefined());
assert(!IsInside());
#ifdef HAVE_POSIX
pthread_join(handle, NULL);
defined = false;
#else
::WaitForSingleObject(handle, INFINITE);
::CloseHandle(handle);
handle = NULL;
#endif
}
开发者ID:joachimwieland,项目名称:xcsoar-jwieland,代码行数:15,代码来源:Thread.cpp
示例12: GetSize
gcc_pure
const PixelSize GetSize() const
{
assert(IsDefined());
#ifdef USE_GDI
PixelRect rc = GetClientRect();
PixelSize s;
s.cx = rc.right;
s.cy = rc.bottom;
return s;
#else
return size;
#endif
}
开发者ID:Adrien81,项目名称:XCSoar,代码行数:15,代码来源:Window.hpp
示例13: assert
void
Brush::Reset()
{
assert(!IsDefined() || IsScreenInitialized());
if (brush != nullptr) {
#ifndef NDEBUG
bool success =
#endif
::DeleteObject(brush);
assert(success);
brush = nullptr;
}
}
开发者ID:Adrien81,项目名称:XCSoar,代码行数:15,代码来源:Brush.cpp
示例14: assert
void
StandbyThread::WaitStopped()
{
assert(!IsInside());
assert(mutex.IsLockedByCurrent());
assert(stop);
if (!IsDefined())
/* was never started */
return;
/* mutex must be unlocked because Thread::Join() blocks */
const ScopeUnlock unlock(mutex);
Thread::Join();
}
开发者ID:Turbo87,项目名称:XCSoar-TE,代码行数:15,代码来源:StandbyThread.cpp
示例15: assert
void
Canvas::Copy(int dest_x, int dest_y,
unsigned dest_width, unsigned dest_height,
HBITMAP src, int src_x, int src_y,
DWORD dwRop)
{
assert(IsDefined());
assert(src != nullptr);
HDC virtual_dc = GetCompatibleDC();
HBITMAP old = (HBITMAP)::SelectObject(virtual_dc, src);
Copy(dest_x, dest_y, dest_width, dest_height,
virtual_dc, src_x, src_y,
dwRop);
::SelectObject(virtual_dc, old);
}
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:16,代码来源:Canvas.cpp
示例16: assert
void
BufferCanvas::CopyTo(Canvas &other)
{
assert(IsDefined());
assert(!active || frame_buffer != nullptr);
#ifdef USE_GLSL
OpenGL::texture_shader->Use();
#else
const GLEnable<GL_TEXTURE_2D> scope;
OpenGL::glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
#endif
texture->Bind();
texture->DrawFlipped(other.GetRect(), GetRect());
}
开发者ID:kwtskran,项目名称:XCSoar,代码行数:16,代码来源:BufferCanvas.cpp
示例17: IsInRegion
bool RegionOfRows::IsInRegion(unsigned int Column,unsigned int Row)const
{
if (!IsDefined()) return false; // Can't process an empty region
// In range of rows ?
if (!Rows.IsInRange(Row)) return false; // Row is out of range
// Row is in range, investigate the columns
unsigned int RowOffset = Row - Rows.GetStart();
// Column is in range ?
return Columns[RowOffset].IsInRange(Column);
}
开发者ID:ACAVJW4H,项目名称:Pedestrian_Counter,代码行数:16,代码来源:RegionOfRows.cpp
示例18: assert
WndProperty *
RowFormWidget::AddSpacer()
{
assert(IsDefined());
const PixelRect edit_rc = InitialControlRect(Layout::Scale(6));
WindowStyle style;
EditWindowStyle edit_style;
edit_style.SetVerticalCenter();
edit_style.SetReadOnly();
PanelControl &panel = *(PanelControl *)GetWindow();
WndProperty *edit = new WndProperty(panel, look, _T(""), edit_rc, 0, style, edit_style, NULL);
Add(edit);
return edit;
}
开发者ID:damianob,项目名称:xcsoar,代码行数:17,代码来源:RowFormWidget.cpp
示例19: GetNumberOfColumnsOnLargestRow
unsigned int RegionOfRows::GetNumberOfColumnsOnLargestRow() const
{
if (!IsDefined()) return 0;
unsigned int MaximumNumberofColumns = 0;
const ClosedInterval<unsigned int>* MyColumns = GetColumns();
unsigned int NumberOfRows = Rows.GetSpan() + 1;
for (unsigned int i=0; i < NumberOfRows;++i)
{
unsigned int ColumnsOnRow = MyColumns->GetSpan() + 1;
if (ColumnsOnRow > MaximumNumberofColumns) MaximumNumberofColumns = ColumnsOnRow;
MyColumns++;
}
return MaximumNumberofColumns;
}
开发者ID:ACAVJW4H,项目名称:Pedestrian_Counter,代码行数:17,代码来源:RegionOfRows.cpp
示例20: GetPageMainIndex
void
TabMenuDisplay::SetCursor(unsigned i)
{
if (i == cursor)
return;
if (IsDefined()) {
if (SupportsPartialRedraw() &&
GetPageMainIndex(cursor) == GetPageMainIndex(i)) {
Invalidate(GetSubMenuButtonSize(cursor));
Invalidate(GetSubMenuButtonSize(i));
} else
Invalidate();
}
cursor = i;
}
开发者ID:ppara,项目名称:XCSoar,代码行数:17,代码来源:TabMenuDisplay.cpp
注:本文中的IsDefined函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论