RowCollection
概述
RowCollection 是 Aspose.Slides FOSS for C++ 中的一个类。
表示表中行的集合。
此类提供 21 种方法,用于在 C++ 程序中处理 RowCollection 对象。可用的方法包括:RowCollection、add、add_clone、as_i_collection、as_i_enumerable、begin、clear、const_iterator、end、init_internal、insert_clone、iterator,以及另外 4 种方法。安装 Aspose.Slides FOSS for C++ 包后,所有公共成员对任何 C++ 应用程序均可访问。属性:const_iterator、iterator。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
iterator | iterator | 读取 | 获取迭代器。 |
const_iterator | const_iterator | 读取 | 获取 const 迭代器。 |
方法
| 签名 | 描述 |
|---|---|
iterator() → iterator | 属性提供对集合的迭代器类型的访问 |
iterator() → iterator | |
const_iterator() → const_iterator | 返回指向行集合开头的 const 迭代器 |
const_iterator() → const_iterator | |
RowCollection() | |
~RowCollection() | |
init_internal(tbl_element: pugi::xml_node, save_callback: std::function<void()>, slide_part: Internal::pptx::SlidePart, parent_slide: IBaseSlide, table: Table) | 从 XML 元素初始化集合。解析所有 子元素并创建相应的 Row 对象。 |
rebuild() | 从已存储的 XML 元素重新构建 rows 列表。清除现有 rows 并重新解析所有 子元素。 |
size() → std::size_t | 返回行数。 |
add(row: std::unique_ptr<Row>) → Row | 向集合中添加一行。 |
add_clone(templ: Row, with_attached_rows: bool) → std::vector<Row*> | 克隆给定的模板行并将其追加到末尾。 |
insert_clone(index: std::size_t, templ: Row, with_attached_rows: bool) → std::vector<Row*> | 克隆给定的模板行并将其插入到指定索引处。 |
remove_at(first_row_index: std::size_t, with_attached_rows: bool) | 删除给定索引处的行。 |
remove_at(index: std::size_t) | 删除给定索引处的行。 |
clear() | 删除所有行。 |
as_i_collection() → std::vector<Row*> | 返回行的快照,以原始指针形式。 |
as_i_enumerable() → std::vector<Row*> | 返回行的快照,作为原始指针(同 as_i_collection)。 |
begin() → iterator | |
end() → iterator | |
begin() → const_iterator | |
end() → const_iterator |