Schema-bearing column store aligned with a PointSet's point rows. 更多...
#include <AttributeTable.h>
Public 成员函数 | |
| std::size_t | rowCount () const noexcept |
| Return the number of aligned point rows. | |
| void | resize (std::size_t rows) |
| Resize every column to the same row count. | |
| std::size_t | appendRow () |
| Append one empty row and return its stable row index. | |
| Result< std::size_t > | appendRowFrom (const AttributeTable &source, std::size_t sourceRow) |
| Append one row copied from another table, merging compatible schema columns. | |
| Result< void > | clearRow (std::size_t row) |
| Clear every value in one row while preserving the table schema. | |
| void | clear () noexcept |
| Remove all rows and schema columns. | |
| std::size_t | columnCount () const noexcept |
| Return the number of declared columns. | |
| std::string_view | columnName (std::size_t index) const noexcept |
| Return a stable insertion-ordered column name or an empty string. | |
| std::optional< ProcgenAttributeType > | typeOf (std::string_view name) const |
| Return the declared type for a name, or no value when absent. | |
| bool | has (std::size_t row, std::string_view name) const |
| Return whether a row contains a value in the named column. | |
| Result< void > | renameColumn (std::string_view from, std::string_view to) |
| Rename one metadata column without changing values or type. | |
| Result< void > | removeColumn (std::string_view name) |
| Remove one metadata column and its values from every row. | |
| Result< void > | copyColumn (std::string_view from, std::string_view to) |
| Copy one typed column onto another name, creating or overwriting a compatible target. | |
| Result< void > | setFloat (std::size_t row, std::string_view name, float value) |
| Set a float value, rejecting an incompatible existing schema. | |
| Result< void > | setInt (std::size_t row, std::string_view name, std::int64_t value) |
| Set an integer value, rejecting an incompatible existing schema. | |
| Result< void > | setBool (std::size_t row, std::string_view name, bool value) |
| Set a Boolean value, rejecting an incompatible existing schema. | |
| Result< void > | setVector (std::size_t row, std::string_view name, ProcgenAttributeVector value) |
| Set a vector value, rejecting an incompatible existing schema. | |
| Result< void > | setString (std::size_t row, std::string_view name, std::string value) |
| Set a string value, rejecting an incompatible existing schema. | |
| std::optional< float > | getFloat (std::size_t row, std::string_view name) const |
| Read a float value, or no value for an absent row, name, or type. | |
| std::optional< std::int64_t > | getInt (std::size_t row, std::string_view name) const |
| Read an integer value, or no value for an absent row, name, or type. | |
| std::optional< bool > | getBool (std::size_t row, std::string_view name) const |
| Read a Boolean value, or no value for an absent row, name, or type. | |
| std::optional< ProcgenAttributeVector > | getVector (std::size_t row, std::string_view name) const |
| Read a vector value, or no value for an absent row, name, or type. | |
| std::optional< std::string_view > | getString (std::size_t row, std::string_view name) const |
| Borrow a string value until the next table mutation, or return no value. | |
详细描述
Schema-bearing column store aligned with a PointSet's point rows.
Attribute names are interned once per table and each name owns exactly one typed column. Missing values occupy an empty optional slot instead of allocating a map per point. The table is an owning value, is not thread-safe for mutation, and invalidates borrowed column storage after any schema or row-count mutation.
在文件 AttributeTable.h 第 33 行定义.
成员函数说明
◆ appendRow()
| std::size_t eve::procgen::AttributeTable::appendRow | ( | ) |
Append one empty row and return its stable row index.
在文件 AttributeTable.cpp 第 16 行定义.
引用了 resize().
被这些函数引用 eve::procgen::PointSet::appendPoint() , 以及 appendRowFrom().
◆ appendRowFrom()
| Result< std::size_t > eve::procgen::AttributeTable::appendRowFrom | ( | const AttributeTable & | source, |
| std::size_t | sourceRow | ||
| ) |
Append one row copied from another table, merging compatible schema columns.
- 参数
-
source Owning source table; may be this table. sourceRow Row to copy.
- 返回
- New row index, or InvalidArgument/TypeMismatch without mutating this table.
在文件 AttributeTable.cpp 第 21 行定义.
引用了 appendRow(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, name, source, eve::Result< T >::success() , 以及 eve::TypeMismatch.
◆ clear()
|
noexcept |
Remove all rows and schema columns.
在文件 AttributeTable.cpp 第 59 行定义.
被这些函数引用 eve::procgen::PointSet::clear().
◆ clearRow()
| Result< void > eve::procgen::AttributeTable::clearRow | ( | std::size_t | row | ) |
Clear every value in one row while preserving the table schema.
在文件 AttributeTable.cpp 第 53 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Result< T >::success() , 以及 values.
◆ columnCount()
|
noexcept |
Return the number of declared columns.
在文件 AttributeTable.cpp 第 64 行定义.
◆ columnName()
|
noexcept |
Return a stable insertion-ordered column name or an empty string.
在文件 AttributeTable.cpp 第 65 行定义.
引用了 index.
被这些函数引用 eve::procgen::copyPointsToTargets().
◆ copyColumn()
| Result< void > eve::procgen::AttributeTable::copyColumn | ( | std::string_view | from, |
| std::string_view | to | ||
| ) |
Copy one typed column onto another name, creating or overwriting a compatible target.
- 返回
- Success, NotFound when
fromis absent, TypeMismatch whentoexists with another type, or InvalidArgument for empty /$-prefixed names.
在文件 AttributeTable.cpp 第 128 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), from, eve::InvalidArgument, eve::NotFound, source, eve::Result< T >::success() , 以及 to.
◆ getBool()
| std::optional< bool > eve::procgen::AttributeTable::getBool | ( | std::size_t | row, |
| std::string_view | name | ||
| ) | const |
Read a Boolean value, or no value for an absent row, name, or type.
在文件 AttributeTable.cpp 第 232 行定义.
引用了 eve::procgen::Bool , 以及 name.
被这些函数引用 eve::procgen::copyPointsToTargets(), eve::procgen::filterPointBoolAttribute(), eve::procgen::PointSet::getBoolAttribute() , 以及 eve::procgen::PointSet::hasBoolAttribute().
◆ getFloat()
| std::optional< float > eve::procgen::AttributeTable::getFloat | ( | std::size_t | row, |
| std::string_view | name | ||
| ) | const |
Read a float value, or no value for an absent row, name, or type.
在文件 AttributeTable.cpp 第 226 行定义.
引用了 eve::procgen::Float , 以及 name.
被这些函数引用 eve::procgen::copyPointsToTargets(), eve::procgen::filterPointFloatAttribute(), eve::procgen::PointSet::getFloatAttribute() , 以及 eve::procgen::PointSet::hasFloatAttribute().
◆ getInt()
| std::optional< std::int64_t > eve::procgen::AttributeTable::getInt | ( | std::size_t | row, |
| std::string_view | name | ||
| ) | const |
Read an integer value, or no value for an absent row, name, or type.
在文件 AttributeTable.cpp 第 229 行定义.
引用了 eve::procgen::Int , 以及 name.
被这些函数引用 eve::procgen::copyPointsToTargets(), eve::procgen::filterPointIntAttribute(), eve::procgen::PointSet::getIntAttribute() , 以及 eve::procgen::PointSet::hasIntAttribute().
◆ getString()
| std::optional< std::string_view > eve::procgen::AttributeTable::getString | ( | std::size_t | row, |
| std::string_view | name | ||
| ) | const |
Borrow a string value until the next table mutation, or return no value.
在文件 AttributeTable.cpp 第 238 行定义.
引用了 found, name, eve::procgen::String , 以及 value.
被这些函数引用 eve::procgen::copyPointsToTargets(), eve::procgen::filterPointStringAttribute(), eve::procgen::PointSet::getStringAttribute() , 以及 eve::procgen::PointSet::hasStringAttribute().
◆ getVector()
| std::optional< ProcgenAttributeVector > eve::procgen::AttributeTable::getVector | ( | std::size_t | row, |
| std::string_view | name | ||
| ) | const |
Read a vector value, or no value for an absent row, name, or type.
在文件 AttributeTable.cpp 第 235 行定义.
引用了 name , 以及 eve::procgen::Vector.
被这些函数引用 eve::procgen::copyPointsToTargets(), eve::procgen::PointSet::getVectorAttributeX(), eve::procgen::PointSet::getVectorAttributeY(), eve::procgen::PointSet::getVectorAttributeZ() , 以及 eve::procgen::PointSet::hasVectorAttribute().
◆ has()
| bool eve::procgen::AttributeTable::has | ( | std::size_t | row, |
| std::string_view | name | ||
| ) | const |
Return whether a row contains a value in the named column.
在文件 AttributeTable.cpp 第 72 行定义.
被这些函数引用 eve::procgen::copyPointAttribute(), eve::procgen::copyPointsToTargets() , 以及 eve::procgen::PointSet::getAttributeType().
◆ removeColumn()
| Result< void > eve::procgen::AttributeTable::removeColumn | ( | std::string_view | name | ) |
Remove one metadata column and its values from every row.
- 返回
- Success, NotFound when absent, or InvalidArgument for empty /
$-prefixed names.
在文件 AttributeTable.cpp 第 111 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, key, name, eve::NotFound , 以及 eve::Result< T >::success().
◆ renameColumn()
| Result< void > eve::procgen::AttributeTable::renameColumn | ( | std::string_view | from, |
| std::string_view | to | ||
| ) |
Rename one metadata column without changing values or type.
- 返回
- Success, NotFound when
fromis absent, AlreadyExists whentocollides, or InvalidArgument for empty /$-prefixed names.
在文件 AttributeTable.cpp 第 78 行定义.
引用了 eve::AlreadyExists, eve::Diagnostic::error(), eve::Result< T >::failure(), from, eve::InvalidArgument, name, eve::NotFound, source, eve::Result< T >::success() , 以及 to.
◆ resize()
| void eve::procgen::AttributeTable::resize | ( | std::size_t | rows | ) |
Resize every column to the same row count.
在文件 AttributeTable.cpp 第 12 行定义.
被这些函数引用 eve::procgen::PointSet::appendPointFrom() , 以及 appendRow().
◆ rowCount()
|
noexcept |
Return the number of aligned point rows.
在文件 AttributeTable.cpp 第 11 行定义.
◆ setBool()
| Result< void > eve::procgen::AttributeTable::setBool | ( | std::size_t | row, |
| std::string_view | name, | ||
| bool | value | ||
| ) |
Set a Boolean value, rejecting an incompatible existing schema.
在文件 AttributeTable.cpp 第 217 行定义.
引用了 eve::procgen::Bool, name , 以及 value.
◆ setFloat()
| Result< void > eve::procgen::AttributeTable::setFloat | ( | std::size_t | row, |
| std::string_view | name, | ||
| float | value | ||
| ) |
Set a float value, rejecting an incompatible existing schema.
在文件 AttributeTable.cpp 第 211 行定义.
引用了 eve::procgen::Float, name , 以及 value.
◆ setInt()
| Result< void > eve::procgen::AttributeTable::setInt | ( | std::size_t | row, |
| std::string_view | name, | ||
| std::int64_t | value | ||
| ) |
Set an integer value, rejecting an incompatible existing schema.
在文件 AttributeTable.cpp 第 214 行定义.
引用了 eve::procgen::Int, name , 以及 value.
◆ setString()
| Result< void > eve::procgen::AttributeTable::setString | ( | std::size_t | row, |
| std::string_view | name, | ||
| std::string | value | ||
| ) |
Set a string value, rejecting an incompatible existing schema.
在文件 AttributeTable.cpp 第 223 行定义.
引用了 name, eve::procgen::String , 以及 value.
◆ setVector()
| Result< void > eve::procgen::AttributeTable::setVector | ( | std::size_t | row, |
| std::string_view | name, | ||
| ProcgenAttributeVector | value | ||
| ) |
Set a vector value, rejecting an incompatible existing schema.
在文件 AttributeTable.cpp 第 220 行定义.
引用了 name, value , 以及 eve::procgen::Vector.
◆ typeOf()
| std::optional< ProcgenAttributeType > eve::procgen::AttributeTable::typeOf | ( | std::string_view | name | ) | const |
Return the declared type for a name, or no value when absent.
在文件 AttributeTable.cpp 第 68 行定义.
被这些函数引用 eve::procgen::copyPointsToTargets() , 以及 eve::procgen::PointSet::getAttributeType().
该类的文档由以下文件生成:
- src/modules/procgen/AttributeTable.h
- src/modules/procgen/AttributeTable.cpp