Katana Plug-in APIs 0.1

FnOptionIdGenerator.h

00001 #ifndef FnOptionHash_H
00002 #define FnOptionHash_H
00003 
00004 #include <FnAttribute/FnAttribute.h>
00005 #include <FnPluginSystem/FnPluginSystem.h>
00006 #include <FnPluginSystem/FnPlugin.h>
00007 #include <FnViewer/suite/FnOptionIdGeneratorSuite.h>
00008 
00009 namespace Foundry
00010 {
00011 namespace Katana
00012 {
00013 namespace ViewerAPI
00014 {
00015 
00021 class OptionIdGenerator
00022 {
00023 public:
00024     typedef uint64_t value_type;
00025 
00032     static value_type GenerateId(const char* text);
00033 
00040     static const char* LookUpOptionId(value_type hash);
00041 
00042     static FnOptionIdGeneratorHostHandle getHandle() {
00043         if (_handle == 0x0)
00044             _handle = getSuite()->create();
00045         return _handle;
00046     }
00047 
00048     static const FnOptionIdGeneratorHostSuite_v1 *getSuite();
00049 
00050     static void setSuite(const FnOptionIdGeneratorHostSuite_v1 *suite);
00051 
00052     static FnPlugStatus setHost(FnPluginHost *host);
00053 
00054 private:
00055     // no copy/assign
00056     OptionIdGenerator(){}
00057     OptionIdGenerator(const OptionIdGenerator& rhs);
00058     OptionIdGenerator& operator=(const OptionIdGenerator& rhs);
00059 
00060     static FnOptionIdGeneratorHostHandle _handle;
00061     const static FnOptionIdGeneratorHostSuite_v1* _optionIdGeneratorSuite;
00062     static FnPluginHost* _host;
00063 };
00064 
00067 } // ViewerAPI
00068 } // Katana
00069 } // Foundry
00070 #endif // FnOptionHash_H
 All Classes Functions Variables Typedefs Enumerations Enumerator