当前位置: 首页>>代码示例>>C++>>正文


C++ IsDefined函数代码示例

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


在下文中一共展示了IsDefined函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


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