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


C++ LibraryView类代码示例

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


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

示例1: lock

void WLibrary::search(const QString& name) {
    QMutexLocker lock(&m_mutex);
    QWidget* current = currentWidget();
    LibraryView* view = dynamic_cast<LibraryView*>(current);
    lock.unlock();
    view->onSearch(name);
}
开发者ID:AlbanBedel,项目名称:mixxx,代码行数:7,代码来源:wlibrary.cpp

示例2: crazy_library_open_in_zip_file

crazy_status_t crazy_library_open_in_zip_file(crazy_library_t** library,
                                              const char* zipfile_name,
                                              const char* lib_name,
                                              crazy_context_t* context) {
  ScopedDelayedCallbackPoster poster(context);
  ScopedGlobalLock lock;

  LibraryView* wrap =
      crazy::Globals::GetLibraries()->LoadLibraryInZipFile(
          zipfile_name,
          lib_name,
          RTLD_NOW,
          context->load_address,
          &context->search_paths,
          false,
          &context->error);

  if (!wrap)
    return CRAZY_STATUS_FAILURE;

  if (context->java_vm != NULL && wrap->IsCrazy()) {
    crazy::SharedLibrary* lib = wrap->GetCrazy();
    if (!lib->SetJavaVM(
             context->java_vm, context->minimum_jni_version, &context->error)) {
      crazy::Globals::GetLibraries()->UnloadLibrary(wrap);
      return CRAZY_STATUS_FAILURE;
    }
  }

  *library = reinterpret_cast<crazy_library_t*>(wrap);
  return CRAZY_STATUS_SUCCESS;
}
开发者ID:krunalsoni01,项目名称:src,代码行数:32,代码来源:crazy_linker_api.cpp

示例3: GetBaseNamePtr

