00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef OPENCAL_AGENT_H
00012
#define OPENCAL_AGENT_H
00013
00014
00015
#include <OpenCAL/global.h>
00016
00017
namespace OpenCAL
00018 {
00019
00020
class System;
00021
00025 class OPENCAL_API Agent
00026 {
00027
protected:
00028
00029
System *m_parent;
00030
bool m_initialized;
00031
bool m_enabled;
00032
00033
00034
public:
00035
00036
virtual ~Agent();
00037
00038
00039
const System *getParent()
const {
return m_parent; }
00040
00041
00042
bool isEnabled()
const {
return m_enabled; }
00043
void enable() { m_enabled =
true; }
00044
void disable() { m_enabled =
false; }
00045
void toggle() { m_enabled = !m_enabled; }
00046
void setEnabled(
bool enabled) { m_enabled = enabled; }
00047
00048
00049
virtual bool isInitialized()
const {
return m_initialized; }
00050
virtual void initialize();
00051
00052
00053
virtual void satisfy();
00054
00055
protected:
00056
00058 Agent(
System *parent);
00059 };
00060 };
00061
00062
#endif // OPENCAL_AGENT_H