Commit 612c9916 authored by Bob Obara's avatar Bob Obara

ENH: Changed bridge concept to session concept

Instead of refering to the native model support as a bridge it is now considered a session
parent 4a870e36

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

*.swp
doc/findfigure.pyc
smtk/bridge/discrete/testing/python/discreteReadFile.pyc
smtk/session/discrete/testing/python/discreteReadFile.pyc
......@@ -603,7 +603,7 @@ install(
# Add the current directory so we can include files like: <smtk/internal/Test.h>
# Save the include directories in a variable so that VTK modules
# (inside the extension/vtk and bridge/discrete directories) can reuse them.
# (inside the extension/vtk and session/discrete directories) can reuse them.
include_directories(
"${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}"
......
......@@ -21,7 +21,7 @@
#include "smtk/attribute/IntItem.h"
#include "smtk/attribute/ResourceItem.h"
#include "smtk/bridge/polygon/Registrar.h"
#include "smtk/session/polygon/Registrar.h"
#include "smtk/common/Registry.h"
......@@ -46,7 +46,7 @@ int main(int argc, char* argv[])
char* filename = argv[2];
auto rsrcMgr = smtk::resource::Manager::create();
auto operMgr = smtk::operation::Manager::create();
auto polygonRegistry = smtk::common::Registry<smtk::bridge::polygon::Registrar,
auto polygonRegistry = smtk::common::Registry<smtk::session::polygon::Registrar,
smtk::resource::Manager, smtk::operation::Manager>(rsrcMgr, operMgr);
auto rdr = operMgr->create<smtk::operation::ReadResource>();
......
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
#Changes to Modeling Sessions
* The bridge directory and namespace has been renamed to session to better conceptualize the idea of representing the native modeling session used by a model resource
......@@ -672,12 +672,12 @@ INPUT = \
"@SMTK_SOURCE_DIR@/smtk" \
"@SMTK_SOURCE_DIR@/smtk/attribute" \
"@SMTK_SOURCE_DIR@/smtk/session" \
"@SMTK_SOURCE_DIR@/smtk/bridge/exodus" \
"@SMTK_SOURCE_DIR@/smtk/bridge/remote" \
"@SMTK_SOURCE_DIR@/smtk/bridge/cgm" \
"@SMTK_SOURCE_DIR@/smtk/bridge/discrete" \
"@SMTK_SOURCE_DIR@/smtk/bridge/discrete/operation" \
"@SMTK_SOURCE_DIR@/smtk/bridge/discrete/kernel" \
"@SMTK_SOURCE_DIR@/smtk/session/exodus" \
"@SMTK_SOURCE_DIR@/smtk/session/remote" \
"@SMTK_SOURCE_DIR@/smtk/session/cgm" \
"@SMTK_SOURCE_DIR@/smtk/session/discrete" \
"@SMTK_SOURCE_DIR@/smtk/session/discrete/operation" \
"@SMTK_SOURCE_DIR@/smtk/session/discrete/kernel" \
"@SMTK_SOURCE_DIR@/smtk/common" \
"@SMTK_SOURCE_DIR@/smtk/common/testing/cxx" \
"@SMTK_SOURCE_DIR@/smtk/mesh" \
......
# Now add tutorial directories
add_subdirectory(cxx_first_steps)
add_subdirectory(add_a_bridge)
add_subdirectory(add_a_session)
add_subdirectory(implement_an_operator)
add_subdirectory(python_first_steps)
add_subdirectory(debugging_python_tests)
......@@ -21,7 +21,7 @@ class vtkUnstructuredGrid;
namespace smtk
{
namespace bridge
namespace session
{
namespace tutorial
{
......@@ -89,7 +89,7 @@ private:
};
} // namespace tutorial
} // namespace bridge
} // namespace session
} // namespace smtk
#endif // __smtk_ex_session_h
......@@ -47,7 +47,7 @@ To accelerate lookups of UUIDs,
the Exodus session stores the UUID as a string value
on each :cxx:`vtkDataObject`'s information object using the :cxx:`SMTK_UUID_KEY` key.
.. literalinclude:: ../../../smtk/bridge/exodus/ReadOperator.cxx
.. literalinclude:: ../../../smtk/session/exodus/ReadOperator.cxx
:start-after: // ++ 1 ++
:end-before: // -- 1 --
......@@ -69,7 +69,7 @@ as will the input parameter of the inverse method that
returns a UUID given a foreign entity;
for our example, we've created a new type named :cxx:`EntityHandle`.
.. literalinclude:: ../../../smtk/bridge/exodus/Session.h
.. literalinclude:: ../../../smtk/session/exodus/Session.h
:start-after: // ++ 2 ++
:end-before: // -- 2 --
......@@ -134,18 +134,18 @@ traversal order, then you should
The Exodus session class provides a method to create an IO delegate:
.. literalinclude:: ../../../smtk/bridge/exodus/Session.cxx
.. literalinclude:: ../../../smtk/session/exodus/Session.cxx
:start-after: // ++ 12 ++
:end-before: // -- 12 --
The IO delegate class is then implemented to provide methods for
importing and exporting session-specific information:
.. literalinclude:: ../../../smtk/bridge/exodus/SessionExodusIOJSON.h
.. literalinclude:: ../../../smtk/session/exodus/SessionExodusIOJSON.h
:start-after: // ++ 1 ++
:end-before: // -- 1 --
Note that you can use the :smtk:`smtk::bridge::exodus::SessionIOJSON` class
Note that you can use the :smtk:`smtk::session::exodus::SessionIOJSON` class
to import and export information other than UUID arrays, should the session
store some other state that should be preserved across processes.
......
......@@ -6,13 +6,13 @@ Bridge a new modeling kernel
.. role:: cxx(code)
:language: c++
This tutorial covers how to bridge a solid modeling kernel to SMTK.
This tutorial covers how to session a solid modeling kernel to SMTK.
The details will vary according to the capabilities of the modeling
kernel you wish to use via SMTK, but the overall process of bridging
the kernel involves
* subclassing SMTK's :smtk:`Session` class — which is used as a
bridge between the modeling kernel and SMTK's model manager;
session between the modeling kernel and SMTK's model manager;
* defining a map between your kernel's modeling entities and SMTK UUIDs;
* transcribing information about kernel modeling entities into an
SMTK model manager; and
......
......@@ -26,7 +26,7 @@ of a separate tutorial.
The first thing you must do when creating your own session is
to implement a subclass of :smtk:`smtk::model::Session`:
.. literalinclude:: ../../../smtk/bridge/exodus/Session.h
.. literalinclude:: ../../../smtk/session/exodus/Session.h
:start-after: // ++ 1 ++
:end-before: // -- 1 --
......@@ -87,7 +87,7 @@ In the :file:`Session.cxx` file, you will see that the :smtk:`smtkDeclareModelin
has a partner macro named :smtk:`smtkImplementsModelingKernel`, placed at the bottom
of the file **outside of any namespaces**:
.. literalinclude:: ../../../smtk/bridge/exodus/Session.cxx
.. literalinclude:: ../../../smtk/session/exodus/Session.cxx
:start-after: // ++ 1 ++
:end-before: // -- 1 --
......@@ -111,7 +111,7 @@ This macro takes 6 parameters:
which simply encodes the contents of a JSON file as a C string for your convenience.
The Exodus session has the following description:
.. literalinclude:: ../../../smtk/bridge/exodus/Session.json
.. literalinclude:: ../../../smtk/session/exodus/Session.json
At a minimum, the JSON dictionary must include
......
......@@ -10,14 +10,14 @@ must do this.
The first thing you should do is verify that the entity being requested
actually exists:
.. literalinclude:: ../../../smtk/bridge/exodus/Session.cxx
.. literalinclude:: ../../../smtk/session/exodus/Session.cxx
:start-after: // ++ 7 ++
:end-before: // -- 7 --
One trick you'll see in most sessions is the construction of a "mutable" entityref
from the const version that passed to :cxx:`transcribeInternal`:
.. literalinclude:: ../../../smtk/bridge/exodus/Session.cxx
.. literalinclude:: ../../../smtk/session/exodus/Session.cxx
:start-after: // ++ 8 ++
:end-before: // -- 8 --
......@@ -36,11 +36,11 @@ at this point but don't worry about filling in the list of relations to
other entities unless the :smtk:`SESSION_ENTITY_RELATIONS` bit is set
in the request for transcription.
.. literalinclude:: ../../../smtk/bridge/exodus/Session.cxx
.. literalinclude:: ../../../smtk/session/exodus/Session.cxx
:start-after: // ++ 9 ++
:end-before: // -- 9 --
.. literalinclude:: ../../../smtk/bridge/exodus/Session.cxx
.. literalinclude:: ../../../smtk/session/exodus/Session.cxx
:start-after: // ++ 10 ++
:end-before: // -- 10 --
......@@ -53,7 +53,7 @@ Because this is an example and because the Exodus session does not
expose individual cells as first-class entities,
we transcribe the entire model recursively.
.. literalinclude:: ../../../smtk/bridge/exodus/Session.cxx
.. literalinclude:: ../../../smtk/session/exodus/Session.cxx
:start-after: // ++ 11 ++
:end-before: // -- 11 --
......
......@@ -19,7 +19,7 @@ class DebugAPythonTest(smtk.testing.TestCase):
# srcdir = '/src'
sys.path.append(
os.path.join(
srcdir, 'smtk', 'bridge', 'discrete', 'testing', 'python'))
srcdir, 'smtk', 'session', 'discrete', 'testing', 'python'))
# Import the test case class:
from discreteReadFile import TestDiscreteSession
......
......@@ -13,6 +13,6 @@ requiring much theory.
cxx_first_steps/index.rst
python_first_steps/index.rst
add_a_bridge/index.rst