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

PhxCore.h

Go to the documentation of this file.
00001 #ifndef PHX_CORE_H
00002 #define PHX_CORE_H
00003 
00004 #include <Phx/PhxConfig.h>
00005 #include <Phx/PhxTypes.h>
00006 
00007 // Needed util components
00008 #include <Phx/Util/PhxListeners.h>
00009 #include <Phx/Util/PhxLocks.h>
00010 
00011 // Core components
00012 #include <Phx/Core/PhxDescription.h>
00013 #include <Phx/Core/PhxNamedInterface.h>
00014 #include <Phx/Core/PhxModule.h>
00015 #include <Phx/Core/PhxClock.h>
00016 #include <Phx/Core/PhxEventNotifier.h>
00017 
00025 namespace Phx {
00026 
00035   class Core : public LockedPtrInterface<Core> {
00036   public:
00037 
00039     const static NamedInterface::Identifier FRAME_START_EVENT_NOTIFIER_IDENTIFIER;
00041     const static String FRAME_START_EVENT_NOTIFIER_NAME;
00042 
00044     const static NamedInterface::Identifier FRAME_END_EVENT_NOTIFIER_IDENTIFIER;
00046     const static String FRAME_END_EVENT_NOTIFIER_NAME;
00047 
00058     const static NamedInterface::Identifier QUIT_EVENT_NOTIFIER_IDENTIFIER;
00060     const static String QUIT_EVENT_NOTIFIER_NAME;
00061     
00070     const static NamedInterface::Identifier EXIT_EVENT_NOTIFIER_IDENTIFIER;
00072     const static String EXIT_EVENT_NOTIFIER_NAME;
00073 
00082     const static NamedInterface::Identifier WALL_CLOCK_IDENTIFIER;
00084     const static String WALL_CLOCK_NAME;
00085 
00095     const static NamedInterface::Identifier FRAME_CLOCK_IDENTIFIER;
00097     const static String FRAME_CLOCK_NAME;
00098     
00099     // Invoked by the program entry point.
00100     // This should NEVER be called by another client.
00101     virtual void main(void) = 0;
00102 
00103     // ---------  NAMED INTERFACE MANAGER ---------
00104 
00121     NamedInterface::Manager* namedInterfaceManager() { return mInterfaceManager.ptr(); }
00122 
00123     // const version of the above
00124     const NamedInterface::Manager* namedInterfaceManager() const { return mInterfaceManager.ptr(); }
00125 
00141     Description::Manager* descriptionManager() { return mDescriptionManager.ptr(); }
00142 
00143     // const version of the above
00144     const Description::Manager* descriptionManager() const { return mDescriptionManager.ptr(); }
00145 
00149     static Ptr<Core> newCore(void);
00150 
00151   protected:
00152     void setNamedInterfaceManager(const Ptr<NamedInterface::Manager>& manager)
00153       { mInterfaceManager = manager; }
00154 
00155     void setDescriptionManager(const Ptr<Description::Manager>& manager)
00156       { mDescriptionManager = manager; }
00157 
00158   private:
00159     Ptr<NamedInterface::Manager> mInterfaceManager;
00160     Ptr<Description::Manager>    mDescriptionManager;
00161   };
00162 
00163 }; // namespace Phx
00164 
00165 #endif /* PHX_CORE_H */
00166 

Generated on Wed Dec 21 22:05:37 2005 for Phoenix OSFS by  doxygen 1.4.2