class MAGES::SceneGraph::ImplementsEffectAttribute

Overview

An attribute used to deisgnate EffectImplementor as the implementor for a given EffectData for an BaseActionData. More…

class ImplementsEffectAttribute: public System.Attribute
{
public:
    // properties

    System.Type ActionDataType;
    System.Type EffectDataType;

    // methods

    ImplementsEffectAttribute(
        System.Type effectDataType,
        System.Type actionDataType
    );

    bool IsApplicable(System.Type actionDataType, System.Type effectDataType);

    static bool ImplementsEffectForAction(
        System.Type implementor,
        System.Type actionDataType,
        System.Type effectDataType
    );
};

Detailed Documentation

An attribute used to deisgnate EffectImplementor as the implementor for a given EffectData for an BaseActionData.

Properties

System.Type ActionDataType

Gets the type of the action data for which effect this implementor is used.

System.Type EffectDataType

Gets the type of the effect data that this implementor implements.

Methods

ImplementsEffectAttribute(
    System.Type effectDataType,
    System.Type actionDataType
)

Initializes a new instance of the ImplementsEffectAttribute class.

Parameters:

effectDataType

The type of the effect data that this implementor implements.

actionDataType

The type of the action data for which effect this implementor is used.

bool IsApplicable(System.Type actionDataType, System.Type effectDataType)

Returns whether this implementor is applicable to the given action and effect data types.

Parameters:

actionDataType

The action data type to test against.

effectDataType

The effect data type to test against.

Returns:

True if the implementor is valid for this context.

static bool ImplementsEffectForAction(
    System.Type implementor,
    System.Type actionDataType,
    System.Type effectDataType
)

Shorthand for ImplementsEffectAttribute.IsApplicable(System.Type, System.Type).

Parameters:

implementor

The implementor type to test.

actionDataType

The action data type to test this implementor against.

effectDataType

The effect data type to test this implementor against.

Returns:

True if this implementor implements the effect for the action.