SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
smtk
geometry
Backend.h
1
//=========================================================================
2
// Copyright (c) Kitware, Inc.
3
// All rights reserved.
4
// See LICENSE.txt for details.
5
//
6
// This software is distributed WITHOUT ANY WARRANTY; without even
7
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8
// PURPOSE. See the above copyright notice for more information.
9
//=========================================================================
10
11
#ifndef smtk_geometry_Backend_h
12
#define smtk_geometry_Backend_h
13
14
#include "smtk/CoreExports.h"
15
16
#include <string>
17
#include <typeindex>
18
19
namespace
smtk
20
{
21
namespace
geometry
22
{
23
28
class
SMTKCORE_EXPORT
Backend
29
{
30
public
:
31
using
index_t = std::size_t;
32
virtual
~
Backend
() =
default
;
33
35
virtual
index_t
index
()
const
{
return
std::type_index(
typeid
(*
this
)).hash_code(); }
36
38
virtual
std::string name()
const
= 0;
39
};
40
41
}
// namespace geometry
42
}
// namespace smtk
43
44
#endif // smtk_geometry_Backend_h
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition:
doc.h:33
smtk::geometry::Backend::index
virtual index_t index() const
Index is a compile-time intrinsic of the derived backend. It is used for disambiguation of backends.
Definition:
Backend.h:35
smtk::geometry::Backend
This is an empty class used by geometry providers to specify their interface.
Definition:
Backend.h:28
Generated by
1.8.17