115 m_site(-1), m_fSite(site), m_world(world), m_type(type)
166 const QMetaObject &QMO = Agent::staticMetaObject;
167 QMetaEnum QME = QMO.enumerator(QMO.indexOfEnumerator(
"Type"));
168 return QString(
"%1").arg(QME.valueToKey(e));
void setFutureSite(int site)
Set Agent future site.
Definition: agent.h:148
Agent(Type type, World &world, int site=0, QObject *parent=0)
Create an Agent.
Definition: agent.h:114
int getCurrentSite() const
Get Agent current site.
Definition: agent.h:133
A class that abstractly represents an object that can occupy grid sites.
Definition: agent.h:24
QTextStream & operator<<(QTextStream &stream, const Agent::Type e)
Output Agent type enum to stream.
Definition: agent.h:172
Defective Grid site.
Definition: agent.h:45
Type
An identifier for the type of Agent.
Definition: agent.h:33
SourceAgent.
Definition: agent.h:48
ElectronAgent.
Definition: agent.h:39
static QString toQString(const Agent::Type e)
Convert Agent type enum to QString.
Definition: agent.h:164
virtual ~Agent()
Destroy Agent.
Definition: agent.h:119
A class to hold all objects in a simulation.
Definition: world.h:51
Type m_type
Agent Type enum.
Definition: agent.h:111
int m_fSite
Future site the Agent will occupy.
Definition: agent.h:102
Type getType() const
Get Agent::Type enum.
Definition: agent.h:153
DrainAgent.
Definition: agent.h:51
HoleAgent.
Definition: agent.h:42
World & m_world
Reference to World object.
Definition: agent.h:105
Number of Agent Types.
Definition: agent.h:54
int m_site
Current site the Agent occupies.
Definition: agent.h:99
const QVector< int > & getNeighbors() const
Get Agent neighbor list.
Definition: agent.h:128
void setCurrentSite(int site)
Set Agent current site.
Definition: agent.h:143
World & getWorld() const
Get Langmuir::World reference.
Definition: agent.h:158
QVector< int > m_neighbors
List fo neighboring site ids.
Definition: agent.h:108
Empty Grid site.
Definition: agent.h:36
void setNeighbors(QVector< int > neighbors)
Set Agent neighbor list.
Definition: agent.h:123
int getFutureSite() const
Get Agent future site.
Definition: agent.h:138