Advertisement
Guest User

Untitled

a guest
Aug 8th, 2014
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include "ModuleManager.h"
  4.  
  5.  
  6. /**
  7.  * The public interface to this module
  8.  */
  9. class IViconPlugin : public IModuleInterface
  10. {
  11.  
  12. public:
  13.  
  14.     /**
  15.      * Singleton-like access to this module's interface.  This is just for convenience!
  16.      * Beware of calling this during the shutdown phase, though.  Your module might have been unloaded already.
  17.      *
  18.      * @return Returns singleton instance, loading the module on demand if needed
  19.      */
  20.     static inline IViconPlugin& Get()
  21.     {
  22.         return FModuleManager::LoadModuleChecked< IViconPlugin >( "ViconPlugin" );
  23.     }
  24.  
  25.     /**
  26.      * Checks to see if this module is loaded and ready.  It is only valid to call Get() if IsAvailable() returns true.
  27.      *
  28.      * @return True if the module is loaded and ready to use
  29.      */
  30.     static inline bool IsAvailable()
  31.     {
  32.         return FModuleManager::Get().IsModuleLoaded( "ViconPlugin" );
  33.     }
  34. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement