PCB Environment 2
Loading...
Searching...
No Matches
Action Class Reference

NOTE: Actions always set the Agent's least recently used connction (getConnectionLRU()) which is somewhat ugly for actions affecting multiple connections - we should probably return a set of affected connections if we ever have actions that change more than one (other than clustering which doesn't really change anything). More...

#include <Action.hpp>

Data Structures

struct  Result

Public Types

using Index = uint16_t
using CacheRef = uint32_t

Public Member Functions

 Action (const std::string &name, uint index=std::numeric_limits< Index >::max())
const std::string & name () const
Index index () const
bool legal () const
virtual Result performAs (Agent &context, PyObject *arg=0)
virtual void clearCache (CacheRef=0)
virtual Result performAs (Agent &context, PyObject *arg, CacheRef)
virtual Result undoAs (Agent &)
ActiongetUndo () const
void setUndo (Action *A)
void setIndex (Index a)
void setLegal (bool b)
void setActionCountIncrement (uint n)
virtual PyObject * getPy () const

Static Public Attributes

static constexpr const Index IndexNone = std::numeric_limits<Index>::max()

Protected Attributes

ActionmUndo {0}
uint mActionCountIncrement {1}

Detailed Description

NOTE: Actions always set the Agent's least recently used connction (getConnectionLRU()) which is somewhat ugly for actions affecting multiple connections - we should probably return a set of affected connections if we ever have actions that change more than one (other than clustering which doesn't really change anything).


The documentation for this class was generated from the following file: