SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Namespaces | Classes | Functions | Variables
smtk Namespace Reference

The main namespace for the Simulation Modeling Tool Kit (SMTK). More...

Namespaces

 attribute
 Define attributes describing simulation inputs.
 
 common
 Classes used throughout the toolkit.
 
 extension
 Extensions to SMTK that introduce external dependencies.
 
 geometry
 A subsystem for attaching renderable geometry to components and resources.
 
 graph
 Subsystem for modeling using nodes connected to one another by arcs.
 
 io
 I/O utilities for the toolkit.
 
 markup
 Markup resource.
 
 mesh
 Mesh representation, classification, and manipulation.
 
 model
 Represent geometric and topological models of simulation domains.
 
 operation
 A common base class for operators that act on resources and a manager to track subclasses.
 
 plugin
 A subsystem for extending the functionality of SMTK at run time.
 
 project
 Projects organize a user workspace.
 
 resource
 A common base class for resources (data stored in files) and tools to manage them.
 
 session
 Sessions for solid modeling kernels.
 
 simulation
 Tools for exporting simulation input decks from attributes.
 
 string
 A subsystem for efficiently representing strings as fixed-size tokens (hashes).
 
 task
 User-interface tasks.
 
 view
 Classes for presenting resources and their components to users.
 
 workflow
 workflow managment.
 

Classes

struct  conjunction
 True when all template parameters are "truthy". More...
 
struct  conjunction< B1 >
 
struct  conjunction< B1, Bn... >
 
struct  disjunction
 True when any template parameter is "truthy". More...
 
struct  disjunction< B1 >
 
struct  disjunction< B1, Bn... >
 
struct  flatten_tuple
 Takes a tuple of tuples and types and returns a tuple of the tuple contents and the plain types. More...
 
struct  flatten_tuple< std::tuple< std::tuple< TupleArgs... >, Args... > >
 
struct  flatten_tuple< std::tuple< T, Args... > >
 
struct  flatten_tuple< std::tuple<> >
 
struct  identity
 Embeds a type in another class so its type information can be passed as a parameter. More...
 
struct  index_sequence
 
struct  index_sequence< 0, S... >
 
struct  negation
 A "polyfill" for std::negation, introduced in c++17. More...
 
struct  recursive
 Takes a template class and a tuple and returns a tuple of elements transformed by the template class, recursing through nested tuples if necessary. More...
 
struct  recursive< X, std::tuple< Args... > >
 
struct  remove_bases_from_tuple
 Takes a tuple and removes any types that are bases of any other types in the tuple. More...
 
struct  remove_from_tuple
 Takes a type and a tuple of types and returns a tuple with all of the original types sans the input type. More...
 
struct  remove_from_tuple< T, std::tuple< T, Args... > >
 
struct  remove_from_tuple< T, std::tuple< X, Args... > >
 
struct  remove_from_tuple< T, std::tuple<> >
 
struct  reverse_tuple
 Takes a tuple and reverses its arguments. More...
 
struct  reverse_tuple< std::tuple< T > >
 
struct  reverse_tuple< std::tuple< T, Args... > >
 
struct  sequence
 
struct  tuple_contains
 Takes a type and a tuple of types and returns a bool indicating whether or not the type is in the tuple. More...
 
struct  tuple_contains< T, std::tuple< T, Ts... > >
 
struct  tuple_contains< T, std::tuple< U, Ts... > >
 
struct  tuple_contains< T, std::tuple<> >
 
struct  tuple_index
 Takes a type and a tuple of types and returns the index of the first instance of that type in the tuple. More...
 
struct  tuple_index< T, std::tuple< T, Types... > >
 
struct  tuple_index< T, std::tuple< U, Types... > >
 
struct  tuple_reduce
 A reduce operation for tuples of typenames. More...
 
struct  type_switch
 Select between two types with a boolean template parameter. More...
 
struct  type_switch< false, type_when_selector_true, type_when_selector_false >
 
struct  unique_tuple
 Takes a tuple of potentially duplicate types and returns a tuple with the duplicate types removed. More...
 
struct  unique_tuple< std::tuple< T > >
 
