SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
IDs assigned in an ordered sequence to a component. More...
#include <SequentialAssignedIds.h>
Classes | |
struct | Iterator |
An iterator for simple, monotonically-increasing IDs. More... | |
Public Types | |
using | AssignedIdCtor = std::function< std::shared_ptr< AssignedIds >(const std::shared_ptr< IdSpace > &, IdNature, IdType, IdType)> |
enum | Forwardness |
The access-level of iteration (constant or mutable), used as a template parameter. More... | |
Public Types inherited from smtk::markup::AssignedIds | |
enum | Forwardness { Forward, Reverse } |
The access-level of iteration (constant or mutable), used as a template parameter. More... | |
using | IdType = smtk::markup::IdType |
using | IdIterator = struct { smtk::markup::IdSpace *idSpace |
using | IdRange = std::array< IdType, 2 > |
using | AssignedIdCtor = std::function< std::shared_ptr< AssignedIds >(const std::shared_ptr< IdSpace > &, IdNature, IdType, IdType)> |
Public Member Functions | |
smtkTypeMacro (smtk::markup::SequentialAssignedIds) | |
smtkSuperclassMacro (smtk::markup::AssignedIds) | |
template<typename... Args> | |
SequentialAssignedIds (const std::shared_ptr< IdSpace > &space, IdNature nature, IdType begin, IdType end, Component *owningNode, Args &&...) | |
AssignedIdCtor | cloneFunctor () const override |
Provide a constructor functor to be passed to IdSpace::requestRange(). | |
IdRange | range () const |
Returns the range of IDs in the allotment. | |
IdType | size () const |
Return the number of allotted IDs. More... | |
IdType | maxId () const |
Return the number of allotted IDs less 1 (as a convenience for iteration). | |
bool | empty () const |
Return true when no IDs are assigned. | |
Iterator< Forward > | begin () const |
Return an iterator pointing to the first assigned ID. | |
Iterator< Forward > | end () const |
Return an iterator just past the end of the last assigned ID. | |
Iterator< Reverse > | rbegin () const |
Return an iterator pointing to the last assigned ID. | |
Iterator< Reverse > | rend () const |
Return an iterator just before the beginning of the first assigned ID. | |
IdType | contains (IdType begin, IdType end) const |
Return the number of allotted ids in the half-open interval [begin, end[. | |
template<typename Functor > | |
smtk::common::Visited | visit (Functor visitor) const |
Call visitor on each alloted ID. | |
Public Member Functions inherited from smtk::markup::AssignedIds | |
smtkTypeMacroBase (smtk::markup::AssignedIds) | |
template<typename... Args> | |
AssignedIds (const std::shared_ptr< IdSpace > &space, IdNature nature, IdType begin, IdType end, Component *owningNode, Args &&...) | |
IdRange | range () const |
Returns the range of IDs in the allotment. | |
IdType | size () const |
Return the number of allotted IDs. More... | |
bool | empty () const |
Return true when no IDs are assigned. | |
std::shared_ptr< smtk::markup::IdSpace > | space () const |
bool | setNature (const IdNature &nature) |
const IdNature & | nature () const |
IdNature & | nature () |
Component * | node () const |
template<typename NodeType > | |
NodeType * | nodeAs () const |
Additional Inherited Members | |
Public Attributes inherited from smtk::markup::AssignedIds | |
IdType | begin |
IdType | end |
IdNature | nature |
Protected Attributes inherited from smtk::markup::AssignedIds | |
std::weak_ptr< smtk::markup::IdSpace > | m_space |
The parent space from which our assigned IDs come. | |
IdRange | m_range |
The overall range of the assignment (used to accelerate intersection tests). | |
IdNature | m_nature |
The nature of the assignment (ownership or reference; exclusive or non-exclusive). | |
Component * | m_node |
The graph node which owns the assignment (if any). | |
IDs assigned in an ordered sequence to a component.
Because the IDs are sequential, the component does not need to store them directly – only an offset between the index into the component and the starting ID is required.
The access-level of iteration (constant or mutable), used as a template parameter.
The direction of iteration (used as a template parameter for subclass iterators).
IdType smtk::markup::SequentialAssignedIds::size | ( | ) | const |