forked from 1b-agent/opencadstudio-upstream
ocs_doc_api: Phase 5-ii — typed Table create
- CreateTable(TableSpec{insertion_point, data[row][col]}) op (append-only).
- backend add_table via Table::new(insertion_point, rows, cols) + set_cell_text
(Table::default() pre-creates 3x3, so use Table::new for exact dims).
- executor validates non-empty rectangular grid; facade create_table.
- spec Table constructor; api_reference + binding_schema regenerated; mocks + baseline.
- Test phase5ii_create_table_from_grid (3x2 grid, non-rectangular rejected)
-> 615 host lib + 3 consistency green. Phase 5 complete.
This commit is contained in:
1 parent
f8ae54a351
commit
240831edcd
12 files changed
+117
-7
No files matched your search
@@ -148,6 +148,15 @@ pub struct AttributeDefinitionSpec {
|
||||
pub rotation: f64,
|
||||
}
|
||||
|
||||
/// Construction spec for a `TABLE`: an insertion point plus a grid of cell
|
||||
/// strings (`data[row][column]`).
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct TableSpec {
|
||||
pub insertion_point: [f64; 3],
|
||||
/// Grid of cell text values, rows × columns.
|
||||
pub data: Vec<Vec<String>>,
|
||||
}
|
||||
|
||||
/// Construction spec for a `RASTER_IMAGE`: an image file placed at
|
||||
/// `insertion_point` with per-pixel world-unit vectors `u_vector`/`v_vector` and
|
||||
/// pixel `size` (width, height). The host auto-registers the ImageDefinition.
|
||||
@@ -223,6 +232,7 @@ impl crate::gen::Operation {
|
||||
CreateDimensionDiameter(_) => "CreateDimensionDiameter",
|
||||
CreateDimensionAngular(_) => "CreateDimensionAngular",
|
||||
CreateAttributeDefinition(_) => "CreateAttributeDefinition",
|
||||
CreateTable(_) => "CreateTable",
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user