diff --git a/README.md b/README.md
index ca594fdc..6b1de129 100644
--- a/README.md
+++ b/README.md
@@ -90,7 +90,7 @@ Documentation is available here:
The library exhibits the following structure:
```txt
-├── Types
+├── Type
│ ├── Integer
│ ├── Real
│ ├── String
@@ -102,7 +102,7 @@ The library exhibits the following structure:
│ ├── Unique
│ ├── Shared
│ └── Weak
-├── Containers
+├── Container
│ ├── Array
│ ├── List
│ ├── Map
@@ -138,10 +138,11 @@ The library exhibits the following structure:
│ ├── Undefined
│ ├── Wrong
│ └── To Be Implemented
-└── Utilities
- ├── Iterators
+└── Utility
+ ├── Iterator
└── Version
```
+
@@ -202,8 +203,8 @@ Or to run them manually:
## Dependencies
-| Name | Version | License | Link |
-| ----------- | -------- | ------------ | ---------------------------------------------------------------------- |
+| Name | Version | License | Link |
+| ----------- | ---------- | ------------ | ------------------------------------------------------------------- |
| Pybind11 | `2.10.1` | BSD-3-Clause | [github.com/pybind/pybind11](https://github.com/pybind/pybind11) |
| RapidJSON | `master` | MIT | [rapidjson.org](http://rapidjson.org) |
| yaml-cpp | `0.7.0` | MIT | [github.com/jbeder/yaml-cpp](https://github.com/jbeder/yaml-cpp) |
diff --git a/bindings/python/docs/Reference.ipynb b/bindings/python/docs/Reference.ipynb
index 90a13446..f1c7bb99 100644
--- a/bindings/python/docs/Reference.ipynb
+++ b/bindings/python/docs/Reference.ipynb
@@ -50,7 +50,7 @@
"metadata": {},
"outputs": [],
"source": [
- "types = core.types"
+ "type = core.type"
]
},
{
@@ -66,7 +66,7 @@
"metadata": {},
"outputs": [],
"source": [
- "Integer = types.Integer"
+ "Integer = type.Integer"
]
},
{
@@ -82,7 +82,7 @@
"metadata": {},
"outputs": [],
"source": [
- "Real = types.Real"
+ "Real = type.Real"
]
},
{
@@ -98,7 +98,7 @@
"metadata": {},
"outputs": [],
"source": [
- "String = types.String"
+ "String = type.String"
]
},
{
@@ -114,7 +114,7 @@
"metadata": {},
"outputs": [],
"source": [
- "containers = core.containers"
+ "container = core.container"
]
},
{
@@ -130,11 +130,11 @@
"metadata": {},
"outputs": [],
"source": [
- "[i for i in containers.get_int_array()]\n",
- "[i for i in containers.get_double_array()]\n",
- "[i for i in containers.get_integer_array()]\n",
- "[i for i in containers.get_real_array()]\n",
- "[i for i in containers.get_string_array()];"
+ "[i for i in container.get_int_array()]\n",
+ "[i for i in container.get_double_array()]\n",
+ "[i for i in container.get_integer_array()]\n",
+ "[i for i in container.get_real_array()]\n",
+ "[i for i in container.get_string_array()];"
]
},
{
@@ -143,8 +143,8 @@
"metadata": {},
"outputs": [],
"source": [
- "containers.set_int_array([1, 2, 3])\n",
- "containers.set_int_array((1, 2, 3))"
+ "container.set_int_array([1, 2, 3])\n",
+ "container.set_int_array((1, 2, 3))"
]
},
{
@@ -153,8 +153,8 @@
"metadata": {},
"outputs": [],
"source": [
- "containers.set_double_array([1.0, 2.0, 3.0])\n",
- "containers.set_double_array((1.0, 2.0, 3.0))"
+ "container.set_double_array([1.0, 2.0, 3.0])\n",
+ "container.set_double_array((1.0, 2.0, 3.0))"
]
},
{
@@ -163,8 +163,8 @@
"metadata": {},
"outputs": [],
"source": [
- "containers.set_integer_array([1, 2, 3])\n",
- "containers.set_integer_array((1, 2, 3))"
+ "container.set_integer_array([1, 2, 3])\n",
+ "container.set_integer_array((1, 2, 3))"
]
},
{
@@ -173,8 +173,8 @@
"metadata": {},
"outputs": [],
"source": [
- "containers.set_real_array([1.0, 2.0, 3.0])\n",
- "containers.set_real_array((1.0, 2.0, 3.0))"
+ "container.set_real_array([1.0, 2.0, 3.0])\n",
+ "container.set_real_array((1.0, 2.0, 3.0))"
]
},
{
@@ -183,8 +183,8 @@
"metadata": {},
"outputs": [],
"source": [
- "containers.set_string_array([\"abc\", \"def\", \"ghi\"])\n",
- "containers.set_string_array((\"abc\", \"def\", \"ghi\"))"
+ "container.set_string_array([\"abc\", \"def\", \"ghi\"])\n",
+ "container.set_string_array((\"abc\", \"def\", \"ghi\"))"
]
},
{
@@ -216,4 +216,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
-}
\ No newline at end of file
+}
diff --git a/bindings/python/src/OpenSpaceToolkitCorePy.cxx b/bindings/python/src/OpenSpaceToolkitCorePy.cxx
index e8b1e24b..c71b1d07 100644
--- a/bindings/python/src/OpenSpaceToolkitCorePy.cxx
+++ b/bindings/python/src/OpenSpaceToolkitCorePy.cxx
@@ -1,17 +1,17 @@
/// Apache License 2.0
-#include
+#include
#include
#include
-#include
+#include
#include
-#include
+#include
PYBIND11_MODULE(OpenSpaceToolkitCorePy, m)
{
// Add optional docstring for package OpenSpaceToolkitCorePy
- m.doc() = "Fundamental types, containers and utilities for OpenSpaceToolkit.";
+ m.doc() = "Fundamental types, container and utility for OpenSpaceToolkit.";
// Add __path__ attribute to python package
m.attr("__path__") = "ostk.core";
@@ -27,7 +27,7 @@ PYBIND11_MODULE(OpenSpaceToolkitCorePy, m)
#endif
// Add python submodules to OpenSpaceToolkitCorePy
- OpenSpaceToolkitCorePy_Types(m);
- OpenSpaceToolkitCorePy_Containers(m);
+ OpenSpaceToolkitCorePy_Type(m);
+ OpenSpaceToolkitCorePy_Container(m);
OpenSpaceToolkitCorePy_FileSystem(m);
}
diff --git a/bindings/python/src/OpenSpaceToolkitCorePy/Container.cpp b/bindings/python/src/OpenSpaceToolkitCorePy/Container.cpp
new file mode 100644
index 00000000..0ac4c0fa
--- /dev/null
+++ b/bindings/python/src/OpenSpaceToolkitCorePy/Container.cpp
@@ -0,0 +1,19 @@
+/// Apache License 2.0
+
+#include
+#include
+#include
+
+inline void OpenSpaceToolkitCorePy_Container(pybind11::module& aModule)
+{
+ // Create "container" python submodule
+ auto container = aModule.def_submodule("container");
+
+ // Add __path__ attribute for "container" submodule
+ container.attr("__path__") = "ostk.core.container";
+
+ // Add objects to python "container" submodules
+ OpenSpaceToolkitCorePy_Container_Array(container);
+ OpenSpaceToolkitCorePy_Container_Object(container);
+ OpenSpaceToolkitCorePy_Container_Dictionary(container);
+}
diff --git a/bindings/python/src/OpenSpaceToolkitCorePy/Containers/Array.cpp b/bindings/python/src/OpenSpaceToolkitCorePy/Container/Array.cpp
similarity index 75%
rename from bindings/python/src/OpenSpaceToolkitCorePy/Containers/Array.cpp
rename to bindings/python/src/OpenSpaceToolkitCorePy/Container/Array.cpp
index 1dd1e773..10b8b0d2 100644
--- a/bindings/python/src/OpenSpaceToolkitCorePy/Containers/Array.cpp
+++ b/bindings/python/src/OpenSpaceToolkitCorePy/Container/Array.cpp
@@ -1,16 +1,16 @@
/// Apache License 2.0
-#include
+#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
-using ostk::core::ctnr::Array;
-using ostk::core::types::Integer;
-using ostk::core::types::Real;
-using ostk::core::types::String;
+using ostk::core::container::Array;
+using ostk::core::type::Integer;
+using ostk::core::type::Real;
+using ostk::core::type::String;
/// @brief Set and Get Array functions
///
@@ -73,15 +73,15 @@ Array getStringArray()
return vector;
}
-inline void OpenSpaceToolkitCorePy_Containers_Array(pybind11::module& aModule)
+inline void OpenSpaceToolkitCorePy_Container_Array(pybind11::module& aModule)
{
using namespace pybind11;
- using ostk::core::types::Integer;
- using ostk::core::types::Real;
- using ostk::core::types::String;
+ using ostk::core::type::Integer;
+ using ostk::core::type::Real;
+ using ostk::core::type::String;
- using ostk::core::ctnr::Array;
+ using ostk::core::container::Array;
aModule.def("set_int_array", overload_cast&>(&setIntArray));
aModule.def("set_double_array", overload_cast&>(&setDoubleArray));
diff --git a/bindings/python/src/OpenSpaceToolkitCorePy/Containers/ArrayCasting.hpp b/bindings/python/src/OpenSpaceToolkitCorePy/Container/ArrayCasting.hpp
similarity index 78%
rename from bindings/python/src/OpenSpaceToolkitCorePy/Containers/ArrayCasting.hpp
rename to bindings/python/src/OpenSpaceToolkitCorePy/Container/ArrayCasting.hpp
index 9da9e980..8aad96fe 100644
--- a/bindings/python/src/OpenSpaceToolkitCorePy/Containers/ArrayCasting.hpp
+++ b/bindings/python/src/OpenSpaceToolkitCorePy/Container/ArrayCasting.hpp
@@ -3,14 +3,14 @@
#include
#include
-#include
+#include
namespace pybind11
{
namespace detail
{
-using ostk::core::ctnr::Array;
+using ostk::core::container::Array;
template
struct type_caster> : list_caster, T>
diff --git a/bindings/python/src/OpenSpaceToolkitCorePy/Containers/Dictionary.cpp b/bindings/python/src/OpenSpaceToolkitCorePy/Container/Dictionary.cpp
similarity index 88%
rename from bindings/python/src/OpenSpaceToolkitCorePy/Containers/Dictionary.cpp
rename to bindings/python/src/OpenSpaceToolkitCorePy/Container/Dictionary.cpp
index 3cb9403d..b2a81b02 100644
--- a/bindings/python/src/OpenSpaceToolkitCorePy/Containers/Dictionary.cpp
+++ b/bindings/python/src/OpenSpaceToolkitCorePy/Container/Dictionary.cpp
@@ -2,18 +2,18 @@
#include
-#include
-#include
-#include
+#include
+#include
+#include
-using ostk::core::ctnr::Object;
-using ostk::core::ctnr::Dictionary;
+using ostk::core::container::Object;
+using ostk::core::container::Dictionary;
Object objectFromPythonHandle(const pybind11::handle& anObject)
{
using namespace pybind11;
- using ostk::core::ctnr::Array;
+ using ostk::core::container::Array;
if (isinstance(anObject))
{
@@ -62,13 +62,13 @@ Object objectFromPythonHandle(const pybind11::handle& anObject)
throw ostk::core::error::RuntimeError("Object type is wrong.");
}
-inline void OpenSpaceToolkitCorePy_Containers_Dictionary(pybind11::module& aModule)
+inline void OpenSpaceToolkitCorePy_Container_Dictionary(pybind11::module& aModule)
{
using namespace pybind11;
- using ostk::core::types::String;
- using ostk::core::ctnr::Object;
- using ostk::core::ctnr::Dictionary;
+ using ostk::core::type::String;
+ using ostk::core::container::Object;
+ using ostk::core::container::Dictionary;
class_ dictionary_class(aModule, "Dictionary");
diff --git a/bindings/python/src/OpenSpaceToolkitCorePy/Containers/Object.cpp b/bindings/python/src/OpenSpaceToolkitCorePy/Container/Object.cpp
similarity index 85%
rename from bindings/python/src/OpenSpaceToolkitCorePy/Containers/Object.cpp
rename to bindings/python/src/OpenSpaceToolkitCorePy/Container/Object.cpp
index f08230cf..3ba02b05 100644
--- a/bindings/python/src/OpenSpaceToolkitCorePy/Containers/Object.cpp
+++ b/bindings/python/src/OpenSpaceToolkitCorePy/Container/Object.cpp
@@ -1,19 +1,19 @@
/// Apache License 2.0
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
-inline void OpenSpaceToolkitCorePy_Containers_Object(pybind11::module& aModule)
+inline void OpenSpaceToolkitCorePy_Container_Object(pybind11::module& aModule)
{
using namespace pybind11;
- using ostk::core::types::Index;
- using ostk::core::types::Integer;
- using ostk::core::types::Real;
- using ostk::core::types::String;
- using ostk::core::ctnr::Object;
+ using ostk::core::type::Index;
+ using ostk::core::type::Integer;
+ using ostk::core::type::Real;
+ using ostk::core::type::String;
+ using ostk::core::container::Object;
class_