Commit 27ca669a authored by David Thompson's avatar David Thompson
Browse files

A large rename to address issue #5.

parent 7f61bf20
......@@ -18,16 +18,16 @@
// Was SMTK built with VTK? If true, the vtkSMTK library will exist.
#cmakedefine SMTK_BUILD_VTK
// Was SMTK built with discrete model? If true, the smtkDiscreteBridge library
// Was SMTK built with discrete model? If true, the smtkDiscreteSession library
// and vtkSMTKDiscreteModel library will exist.
#cmakedefine SMTK_BUILD_DISCRETE_BRIDGE
#cmakedefine SMTK_BUILD_DISCRETE_SESSION
// Was SMTK built with exodus-II reader? If true,
// the SMTKBridgeExodus library will exist.
#cmakedefine SMTK_ENABLE_EXODUS_BRIDGE
// the SMTKSessionExodus library will exist.
#cmakedefine SMTK_ENABLE_EXODUS_SESSION
// Was SMTK built with moab reader? If true, the vtkDiscreteMoabReader
// library will exist and smtkDiscreteBridge library will link against it.
// library will exist and smtkDiscreteSession library will link against it.
#cmakedefine SMTK_BUILD_MOAB_READER
// Was SMTK built with CGM? If true, cgm-convert will exist.
......
......@@ -103,7 +103,7 @@ function(smtk_prepend_string prefix result)
endfunction(smtk_prepend_string)
include(SMTKOperatorXML)
include(SMTKBridgeJSON)
include(SMTKSessionJSON)
# Builds source groups for the smtk files so that they show up nicely in
# Visual Studio.
......
# Given a list of filenames (opSpecs) containing JSON descriptions of
# a bridge, configure C++ source that encodes the JSON as a string.
# a session, configure C++ source that encodes the JSON as a string.
# The resulting files are placed in the current binary directory and
# appended to genFiles.
include(EncodeCStringFunctions)
function(smtk_bridge_json opSpecs genFiles)
function(smtk_session_json opSpecs genFiles)
foreach (opSpec ${opSpecs})
get_filename_component(genFileBase "${opSpec}" NAME_WE)
set(genFile "${CMAKE_CURRENT_BINARY_DIR}/${genFileBase}_json.h")
......
......@@ -13,4 +13,4 @@ int main(int argc, char** argv)
{
std::shared_ptr<float> f;
return 0;
}
\ No newline at end of file
}
......@@ -13,4 +13,4 @@ int main(int argc, char** argv)
{
std::tr1::shared_ptr<float> f;
return 0;
}
\ No newline at end of file
}
......@@ -104,4 +104,4 @@ macro(vtk_smtk_setup_module_environment _name)
vtk_module_load("${mod}")
endforeach()
endmacro()
\ No newline at end of file
endmacro()
......@@ -49,11 +49,11 @@ option(SMTK_NO_SYSTEM_BOOST "Allow boost to search for system installed boost" O
option(SMTK_BUILD_QT "Build Qt GUI" OFF)
option(SMTK_BUILD_VTK "Build VTK component" OFF)
option(SMTK_BUILD_CGM "Build CGM component" OFF)
option(SMTK_BUILD_DISCRETE_BRIDGE "Build discrete model bridge components" OFF)
option(SMTK_BUILD_BRIDGE_PLUGIN "Build paraview plugin for model bridges" OFF)
option(SMTK_BUILD_DISCRETE_SESSION "Build discrete model session components" OFF)
option(SMTK_BUILD_SESSION_PLUGIN "Build paraview plugin for model sessions" OFF)
if (SMTK_BUILD_VTK)
option(SMTK_ENABLE_EXODUS_BRIDGE "Build a bridge to Exodus-II side sets" ON)
option(SMTK_ENABLE_EXODUS_SESSION "Build a session to Exodus-II side sets" ON)
endif()
option(SMTK_ENABLE_REMUS "Build Remus component" OFF)
......@@ -142,10 +142,10 @@ endif()
# and VTK can NOT be easily switched due to modules and macros intermixed
################################################################################
################################################################################
# Look for Discrete bridge discrete model modules
# Look for Discrete session discrete model modules
################################################################################
if(SMTK_BUILD_BRIDGE_PLUGIN)
if(SMTK_BUILD_SESSION_PLUGIN)
find_package(ParaView REQUIRED)
endif()
......@@ -154,7 +154,7 @@ endif()
################################################################################
if(SMTK_BUILD_VTK)
if(SMTK_BUILD_BRIDGE_PLUGIN)
if(SMTK_BUILD_SESSION_PLUGIN)
find_package(ParaView REQUIRED)
else()
# Find the package here so environment variables are set, but
......@@ -317,7 +317,7 @@ install(
FILES
${PROJECT_SOURCE_DIR}/CMake/EncodeCStringFunctions.cmake
${PROJECT_SOURCE_DIR}/CMake/SMTKOperatorXML.cmake
${PROJECT_SOURCE_DIR}/CMake/SMTKBridgeJSON.cmake
${PROJECT_SOURCE_DIR}/CMake/SMTKSessionJSON.cmake
DESTINATION
lib/cmake/SMTK
)
......@@ -345,17 +345,17 @@ include_directories(
)
################################################################################
# Look for Discrete bridge discrete model modules
# Look for Discrete session discrete model modules
################################################################################
if(SMTK_BUILD_DISCRETE_BRIDGE)
if(SMTK_BUILD_BRIDGE_PLUGIN)
if(SMTK_BUILD_DISCRETE_SESSION)
if(SMTK_BUILD_SESSION_PLUGIN)
find_package(ParaView REQUIRED)
else()
find_package(VTK REQUIRED)
endif()
# This option is only available when SMTK_BUILD_DISCRETE_BRIDGE is ON
# This option is only available when SMTK_BUILD_DISCRETE_SESSION is ON
option(SMTK_BUILD_MOAB_READER "Build moab reader for discrete model" OFF)
endif()
......
......@@ -115,7 +115,7 @@ if (SPHINX_FOUND)
userguide/attribute/file-syntax.rst
userguide/model/index.rst
userguide/model/concepts.rst
userguide/model/bridges.rst
userguide/model/sessions.rst
userguide/model/property-names.rst
userguide/contributing.rst
)
......@@ -126,8 +126,8 @@ if (SPHINX_FOUND)
endif()
set(SMTK_USERGUIDE_FIGS
userguide/figures/forwarding-bridge.svg
userguide/figures/cursor-classes-with-inheritance.svg
userguide/figures/forwarding-session.svg
userguide/figures/entityref-classes-with-inheritance.svg
userguide/figures/ExampleAttributePanel.png
)
......
......@@ -671,7 +671,7 @@ WARN_LOGFILE =
INPUT = \
"@SMTK_SOURCE_DIR@/smtk" \
"@SMTK_SOURCE_DIR@/smtk/attribute" \
"@SMTK_SOURCE_DIR@/smtk/bridge" \
"@SMTK_SOURCE_DIR@/smtk/session" \
"@SMTK_SOURCE_DIR@/smtk/bridge/remote" \
"@SMTK_SOURCE_DIR@/smtk/bridge/cgm" \
"@SMTK_SOURCE_DIR@/smtk/bridge/discrete" \
......
project(ex_add_a_bridge)
project(ex_add_a_session)
cmake_minimum_required(VERSION 2.8.11)
# ++ 1 ++
include(SMTKBridgeJSON) # defines smtk_bridge_json()
include(SMTKSessionJSON) # defines smtk_session_json()
# The smtk_bridge_json() function writes a file to the current
# The smtk_session_json() function writes a file to the current
# binary directory sharing the same name as the input file
# but with "_json.h" replacing the file extension. For this
# example, that filename is "Bridge_json.h".
# smtk_bridge_json() appends the exact filename to the
# "bridgeJSON" variable.
smtk_bridge_json(
"${CMAKE_CURRENT_SOURCE_DIR}/Bridge.json"
bridgeJSON
# example, that filename is "Session_json.h".
# smtk_session_json() appends the exact filename to the
# "sessionJSON" variable.
smtk_session_json(
"${CMAKE_CURRENT_SOURCE_DIR}/Session.json"
sessionJSON
)
# Make sure we can include the resulting file:
......@@ -22,10 +22,10 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Testing must be enabled to build this tutorial
# because it depends on SMTKCoreModelTesting.
#if (SMTK_ENABLE_TESTING)
# add_executable(add_a_bridge add_a_bridge.cxx)
# target_link_libraries(add_a_bridge SMTKCore SMTKCoreModelTesting)
# add_executable(add_a_session add_a_session.cxx)
# target_link_libraries(add_a_session SMTKCore SMTKCoreModelTesting)
# if (SMTK_BUILD_CGM)
# target_link_libraries(add_a_bridge cgmSMTK)
# target_link_libraries(add_a_session cgmSMTK)
# endif (SMTK_BUILD_CGM)
# add_test(tut-add_a_bridge ${EXECUTABLE_OUTPUT_PATH}/add_a_bridge)
# add_test(tut-add_a_session ${EXECUTABLE_OUTPUT_PATH}/add_a_session)
#endif()
......@@ -7,10 +7,10 @@
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
#ifndef __smtk_ex_bridge_h
#define __smtk_ex_bridge_h
#ifndef __smtk_ex_session_h
#define __smtk_ex_session_h
#include "smtk/model/Bridge.h"
#include "smtk/model/Session.h"
#include "smtk/common/UUID.h"
#include "vtkSmartPointer.h"
......@@ -43,22 +43,22 @@ struct EntityHandle {
// -- 2 --
// ++ 1 ++
/**\brief Implement a bridge from VTK unstructured grids to SMTK.
/**\brief Implement a session from VTK unstructured grids to SMTK.
*/
class Bridge : public smtk::model::Bridge
class Session : public smtk::model::Session
{
public:
// This is required of every bridge:
// This is required of every session:
smtkDeclareModelingKernel();
typedef smtk::shared_ptr<Bridge> Ptr;
typedef smtk::model::BridgedInfoBits BridgedInfoBits;
static BridgePtr create();
virtual ~Bridge();
virtual BridgedInfoBits allSupportedInformation() const;
typedef smtk::shared_ptr<Session> Ptr;
typedef smtk::model::SessiondInfoBits SessiondInfoBits;
static SessionPtr create();
virtual ~Session();
virtual SessiondInfoBits allSupportedInformation() const;
// These are specific to each bridge but required in some form:
EntityHandle toEntity(const smtk::model::Cursor& eid);
smtk::model::Cursor toCursor(const EntityHandle& ent);
// These are specific to each session but required in some form:
EntityHandle toEntity(const smtk::model::EntityRef& eid);
smtk::model::EntityRef toEntityRef(const EntityHandle& ent);
// These methods may be provided as needed.
static int staticSetup(
......@@ -69,33 +69,33 @@ public:
const smtk::model::StringList& optVal);
protected:
Bridge();
Session();
// This is required of every bridge:
virtual BridgedInfoBits transcribeInternal(
const smtk::model::Cursor& entity,
BridgedInfoBits requestedInfo);
// This is required of every session:
virtual SessiondInfoBits transcribeInternal(
const smtk::model::EntityRef& entity,
SessiondInfoBits requestedInfo);
vtkSmartPointer<vtkUnstructuredGrid> Model;
// ... };
// -- 1 --
void addRelations(
smtk::model::Cursor& cursor,
smtk::model::EntityRef& entityref,
std::vector<EntityHandle>& rels,
BridgedInfoBits requestedInfo,
SessiondInfoBits requestedInfo,
int depth);
bool addTessellation(
const smtk::model::Cursor&,
const smtk::model::EntityRef&,
const EntityHandle&);
private:
Bridge(const Bridge&); // Not implemented.
void operator = (const Bridge&); // Not implemented.
Session(const Session&); // Not implemented.
void operator = (const Session&); // Not implemented.
};
} // namespace tutorial
} // namespace bridge
} // namespace smtk
#endif // __smtk_ex_bridge_h
#endif // __smtk_ex_session_h
......@@ -5,13 +5,13 @@
.. role:: cmake(code)
:language: cmake
.. _subclassing-bridge:
.. _subclassing-session:
**************************
Creating a bridge subclass
Creating a session subclass
**************************
Bridges exist to link foreign modeling entities to SMTK
Sessions exist to link foreign modeling entities to SMTK
modeling entities, in a bidirectional way:
* we *transcribe* foreign modeling entities into an SMTK model manager, and
......@@ -19,163 +19,163 @@ modeling entities, in a bidirectional way:
kernel (and then result in more transcriptions to update SMTK's model manager).
Only the first of these is needed for read-only access so we will cover it
first and then describe the interactions between bridges and operators.
first and then describe the interactions between sessions and operators.
:ref:`Implementing operators <tut - implement an operator>` is the topic
of a separate tutorial.
The first thing you must do when creating your own bridge is
to implement a subclass of :smtk:`smtk::model::Bridge`:
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/Bridge.h
.. literalinclude:: ../../../smtk/bridge/exodus/Session.h
:start-after: // ++ 1 ++
:end-before: // -- 1 --
In the example above, some methods override the base
class in order to provide required functionality while others
just illustrate useful ways to divide tasks that should be
common to most bridges.
common to most sessions.
The first block of methods near the top of the declaration
are required in order for instances of the bridge to be
are required in order for instances of the session to be
created and introspected by SMTK.
* The :smtk:`smtkDeclareModelingKernel` macro declares methods
for introspection of the class.
Bridge classes are managed by shared pointers and can be
Session classes are managed by shared pointers and can be
relatively heavyweight objects since they may contain maps
from SMTK UUIDs to modeling kernel entities.
* The :cxx:`typedef smtk::shared_ptr<Bridge> Ptr` is required by some
* The :cxx:`typedef smtk::shared_ptr<Session> Ptr` is required by some
members declared in the :smtk:`smtkDeclareModelingKernel` macro.
It is also useful for referencing shared pointers to the bridge
It is also useful for referencing shared pointers to the session
internally.
* The :cxx:`typedef smtk::model::BridgedInfoBits BridgedInfoBits`
* The :cxx:`typedef smtk::model::SessiondInfoBits SessiondInfoBits`
is not required but will make implementing methods dealing with
transcription of entities easier to type.
* The :cxx:`static BridgePtr create()` method is required in order
* The :cxx:`static SessionPtr create()` method is required in order
for instances of the object to be created; its address is passed
to the :smtk:`BridgeRegistrar` class by another macro discussed later
so that instances of the bridge can be created given just a string
describing the bridge.
This is necessary so that bridges can be created and managed
to the :smtk:`SessionRegistrar` class by another macro discussed later
so that instances of the session can be created given just a string
describing the session.
This is necessary so that sessions can be created and managed
in remote processes.
* The virtual destructor should always be implemented so that the base
class destructor is called.
* Finally, the :cxx:`allSupportedInformation` method exists so that SMTK
can discover what types of information the bridge can provide to SMTK.
can discover what types of information the session can provide to SMTK.
The returned integer should be a bitwise OR of entries from
the :smtk:`BridgedInformation` enum.
For now, it is fine to return :smtk:`BRIDGE_EVERYTHING`.
the :smtk:`SessiondInformation` enum.
For now, it is fine to return :smtk:`SESSION_EVERYTHING`.
The next step is to provide methods to access the maps between SMTK
and foreign entities (in this case, Exodus element blocks, side sets,
and node sets).
The :cxx:`toEntity` and :cxx:`toCursor` methods do this and will
The :cxx:`toEntity` and :cxx:`toEntityRef` methods do this and will
be discussed in more detail in the next section.
Depending on your modeling kernel, you may use an existing type
from the foreign modeler (like the CGM bridge does) or a new class
from the foreign modeler (like the CGM session does) or a new class
like the :cxx:`EntityHandle` class in our example.
The final public methods, :cxx:`staticSetup` and :cxx:`setup`, exist
so that applications can set global configuration parameters on modeling
kernels using a consistent API.
The :cxx:`staticSetup` method should be called before an instance of
the bridge class is constructed and may be used to perform one-time
the session class is constructed and may be used to perform one-time
initialization of the modeling kernel.
The :cxx:`setup` method is invoked on a particular instance of a bridge
The :cxx:`setup` method is invoked on a particular instance of a session
and is used to set things such as the tolerances used to tessellate
curved geometry in CGM.
Static initialization
---------------------
Now that we have declared the Exodus bridge class methods we must implement them.
In the :file:`Bridge.cxx` file, you will see that the :smtk:`smtkDeclareModelingKernel`
Now that we have declared the Exodus session class methods we must implement them.
In the :file:`Session.cxx` file, you will see that the :smtk:`smtkDeclareModelingKernel`
has a partner macro named :smtk:`smtkImplementsModelingKernel`, placed at the bottom
of the file **outside of any namespaces**:
.. literalinclude:: ../../../smtk/bridge/exodus/Bridge.cxx
.. literalinclude:: ../../../smtk/bridge/exodus/Session.cxx
:start-after: // ++ 1 ++
:end-before: // -- 1 --
This macro takes 5 parameters:
1. A "short" name for the bridge. This is used as part of some variable names inside the macro,
1. A "short" name for the session. This is used as part of some variable names inside the macro,
so you should not use punctuation other than underscores.
The short name ("exodus") will be used as the string name for the bridge and
in other macros like :smtk:`smtkComponentInitMacro` when you name the bridge
The short name ("exodus") will be used as the string name for the session and
in other macros like :smtk:`smtkComponentInitMacro` when you name the session
as a component to be initialized at link-time.
2. A string containing a valid JSON dictionary describing the capabilities of the bridge.
We pass the argument :cxx:`Bridge_json`, which is defined in the :file:`Bridge_json.h`
2. A string containing a valid JSON dictionary describing the capabilities of the session.
We pass the argument :cxx:`Session_json`, which is defined in the :file:`Session_json.h`
header file.
The header is generated by the CMake :cmake:`smtk_bridge_json` macro,
The header is generated by the CMake :cmake:`smtk_session_json` macro,
which simply encodes the contents of a JSON file as a C string for your convenience.
The Exodus bridge has the following description:
The Exodus session has the following description:
.. literalinclude:: ../../../smtk/bridge/exodus/Bridge.json
.. literalinclude:: ../../../smtk/bridge/exodus/Session.json
At a minimum, the JSON dictionary must include
+ The "kernel" entry set to the name of the bridge.
+ The "kernel" entry set to the name of the session.
The kernel name should match the "short" name passed to :smtk:`smtkImplementsModelingKernel`.
+ A list of modeling engines that the kernel supports and the capabilities of each.
If your bridge only supports a single modeling engine, use the name "default" as the Exodus bridge does.
If your session only supports a single modeling engine, use the name "default" as the Exodus session does.
At a minimum, the capabilities for each engine should include a list of
file extensions that the bridge can read.
file extensions that the session can read.
The list of standard capabilities will be expanded in in the future,
but even now can be used by bridges in an ad-hoc manner.
but even now can be used by sessions in an ad-hoc manner.
3. An :cxx:`smtk::function` to be invoked with any configuration parameters
before an instance of the bridge is created.
before an instance of the session is created.
The function should take two arguments:
a :smtk:`String` parameter name and
a :smtk:`StringList` parameter value.
If you do not have any static configuration parameters, then
simply pass :smtk:`BridgeHasNoStaticSetup`.
The CGM bridge provides an implementation of this to set the default
simply pass :smtk:`SessionHasNoStaticSetup`.
The CGM session provides an implementation of this to set the default
modeling kernel engine (e.g., to either OpenCascade or ACIS) since the
engine should be prepared before the bridge is constructed.
Otherwise, the modeling operations listed in the bridge's
engine should be prepared before the session is constructed.
Otherwise, the modeling operations listed in the session's
attribute system might not reflect those available for the engine
being used.
4. The fully-qualified name of the bridge class, including namespaces.
4. The fully-qualified name of the session class, including namespaces.
5. Either :cxx:`true` or :cxx:`false`, used to indicate whether the
bridge should inherit operators from its subclass.
You should pass true unless your bridge is a "forwarding" bridge
session should inherit operators from its subclass.
You should pass true unless your session is a "forwarding" session
(i.e., one that forwards operations to a remote process rather than
performing them locally).
Bridge constructor
Session constructor
------------------
Besides the macro declaration, your constructor **must** provide
the base class with the place it stores information
about bridge-specific operators:
about session-specific operators:
.. literalinclude:: ../../../smtk/bridge/exodus/Bridge.cxx
.. literalinclude:: ../../../smtk/bridge/exodus/Session.cxx
:start-after: // ++ 2 ++
:end-before: // -- 2 --
The :smtk:`Bridge::initializeOperatorSystem` method creates
The :smtk:`Session::initializeOperatorSystem` method creates
a new attribute :smtk:`System` and populates it with all the
operators in the given :cxx:`Bridge::s_operators` member,
operators in the given :cxx:`Session::s_operators` member,
which is declared by the :cxx:`smtkDeclareModelingKernel` macro
and instantiated by the :cxx:`smtkImplementsModelingKernel` macro.
This allows bridge-specific operators to be statically initialized and
This allows session-specific operators to be statically initialized and
registered at link-time.
The :cxx:`Bridge::s_operators` member is populated with operators by calls to
The :cxx:`Session::s_operators` member is populated with operators by calls to
the :smtk:`smtkImplementsModelOperator` macro inside each operator's
implementation.
Now that we have defined a mapping between UUIDs
and model entities, the next step is to have the
bridge transcribe information about foreign model
session transcribe information about foreign model
entities into a :smtk:`model manager <smtk::model::Manager>`
instance.
......@@ -9,7 +9,7 @@ Adding Entity UUIDs
*******************
The first step in adapting foreign modeling kernels to SMTK,
which you should do before you start subclassing Bridge,
which you should do before you start subclassing Session,
is deciding how to assign UUIDs to entities in the foreign
modeling kernel so that
......@@ -39,7 +39,7 @@ UUIDs:
it also saves session information, it can be used to
"restore" a modeling session so that the same files
are loaded on the server and the UUIDs preserved.
*This is the approach our Exodus bridge example takes.*
*This is the approach our Exodus session example takes.*
The advantage to the first approach is that modeling
kernels with attribute systems generally provide a way
......@@ -51,7 +51,7 @@ the topology of the model.
Adding UUIDs by either technique
--------------------------------
Regardless of the path you take above, your bridge should provide
Regardless of the path you take above, your session should provide
public methods to map both directions.
The function mapping UUIDs to foreign entities will have a
return type that is specific to your modeling kernel,
......@@ -59,7 +59,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/Bridge.h
.. literalinclude:: ../../../smtk/bridge/exodus/Session.h
:start-after: // ++ 2 ++
:end-before: // -- 2 --
......@@ -68,12 +68,12 @@ or group it exposes to SMTK:
(1) the type of object being exposed (an Exodus model, an element
block, a side set, or a node set),
(2) the offset of the model in a vector of vtkMultiBlockDataSet
instances held by the bridge (one per Exodus file)
instances held by the session (one per Exodus file)
(3) the ID of the block holding the vtkUnstructuredGrid that contains
the tessellation information for the object (or -1 when the object
is an Exodus MODEL since it has no tessellation, only groups).
Given an :cxx:`EntityHandle` we can easily look up the vtkUnstructuredGrid
in the Bridge's :cxx:`m_models` member.
in the Session's :cxx:`m_models` member.
Adding UUIDs as attributes
--------------------------
......@@ -84,7 +84,7 @@ attribute system either as a 16-byte binary blob or an ASCII string
per entity.
For example, if we wished to make VTK points and cells available
via a bridge, we could store UUIDs on VTK grids as point and cell data arrays.
via a session, we could store UUIDs on VTK grids as point and cell data arrays.
It would be more space-efficient to store these in a 2-component
:cxx:`vtkTypeUInt64Array` (2 components for a total of 128 bits per UUID),
but much easier to debug if we store UUIDs in :cxx:`vtkStringArray`
......@@ -105,10 +105,10 @@ UUIDs and assigning it to the vtkInformation object on the dataset
or filter.
Although not required by this technique, you should be aware that you
may store information about a particular bridge session instance in
an SMTK JSON file by subclassing the :smtk:`BridgeIOJSON` class.
may store information about a particular session session instance in
an SMTK JSON file by subclassing the :smtk:`SessionIOJSON` class.
.. _bridge-by-sequence:
.. _session-by-sequence:
Adding UUIDs as sequences
-------------------------
......@@ -116,16 +116,16 @@ Adding UUIDs as sequences
If you must store UUIDs in an SMTK JSON file according to some stable
traversal order, then you should
1. store the arrays in your bridge class in the proper order and use
1. store the arrays in your session class in the proper order and use
them to perform the lookups.
.. literalinclude:: ../../../smtk/bridge/exodus/Bridge.cxx
.. literalinclude:: ../../../smtk/bridge/exodus/Session.cxx
:start-after: // ++ 2 ++
:end-before: // -- 2 --
2. subclass :smtk:`BridgeIOJSON` in order to preserve the UUID arrays:
2. subclass :smtk:`SessionIOJSON` in order to preserve the UUID arrays:
.. literalinclude:: ../../../smtk/bridge/exodus/BridgeExodusIOJSON.h
.. literalinclude:: ../../../smtk/bridge/exodus/SessionExodusIOJSON.h
:start-after: // ++ 1 ++
:end-before: // -- 1 --