struct  unique_tuple< std::tuple< T, Args... > >
 
struct  unique_tuple< std::tuple<> >
 

Functions

template<typename Functor , size_t I = 0, typename... Ts>
std::enable_if< I==sizeof...(Ts), void >::type apply (Functor &f, std::tuple< Ts... > tup)
 Apply a functor to each element of a tuple. More...
 
template<typename Functor , size_t I = 0, typename... Ts>
std::enable_if<(I< sizeof...(Ts)), void >::type apply (Functor &f, std::tuple< Ts... > tup)
 
template<typename Tuple , std::size_t I = 0, typename Functor >
std::enable_if< I==std::tuple_size< Tuple >::value, void >::type tuple_evaluate (Functor &f)
 Invoke a Functor's evaluate() method on each type specified in a tuple. More...
 
template<typename Tuple , std::size_t I = 0, typename Functor >
std::enable_if<(I< std::tuple_size< Tuple >::value), void >::type tuple_evaluate (Functor &f)
 

Variables

bool instantiated = instantiateManager()
 

Detailed Description

The main namespace for the Simulation Modeling Tool Kit (SMTK).

Export a SMTK mesh to a file in the XMS format.

Mesh IO formats.

Export an SMTK mesh to a file.

Provides a model dialog for launching SMTK operations.

Provides the QT UI for a Resource Component Attribute View.

A Component Attribute View is similar to an Attribute View in that it used to create and delete attributes. However, unlike the Attribute View, an attribute is associated to only one Component of a Resource. All appropriate Components are listed in the first column of a table and their corresponding attributes (by type) are listed in the second column.

The structure of the Component Attribute View has the following Top-Level view attributes in addition to those that Attribute Views have:

See also
qtAttributeView

The intended use is for modelbuilder plugins that use menu or similar actions to invoke SMTK operations. (For example, export operations are typically run from a modal dialog.) The dialog is created as a QTabWidget with 2 tabs. The first tab embeds a qtOperationView for the operation, and the second tab displays the operation's "info" content. The dialog replaces and hides the "Apply", "Info" and "Cancel" buttons and consumes their Qt connections.

Function Documentation

◆ apply()

template<typename Functor , size_t I = 0, typename... Ts>
std::enable_if<I == sizeof...(Ts), void>::type smtk::apply ( Functor &  f,
std::tuple< Ts... >  tup 
)

Apply a functor to each element of a tuple.

This is similar in intent to std::apply() but written to work for c++11 (whereas std::apply() is only available in c++17).

Example:

{c++}
struct Printer
{
template<typename T>
void operator() (std::size_t ii, const T& thing)
{
if (ii == 0)
{
std::cout << thing;
}
else
{
std::cout << " " << thing;
}
}
};
int main()
{
using namespace std;
tuple<string, string, string, int, string> tup("The", "answer", "is", 42, "\n");
Printer p;
smtk::apply(p, tup);
}

◆ tuple_evaluate()

template<typename Tuple , std::size_t I = 0, typename Functor >
std::enable_if<I == std::tuple_size<Tuple>::value, void>::type smtk::tuple_evaluate ( Functor &  f)

Invoke a Functor's evaluate() method on each type specified in a tuple.

Unlike smtk::tuple_reduce, evaluate() takes a reference to a Functor instance and may alter its state. (The tuple_reduce functor only produces a type-alias as its output and is evaluated solely at compile time.)

Example:

{c++}
struct Printer
{
// NB: Instead of the parenthesis operator, you must
// provide an evaluate(std::size_t) method.
// (There is no way to invoke a templated parenthesis
// operator if the template parameters cannot be
// deduced from its signature.)
template<typename T>
void evaluate(std::size_t ii)
{
std::cout << ii << " type " << smtk::common::typeName<T>() << "\n";
}
};
Printer p;
using ttype = tuple<string, string, int, string>;
smtk::tuple_evaluate<ttype>(p);
smtk::apply
std::enable_if< I==sizeof...(Ts), void >::type apply(Functor &f, std::tuple< Ts... > tup)
Apply a functor to each element of a tuple.
Definition: TupleTraits.h:455