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


C++ SBStringList::AppendList方法代码示例

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


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

示例1: GetCommandLineCommands

bool SBBreakpointName::GetCommandLineCommands(SBStringList &commands) {
  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
  
  BreakpointName *bp_name = GetBreakpointName();
  if (!bp_name)
    return false;
 
  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
  StringList command_list;
  bool has_commands =
      bp_name->GetOptions().GetCommandLineCallbacks(command_list);
  if (has_commands)
    commands.AppendList(command_list);
  return has_commands;
}
开发者ID:derekmarcotte,项目名称:freebsd,代码行数:15,代码来源:SBBreakpointName.cpp

示例2: temp_list

int
SBCommandInterpreter::HandleCompletion (const char *current_line,
                                        const char *cursor,
                                        const char *last_char,
                                        int match_start_point,
                                        int max_return_elements,
                                        SBStringList &matches)
{
    Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
    int num_completions = 0;

    // Sanity check the arguments that are passed in:
    // cursor & last_char have to be within the current_line.
    if (current_line == nullptr || cursor == nullptr || last_char == nullptr)
        return 0;

    if (cursor < current_line || last_char < current_line)
        return 0;

    size_t current_line_size = strlen (current_line);
    if (cursor - current_line > static_cast<ptrdiff_t>(current_line_size) ||
        last_char - current_line > static_cast<ptrdiff_t>(current_line_size))
        return 0;

    if (log)
        log->Printf ("SBCommandInterpreter(%p)::HandleCompletion (current_line=\"%s\", cursor at: %" PRId64 ", last char at: %" PRId64 ", match_start_point: %d, max_return_elements: %d)",
                     static_cast<void*>(m_opaque_ptr), current_line,
                     static_cast<uint64_t>(cursor - current_line),
                     static_cast<uint64_t>(last_char - current_line),
                     match_start_point, max_return_elements);

    if (IsValid())
    {
        lldb_private::StringList lldb_matches;
        num_completions = m_opaque_ptr->HandleCompletion(current_line, cursor, last_char, match_start_point,
                                                         max_return_elements, lldb_matches);

        SBStringList temp_list (&lldb_matches);
        matches.AppendList (temp_list);
    }
    if (log)
        log->Printf ("SBCommandInterpreter(%p)::HandleCompletion - Found %d completions.",
                     static_cast<void*>(m_opaque_ptr), num_completions);

    return num_completions;
}
开发者ID:cadets,项目名称:lldb,代码行数:46,代码来源:SBCommandInterpreter.cpp

示例3: temp_list

int
SBCommandInterpreter::HandleCompletion (const char *current_line,
                                        const char *cursor,
                                        const char *last_char,
                                        int match_start_point,
                                        int max_return_elements,
                                        SBStringList &matches)
{
    int num_completions = 0;
    if (m_opaque_ptr)
    {
        lldb_private::StringList lldb_matches;
        num_completions =  m_opaque_ptr->HandleCompletion (current_line, cursor, last_char, match_start_point,
                                                           max_return_elements, lldb_matches);

        SBStringList temp_list (&lldb_matches);
        matches.AppendList (temp_list);
    }
    return num_completions;
}
开发者ID:ice799,项目名称:lldb,代码行数:20,代码来源:SBCommandInterpreter.cpp


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