Skip to content

Struct Argos::IndexType

template <typename Tag>

ClassList > Argos > IndexType

Strongly-typed index wrapper. More...

  • #include <TopologicMesh.h>

Public Attributes

Type Name
int value = -1

Public Functions

Type Name
IndexType () = default
IndexType (int v)
Construct from an integer value.
operator int () const
Implicit conversion back to the underlying integer.
bool operator!= (IndexType o) const
Inequality based on the underlying value.
IndexType & operator++ ()
Prefix increment.
IndexType operator++ (int)
Postfix increment.
bool operator< (IndexType o) const
Less-than based on the underlying value.
bool operator<= (IndexType o) const
Less-or-equal based on the underlying value.
bool operator== (IndexType o) const
Equality based on the underlying value.
bool operator> (IndexType o) const
Greater-than based on the underlying value.
bool operator>= (IndexType o) const
Greater-or-equal based on the underlying value.

Detailed Description

Provides compile-time type safety so that vertex, edge, and face indices cannot be accidentally interchanged. Each tag creates a distinct type.

Template parameters:

  • Tag Unique tag struct used to distinguish index types.

Public Attributes Documentation

variable value

int Argos::IndexType< Tag >::value;

Underlying integer value.


Public Functions Documentation

function IndexType [1/2]

Argos::IndexType::IndexType () = default

function IndexType [2/2]

Construct from an integer value.

inline explicit Argos::IndexType::IndexType (
    int v
) 

Parameters:

  • v Value to wrap.

function operator int

Implicit conversion back to the underlying integer.

inline Argos::IndexType::operator int () const


function operator!=

Inequality based on the underlying value.

inline bool Argos::IndexType::operator!= (
    IndexType o
) const


function operator++

Prefix increment.

inline IndexType & Argos::IndexType::operator++ () 


function operator++

Postfix increment.

inline IndexType Argos::IndexType::operator++ (
    int
) 


function operator<

Less-than based on the underlying value.

inline bool Argos::IndexType::operator< (
    IndexType o
) const


function operator<=

Less-or-equal based on the underlying value.

inline bool Argos::IndexType::operator<= (
    IndexType o
) const


function operator==

Equality based on the underlying value.

inline bool Argos::IndexType::operator== (
    IndexType o
) const


function operator>

Greater-than based on the underlying value.

inline bool Argos::IndexType::operator> (
    IndexType o
) const


function operator>=

Greater-or-equal based on the underlying value.

inline bool Argos::IndexType::operator>= (
    IndexType o
) const



The documentation for this class was generated from the following file include/mesh/TopologicMesh.h