Open Search
    fid.h File Reference

    Classes

    class  FId< T, KEYTYPE, HELPER >
     
    struct  InternedIdFidBase
     
    class  AttributeInternedId
     
    class  FId< T, InternedId, HELPER >
     
    class  PrivateFIdBase< T, KEY, HELPER >
     
    class  PrivateFIdBase< T, const char(&)[N], HELPER >
     
    class  InternedIdSwitch
     
    class  IdSwitch
     
    class  LiteralIdSwitch
     
    class  DataIdSwitch
     
    class  IdSwitchCheck< BASE >
     
    class  RESTRICT
     
    class  ValidKeyValuePairTraitHelper< ILLEGALTYPE, OTHERILLEGALTYPES >
     
    class  ValidKeyValuePairTraitHelper< ILLEGALTYPE >
     
    class  ValidKeyValuePairTrait< ILLEGALTYPES >
     

    Namespaces

     maxon
     
     maxon::details
     

    Macros

    #define FID(IID, TYPE)
     
    #define RESOURCE_DEFINE(ID, VAL)
     
    #define RESOURCE_DEFAULT(...)
     
    #define MAXON_RESOURCE_DATABASE_SCOPE(id)
     
    #define PRIVATE_RESOURCE_ID_CLASS(UID, IID, TYPE, STORAGE, ...)
     
    #define MAXON_ATTRIBUTE(TYPE, NAME, RID, ...)
     
    #define MAXON_ATTRIBUTE_READONLY
     
    #define decltype_nonconst(...)
     
    #define MAXON_ATTRIBUTE_CLASS(TYPE, NAME, RID, ...)
     
    #define ID_SWITCH(key)
     
    #define PRIVATE_ID_CASE(key, line)
     
    #define PRIVATE_ID_ENUM_CASE(key, line)
     
    #define ID_CASE(key)
     
    #define ID_ENUM_CASE(key)
     

    Typedefs

    using Group = void
     

    Functions

    constexpr maxon::LiteralId PrivateGetDatabaseScope ()
     
    template<typename HELPER >
    const AttributeInternedId g_attributeInternedId (HELPER::GetId().GetCString())
     
     MAXON_MEMBERTYPE_DETECTOR (IsFidClass, FidType, std::false_type)
     
    IdSwitchCheck< InternedIdSwitch > GetIdSwitch (const InternedId &iid, OverloadRank2)
     
    IdSwitchCheck< InternedIdSwitch > GetIdSwitch (const InternedId *iid, OverloadRank2)
     
    IdSwitchCheck< IdSwitch > GetIdSwitch (const Id &id, OverloadRank1)
     
    IdSwitchCheck< LiteralIdSwitch > GetIdSwitch (const LiteralId &id, OverloadRank1)
     
    IdSwitchCheck< DataIdSwitch > GetIdSwitch (const ConstDataPtr &data, OverloadRank0)
     
    IdSwitchCheck< DataIdSwitch > GetIdSwitch (const ForwardingDataPtr &data, OverloadRank0)
     
    template<typename RESTRICT , Bool ONLYFID, typename KEY >
    std::enable_if<!IsFidClass< KEY >::value, typename std::conditional< STD_IS_REPLACEMENT(reference, KEY)||STD_IS_REPLACEMENT(const, KEY), ConstDataPtr, MoveDataPtr >::type >::type ConvertKeyToDataPtr (KEY &&key)
     
    template<typename RESTRICT , Bool ONLYFID, typename KEY >
    std::enable_if< IsFidClass< KEY >::value, ConstDataPtr >::type ConvertKeyToDataPtr (KEY &&key)
     
    template<typename T >
    RESTRICT TestRestriction (T y, OverloadRank0)
     
     MAXON_MEMBERTYPE_DETECTOR (GetRestrict, RESTRICT_DICTIONARY_PROPS, maxon::RESTRICT)
     

    Macro Definition Documentation

    ◆ FID

    #define FID (   IID,
      TYPE 
    )

    Defines a resource id with type. E.g. FID(1000, Real) allows to set this type directly into a DataDictionary. The Set()/Get() of the DataDictionary then is type checked.

    ◆ RESOURCE_DEFINE

    #define RESOURCE_DEFINE (   ID,
      VAL 
    )

    ◆ RESOURCE_DEFAULT

    #define RESOURCE_DEFAULT (   ...)

    defines the default value

    ◆ MAXON_RESOURCE_DATABASE_SCOPE

    #define MAXON_RESOURCE_DATABASE_SCOPE (   id)

    ◆ PRIVATE_RESOURCE_ID_CLASS

    #define PRIVATE_RESOURCE_ID_CLASS (   UID,
      IID,
      TYPE,
      STORAGE,
      ... 
    )

    ◆ MAXON_ATTRIBUTE

    #define MAXON_ATTRIBUTE (   TYPE,
      NAME,
      RID,
      ... 
    )

    Declares a resource id with type in the current namespace. E.g.,

    COLOR
    Vector.
    Definition: c4d_basebitmap.h:5
    #define MAXON_ATTRIBUTE(TYPE, NAME, RID,...)
    Definition: fid.h:257

    declares a resource id COLOR in the current namespace which uses 1000 as its key in dictionaries and has values of type Vector32. You have to make sure that you don't use different resource ids with equal key in the same dictionary. TODO: (Anybody) naming convention.

    Parameters
    [in]TYPEThe type of the values of this resource id.
    [in]NAMEThe C++ name of the resource id. A global variable of that name will be added to the current namespace.
    [in]RIDThe resource id to be used as key in dictionaries. This can be of any type which is supported by DataType. A c-string literal will be treated as an InternedId.
    [in]...Further information about the resource, e.g. MAXON_ATTRIBUTE_READONLY.
    Note
    The macro itself leaves incomplete code which is completed by the source processor. So you have to place the macro in a header file, because the source processor only scans header files, and you have to include the generated hxx files in the header file.

    ◆ MAXON_ATTRIBUTE_READONLY

    #define MAXON_ATTRIBUTE_READONLY

    Can be used to mark a MAXON_ATTRIBUTE as read-only.

    #define MAXON_ATTRIBUTE_READONLY
    Definition: fid.h:265
    maxon::Bool Bool
    Definition: ge_sys_math.h:55
    static const IsEditableGroup_PrivateHelper & IsGroup
    Definition: nodeattributes.h:26

    ◆ decltype_nonconst

    #define decltype_nonconst (   ...)

    ◆ MAXON_ATTRIBUTE_CLASS

    #define MAXON_ATTRIBUTE_CLASS (   TYPE,
      NAME,
      RID,
      ... 
    )

    Declares a resource id with type as a class member in the current class. E.g.,

    MAXON_ATTRIBUTE_CLASS(Bool, WideningConversion, "widening");
    #define MAXON_ATTRIBUTE_CLASS(TYPE, NAME, RID,...)
    Definition: fid.h:286

    declares a resource id WideningConversion in the current class which uses "widening" as its key in dictionaries and has values of type Bool. You have to make sure that you don't use different resource ids with equal key in the same dictionary. TODO: (Anybody) naming convention.

    Parameters
    [in]TYPEThe type of the values of this resource id.
    [in]NAMEThe C++ name of the resource id. A static member variable of that name will be added to the current class.
    [in]RIDThe resource id to be used as key in dictionaries. This can be of any type which is supported by DataType. A c-string literal will be treated as an InternedId.
    [in]...Further information about the resource, e.g. MAXON_ATTRIBUTE_READONLY.
    Note
    The macro itself leaves incomplete code which is completed by the source processor. So you have to place the macro in a header file, because the source processor only scans header files, and you have to include the generated hxx files in the header file.

    ◆ ID_SWITCH

    #define ID_SWITCH (   key)

    ID_SWITCH and ID_CASE allow to use Id or InternedId values in a switch statement. ID_SWITCH has to wrap the switch expression, it supports switch expressions of type Id, InternedId, pointer to InternedId or ConstDataPtr/ForwardingDataPtr. Each case label has to be wrapped by ID_CASE, this supports ids that are declared by MAXON_INTERNED_ID, MAXON_DECLARATION or MAXON_ATTRIBUTE. Example:

    switch (ID_SWITCH(key))
    {
    case ID_CASE(STREAMFLAGS::HTTP_REMOTEADDRESS):
    return Data(_httpFile.GetRemoteAddr());
    break;
    case ID_CASE(STREAMFLAGS::HTTP_HEADER):
    return Data(_httpFile.GetHeader());
    break;
    }
    PyObject * key
    Definition: abstract.h:289
    #define ID_SWITCH(key)
    Definition: fid.h:487
    #define ID_CASE(key)
    Definition: fid.h:501
    Parameters
    [in]keyThe key to be used for the switch expression.
    Note
    These macros also support fallthroughs and multiple values for a single case block. Nesting of switch statements will most likely cause a warning about a shadowed local variable because each ID_SWITCH macro declares a local variable of name privateSwitchId in the scope of the switch statement.
    You will get a compile-time error in the rare case that two ids have the same hashcode. In this case you can't use a switch statement, you have to use if statements instead.

    ◆ PRIVATE_ID_CASE

    #define PRIVATE_ID_CASE (   key,
      line 
    )

    ◆ PRIVATE_ID_ENUM_CASE

    #define PRIVATE_ID_ENUM_CASE (   key,
      line 
    )

    ◆ ID_CASE

    #define ID_CASE (   key)

    ID_SWITCH and ID_CASE allow to use InternedId values in a switch statement, see ID_SWITCH.

    Parameters
    [in]keyThe key to be used for the case.

    ◆ ID_ENUM_CASE

    #define ID_ENUM_CASE (   key)

    ID_SWITCH and ID_ENUM_CASE allow to use enum LiteralId values in a switch statement, see ID_SWITCH. Should be used instead of the usual ID_CASE whenever an enum is defined using a RESOURCE_DEFINE with a LiteralId type.

    Parameters
    [in]keyThe key to be used for the case.

    Function Documentation

    ◆ PrivateGetDatabaseScope()

    constexpr maxon::LiteralId PrivateGetDatabaseScope ( )
    constexpr