Open Search
    FId< T, KEYTYPE, HELPER > Class Template Reference

    #include <fid.h>

    Detailed Description

    template<typename T, typename KEYTYPE, typename HELPER = void>
    class maxon::FId< T, KEYTYPE, HELPER >

    FId class for ids with datatype type. this makes Set/Get functions type safe. use FID and DEFINE_ID macros to use in the code. e.g. FID(1000,Float64) or MAXON_ATTRIBUTE(Float64, MYID_RADIUS, 1000) you can use:

    template <typename KEY, typename DATA> MAXON_FUNCTION typename std::enable_if<!IsFidClass<KEY>::value, Result<void>>::type Set(KEY&& key, DATA&& data)
    template <typename T> MAXON_FUNCTION Result<void> Set(FId<T> key, T&& data)
    template <typename T> MAXON_FUNCTION Result<void> Set(FId<T> key, const T& data)
    #define Set(a0, a1, a2, a3, a4, a5)
    Definition: Python-ast.h:586
    PyObject * value
    Definition: abstract.h:715
    PyObject * key
    Definition: abstract.h:289
    #define MAXON_FUNCTION
    Definition: interfacebase.h:1041
    PyObject ** type
    Definition: pycore_pyerrors.h:34

    to define template functions that are allow specialization of Fid<T>

    Template Parameters
    TData type for this id.

    Public Types

    using FidType = T
     

    Public Member Functions

    constexpr FId (const KEYTYPE &iid)
     
    const KEYTYPE & Get () const
     
     operator const KEYTYPE & () const
     
    Bool operator== (const InternedId &other) const
     
    Bool operator!= (const InternedId &other) const
     

    Static Public Member Functions

    static constexpr LiteralId PrivateGetLiteralId (const KEYTYPE &)
     

    Static Public Attributes

    static constexpr Bool READONLY
     

    Private Attributes

    const KEYTYPE _id
     

    Member Typedef Documentation

    ◆ FidType

    using FidType = T

    Constructor & Destructor Documentation

    ◆ FId()

    constexpr FId ( const KEYTYPE &  iid)
    explicitconstexpr

    Member Function Documentation

    ◆ Get()

    const KEYTYPE& Get ( ) const

    ◆ operator const KEYTYPE &()

    operator const KEYTYPE & ( ) const

    ◆ PrivateGetLiteralId()

    static constexpr LiteralId PrivateGetLiteralId ( const KEYTYPE &  )
    staticconstexpr

    ◆ operator==()

    Bool operator== ( const InternedId other) const

    ◆ operator!=()

    Bool operator!= ( const InternedId other) const

    Member Data Documentation

    ◆ _id

    const KEYTYPE _id
    private

    ◆ READONLY

    constexpr Bool READONLY
    staticconstexpr