LibraryView* LibraryList::FindKnownLibrary(const char* name) {
  const char* base_name = GetBaseNamePtr(name);
  for (size_t n = 0; n < known_libraries_.GetCount(); ++n) {
    LibraryView* wrap = known_libraries_[n];
    if (!strcmp(base_name, wrap->GetName()))
      return wrap;
  }
  return NULL;
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例4: crazy_library_find_symbol

crazy_status_t crazy_library_find_symbol(crazy_library_t* library,
                                         const char* symbol_name,
                                         void** symbol_address) {
  LibraryView* wrap = reinterpret_cast<LibraryView*>(library);

  // TODO(digit): Handle NULL symbols properly.
  *symbol_address = wrap->LookupSymbol(symbol_name);
  return (*symbol_address == NULL) ? CRAZY_STATUS_FAILURE
                                   : CRAZY_STATUS_SUCCESS;
}
开发者ID:krunalsoni01,项目名称:src,代码行数:10,代码来源:crazy_linker_api.cpp

示例5: slotLoadSelectedTrackToGroup

void LibraryControl::slotLoadSelectedTrackToGroup(QString group, bool play) {
    if (m_pLibraryWidget == NULL) {
        return;
    }

    LibraryView* activeView = m_pLibraryWidget->getActiveView();
    if (!activeView) {
        return;
    }
    activeView->loadSelectedTrackToGroup(group, play);
}
开发者ID:Gussss,项目名称:mixxx,代码行数:11,代码来源:librarycontrol.cpp

示例6: FindLibraryByName

LibraryView* LibraryList::FindLibraryByName(const char* base_name) {
  // Sanity check.
  if (!base_name || strchr(base_name, '/'))
    return NULL;

  for (size_t n = 0; n < known_libraries_.GetCount(); ++n) {
    LibraryView* wrap = known_libraries_[n];
    if (!strcmp(base_name, wrap->GetName()))
      return wrap;
  }
  return NULL;
}
开发者ID:,项目名称:,代码行数:12,代码来源:

示例7: slotSelectTrackKnob

void LibraryControl::slotSelectTrackKnob(double v) {
    if (m_pLibraryWidget == NULL) {
        return;
    }

    int i = (int)v;

    LibraryView* activeView = m_pLibraryWidget->getActiveView();
    if (!activeView) {
        return;
    }
    activeView->moveSelection(i);
}
开发者ID:Gussss,项目名称:mixxx,代码行数:13,代码来源:librarycontrol.cpp

示例8: slotSelectPrevTrack

void LibraryControl::slotSelectPrevTrack(double v) {
    if (m_pLibraryWidget == NULL) {
        return;
    }

    if (v > 0) {
        LibraryView* activeView = m_pLibraryWidget->getActiveView();
        if (!activeView) {
            return;
        }
        activeView->moveSelection(-1);
    }
}
开发者ID:Gussss,项目名称:mixxx,代码行数:13,代码来源:librarycontrol.cpp

示例9: slotLoadSelectedIntoFirstStopped

void LibraryControl::slotLoadSelectedIntoFirstStopped(double v) {
    if (m_pLibraryWidget == NULL) {
        return;
    }

    if (v > 0) {
        LibraryView* activeView = m_pLibraryWidget->getActiveView();
        if (!activeView) {
            return;
        }
        activeView->loadSelectedTrack();
    }
}
开发者ID:Gussss,项目名称:mixxx,代码行数:13,代码来源:librarycontrol.cpp

示例10: crazy_library_find_from_address

crazy_status_t crazy_library_find_from_address(void* address,
                                               crazy_library_t** library) {
  {
    ScopedGlobalLock lock;
    LibraryView* wrap = Globals::GetLibraries()->FindLibraryForAddress(address);
    if (!wrap)
      return CRAZY_STATUS_FAILURE;

    wrap->AddRef();

    *library = reinterpret_cast<crazy_library_t*>(wrap);
    return CRAZY_STATUS_SUCCESS;
  }
}
开发者ID:krunalsoni01,项目名称:src,代码行数:14,代码来源:crazy_linker_api.cpp

示例11: crazy_library_find_by_name

crazy_status_t crazy_library_find_by_name(const char* library_name,
                                          crazy_library_t** library) {
  {
    ScopedGlobalLock lock;
    LibraryView* wrap =
        Globals::GetLibraries()->FindLibraryByName(library_name);
    if (!wrap)
      return CRAZY_STATUS_FAILURE;

    wrap->AddRef();
    *library = reinterpret_cast<crazy_library_t*>(wrap);
  }
  return CRAZY_STATUS_SUCCESS;
}
开发者ID:krunalsoni01,项目名称:src,代码行数:14,代码来源:crazy_linker_api.cpp

示例12: FindLibraryForAddress

LibraryView* LibraryList::FindLibraryForAddress(void* address) {
  // Linearly scan all libraries, looking for one that contains
  // a given address. NOTE: This doesn't check that this falls
  // inside one of the mapped library segments.
  for (size_t n = 0; n < known_libraries_.GetCount(); ++n) {
    LibraryView* wrap = known_libraries_[n];
    // TODO(digit): Search addresses inside system libraries.
    if (wrap->IsCrazy()) {
      SharedLibrary* lib = wrap->GetCrazy();
      if (lib->ContainsAddress(address))
        return wrap;
    }
  }
  return NULL;
}
开发者ID:,项目名称:,代码行数:15,代码来源:

示例13: crazy_library_use_shared_relro

crazy_status_t crazy_library_use_shared_relro(crazy_library_t* library,
                                              crazy_context_t* context,
                                              size_t relro_start,
                                              size_t relro_size,
                                              int relro_fd) {
  LibraryView* wrap = reinterpret_cast<LibraryView*>(library);

  if (!library || !wrap->IsCrazy()) {
    context->error = "Invalid library file handle";
    return CRAZY_STATUS_FAILURE;
  }

  crazy::SharedLibrary* lib = wrap->GetCrazy();
  if (!lib->UseSharedRelro(relro_start, relro_size, relro_fd, &context->error))
    return CRAZY_STATUS_FAILURE;

  return CRAZY_STATUS_SUCCESS;
}
开发者ID:krunalsoni01,项目名称:src,代码行数:18,代码来源:crazy_linker_api.cpp

示例14: crazy_library_get_info

crazy_status_t crazy_library_get_info(crazy_library_t* library,
                                      crazy_context_t* context,
                                      crazy_library_info_t* info) {
  if (!library) {
    context->error = "Invalid library file handle";
    return CRAZY_STATUS_FAILURE;
  }

  LibraryView* wrap = reinterpret_cast<LibraryView*>(library);
  if (!wrap->GetInfo(&info->load_address,
                     &info->load_size,
                     &info->relro_start,
                     &info->relro_size,
                     &context->error)) {
    return CRAZY_STATUS_FAILURE;
  }

  return CRAZY_STATUS_SUCCESS;
}
开发者ID:krunalsoni01,项目名称:src,代码行数:19,代码来源:crazy_linker_api.cpp

示例15: while

void* LibraryList::FindSymbolFrom(const char* symbol_name, LibraryView* from) {
  SymbolLookupState lookup_state;

  if (!from)
    return NULL;

  // Use a work-queue and a set to ensure to perform a breadth-first
  // search.
  Vector<LibraryView*> work_queue;
  Set<LibraryView*> visited_set;

  work_queue.PushBack(from);

  while (!work_queue.IsEmpty()) {
    LibraryView* lib = work_queue.PopFirst();
    if (lib->IsCrazy()) {
      if (lookup_state.CheckSymbol(symbol_name, lib->GetCrazy()))
        return lookup_state.found_addr;
    } else if (lib->IsSystem()) {
      // TODO(digit): Support weak symbols in system libraries.
      // With the current code, all symbols in system libraries
      // are assumed to be non-weak.
      void* addr = lib->LookupSymbol(symbol_name);
      if (addr)
        return addr;
    }

    // If this is a crazy library, add non-visited dependencies
    // to the work queue.
    if (lib->IsCrazy()) {
      SharedLibrary::DependencyIterator iter(lib->GetCrazy());
      while (iter.GetNext()) {
        LibraryView* dependency = FindKnownLibrary(iter.GetName());
        if (dependency && !visited_set.Has(dependency)) {
          work_queue.PushBack(dependency);
          visited_set.Add(dependency);
        }
      }
    }
  }

  if (lookup_state.weak_count >= 1) {
    // There was at least a single weak symbol definition, so use
    // the first one found in breadth-first search order.
    return lookup_state.weak_addr;
  }

  // There was no symbol definition.
  return NULL;
}
开发者ID:,项目名称:,代码行数:50,代码来源:


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