summaryrefslogtreecommitdiffstats
path: root/doc/cpp/data_store
diff options
context:
space:
mode:
Diffstat (limited to 'doc/cpp/data_store')
-rw-r--r--doc/cpp/data_store/cell_access.rst79
-rw-r--r--doc/cpp/data_store/dirty_cell_tracker.rst8
-rw-r--r--doc/cpp/data_store/document.rst18
-rw-r--r--doc/cpp/data_store/index.rst13
-rw-r--r--doc/cpp/data_store/model_context.rst24
-rw-r--r--doc/cpp/data_store/types.rst89
6 files changed, 231 insertions, 0 deletions
diff --git a/doc/cpp/data_store/cell_access.rst b/doc/cpp/data_store/cell_access.rst
new file mode 100644
index 0000000..a63a14f
--- /dev/null
+++ b/doc/cpp/data_store/cell_access.rst
@@ -0,0 +1,79 @@
+
+.. highlight:: cpp
+
+Cell Access
+===========
+
+Examples
+--------
+
+You can obtain a :cpp:class:`~ixion::cell_access` instance either from
+:cpp:class:`~ixion::model_context` or :cpp:class:`~ixion::document` class.
+
+Here is an example of how to obtain it from a :cpp:class:`~ixion::model_context` instance::
+
+ ixion::model_context cxt;
+ cxt.append_sheet("Sheet");
+
+ // fill this model context
+
+ ixion::abs_address_t A1(0, 0, 0);
+ ixion::cell_access ca = cxt.get_cell_access(A1);
+
+
+Here is an example of how to obtain it from a :cpp:class:`~ixion::document` instance::
+
+ ixion::document doc;
+ doc.append_sheet("Sheet");
+
+ // fill this document
+
+ ixion::cell_access ca = doc.get_cell_access("A1");
+
+
+Once you have your :cpp:class:`~ixion::cell_access` instance, you can, for instance,
+print the value of the cell as follows::
+
+ switch (ca.get_value_type())
+ {
+ case ixion::cell_value_t::numeric:
+ {
+ double v = ca.get_numeric_value();
+ cout << "numeric value: " << v << endl;
+ break;
+ }
+ case ixion::cell_value_t::string:
+ {
+ std::string_view s = ca.get_string_value();
+ cout << "string value: " << s << endl;
+ break;
+ }
+ case ixion::cell_value_t::boolean:
+ {
+ cout << "boolean value: " << ca.get_boolean_value() << endl;
+ break;
+ }
+ case ixion::cell_value_t::error:
+ {
+ ixion::formula_error_t err = ca.get_error_value();
+ cout << "error value: " << ixion::get_formula_error_name(err) << endl;
+ break;
+ }
+ case ixion::cell_value_t::empty:
+ {
+ cout << "empty cell" << endl;
+ break;
+ }
+ default:
+ cout << "???" << endl;
+ }
+
+The complete source code of this example is avaiable
+`here <https://gitlab.com/ixion/ixion/-/blob/master/doc_example/section_examples/cell_access.cpp>`_.
+
+
+API Reference
+-------------
+
+.. doxygenclass:: ixion::cell_access
+ :members:
diff --git a/doc/cpp/data_store/dirty_cell_tracker.rst b/doc/cpp/data_store/dirty_cell_tracker.rst
new file mode 100644
index 0000000..bf4e20a
--- /dev/null
+++ b/doc/cpp/data_store/dirty_cell_tracker.rst
@@ -0,0 +1,8 @@
+
+.. highlight:: cpp
+
+Dirty Cell Tracker
+==================
+
+.. doxygenclass:: ixion::dirty_cell_tracker
+ :members:
diff --git a/doc/cpp/data_store/document.rst b/doc/cpp/data_store/document.rst
new file mode 100644
index 0000000..3578d57
--- /dev/null
+++ b/doc/cpp/data_store/document.rst
@@ -0,0 +1,18 @@
+
+.. highlight:: cpp
+
+Document
+========
+
+Examples
+--------
+
+Refer to the :ref:`quickstart-document` section for code examples on how to
+use the :cpp:class:`~ixion::document` class.
+
+API Reference
+-------------
+
+.. doxygenclass:: ixion::document
+ :members:
+
diff --git a/doc/cpp/data_store/index.rst b/doc/cpp/data_store/index.rst
new file mode 100644
index 0000000..dd4749c
--- /dev/null
+++ b/doc/cpp/data_store/index.rst
@@ -0,0 +1,13 @@
+
+Data Store
+==========
+
+.. toctree::
+ :maxdepth: 2
+
+ model_context.rst
+ document.rst
+ cell_access.rst
+ dirty_cell_tracker.rst
+ types.rst
+
diff --git a/doc/cpp/data_store/model_context.rst b/doc/cpp/data_store/model_context.rst
new file mode 100644
index 0000000..d0b131d
--- /dev/null
+++ b/doc/cpp/data_store/model_context.rst
@@ -0,0 +1,24 @@
+
+.. highlight:: cpp
+
+Model Context
+=============
+
+Examples
+--------
+
+Refer to the :ref:`quickstart-model-context` section for code examples on how
+to use the :cpp:class:`~ixion::model_context` class.
+
+API Reference
+-------------
+
+.. doxygenclass:: ixion::model_context
+ :members:
+
+.. doxygenstruct:: ixion::config
+ :members:
+
+.. doxygenclass:: ixion::model_iterator
+ :members:
+
diff --git a/doc/cpp/data_store/types.rst b/doc/cpp/data_store/types.rst
new file mode 100644
index 0000000..20bb2ac
--- /dev/null
+++ b/doc/cpp/data_store/types.rst
@@ -0,0 +1,89 @@
+
+Types
+=====
+
+Macros
+------
+
+.. doxygendefine:: IXION_ASCII
+
+
+Primitive Types
+---------------
+
+.. doxygenenum:: ixion::celltype_t
+.. doxygenenum:: ixion::cell_value_t
+.. doxygenenum:: ixion::value_t
+.. doxygenenum:: ixion::table_area_t
+.. doxygenenum:: ixion::formula_name_resolver_t
+.. doxygenenum:: ixion::formula_error_t
+.. doxygenenum:: ixion::formula_result_wait_policy_t
+.. doxygenenum:: ixion::formula_event_t
+.. doxygenenum:: ixion::rc_direction_t
+
+.. doxygentypedef:: ixion::col_t
+.. doxygentypedef:: ixion::row_t
+.. doxygentypedef:: ixion::sheet_t
+.. doxygentypedef:: ixion::rc_t
+.. doxygentypedef:: ixion::string_id_t
+.. doxygentypedef:: ixion::table_areas_t
+.. doxygentypedef:: ixion::formula_tokens_t
+
+.. doxygenvariable:: ixion::empty_string_id
+.. doxygenvariable:: ixion::global_scope
+.. doxygenvariable:: ixion::invalid_sheet
+
+.. doxygenstruct:: ixion::rc_size_t
+.. doxygenstruct:: ixion::formula_group_t
+
+
+Cell Addresses
+--------------
+
+.. doxygenstruct:: ixion::address_t
+ :members:
+
+.. doxygenstruct:: ixion::rc_address_t
+ :members:
+
+.. doxygenstruct:: ixion::abs_address_t
+ :members:
+
+.. doxygenstruct:: ixion::abs_rc_address_t
+ :members:
+
+.. doxygenstruct:: ixion::range_t
+ :members:
+
+.. doxygenstruct:: ixion::abs_range_t
+ :members:
+
+.. doxygenstruct:: ixion::abs_rc_range_t
+ :members:
+
+.. doxygenstruct:: ixion::table_t
+ :members:
+
+.. doxygentypedef:: ixion::abs_address_set_t
+
+.. doxygentypedef:: ixion::abs_range_set_t
+
+.. doxygentypedef:: ixion::abs_rc_range_set_t
+
+
+Column Blocks
+-------------
+
+.. doxygentypedef:: ixion::column_block_handle
+.. doxygentypedef:: ixion::column_block_callback_t
+.. doxygenenum:: ixion::column_block_t
+
+.. doxygenstruct:: ixion::column_block_shape_t
+ :members:
+
+Utility Functions
+-----------------
+
+.. doxygenfunction:: ixion::get_formula_error_name
+
+.. doxygenfunction:: ixion::to_formula_error_type