Table of Contents

Class Action<TBeliefSet>

Namespace
Aplib.Core.Intent.Actions
Assembly
Aplib.Core.dll

Describes an action that can be executed and guarded.

public class Action<TBeliefSet> : IAction<TBeliefSet>, ILoggable, IDocumented where TBeliefSet : IBeliefSet

Type Parameters

TBeliefSet

The belief set of the agent.

Inheritance
Action<TBeliefSet>
Implements
IAction<TBeliefSet>
Derived
Inherited Members
Extension Methods

Constructors

Action(IMetadata, Action<TBeliefSet>)

Initializes a new instance of the Action<TBeliefSet> class.

public Action(IMetadata metadata, Action<TBeliefSet> effect)

Parameters

metadata IMetadata

Metadata about this action, used to quickly display the action in several contexts.

effect Action<TBeliefSet>

The effect of the action.

Action(Action<TBeliefSet>)

Initializes a new instance of the Action<TBeliefSet> class.

public Action(Action<TBeliefSet> effect)

Parameters

effect Action<TBeliefSet>

The effect of the action.

Fields

_effect

Gets or sets the effect of the action.

protected readonly Action<TBeliefSet> _effect

Field Value

Action<TBeliefSet>

Properties

Metadata

Gets the metadata of the instance. This metadata may be useful for debugging or logging.

public IMetadata Metadata { get; }

Property Value

IMetadata

Methods

Execute(TBeliefSet)

Executes the action on the specified belief set.

public virtual void Execute(TBeliefSet beliefSet)

Parameters

beliefSet TBeliefSet

The belief set on which the action is executed.

GetLogChildren()

Actions do not have children, as they are the lowest level of the hierarchy.

public IEnumerable<ILoggable> GetLogChildren()

Returns

IEnumerable<ILoggable>

An empty enumerable.