Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

Agent.h

00001 /*************************************************************************** 00002 * This file is part of OpenCAL: Open Computer Animation Library * 00003 * I created OpenCAL as my master's thesis Computer Science (multimedia) * 00004 * at the tUL university in Diepenbeek, Belgium * 00005 * * 00006 * Copyright (C) 2003-2004 by Jeroen Dierckx * 00007 * jeroen.dierckx@student.luc.ac.be * 00008 * * 00009 ***************************************************************************/ 00010 00011 #ifndef OPENCAL_AGENT_H 00012 #define OPENCAL_AGENT_H 00013 00014 // Includes 00015 #include <OpenCAL/global.h> 00016 00017 namespace OpenCAL 00018 { 00019 // Forward declarations 00020 class System; 00021 00025 class OPENCAL_API Agent 00026 { 00027 protected: 00028 // Member variables 00029 System *m_parent; 00030 bool m_initialized; 00031 bool m_enabled; 00032 00033 00034 public: 00035 // Destructor 00036 virtual ~Agent(); 00037 00038 // Get functions 00039 const System *getParent() const { return m_parent; } 00040 00041 // Enable functions 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 // General functions 00049 virtual bool isInitialized() const { return m_initialized; } 00050 virtual void initialize(); 00051 00052 // Satisfy agents 00053 virtual void satisfy(); 00054 00055 protected: 00056 // Constructors 00058 Agent(System *parent); 00059 }; 00060 }; 00061 00062 #endif // OPENCAL_AGENT_H

Generated on Sun Aug 15 19:19:21 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8