#include "{{lib_name}}.hpp"
#ifdef _MSC_VER
const char {{lib_name}}::Descriptor::NAME[] = "{{lib_name}}.dll";
#else
const char {{lib_name}}::Descriptor::NAME[] = "lib{{lib_name}}.so";
#endif
const char {{lib_name}}::Descriptor::WINDOWS_NAME[] = "{{lib_name}}.dll";
const char {{lib_name}}::Descriptor::POSIX_NAME[] = "lib{{lib_name}}.so";
const std::array< intercom::CLSID, {{coclass_count}} > {{lib_name}}::Descriptor::CLASSES = { {
{{#each coclasses}}
intercom::CLSID{{clsid_struct}}{{#unless @last}},{{/unless}}
{{~/each}}
} };
bool {{lib_name}}::Descriptor::is_available()
{
// Espace the "static initialization order fiasco".
// This static variable is not initialized until this method is called which
// should guarantee that the ::intercom::detail::LIBRARY_INDEX has been initialized.
static bool available = ::intercom::try_register_library(
{{lib_name}}::Descriptor::NAME, {{lib_name}}::Descriptor::CLASSES );
return available;
}
{{#each interfaces}}
const intercom::IID {{../../lib_name}}::raw::{{name}}::ID = {{iid_struct}};
{{~/each}}
{{#each coclasses}}
const intercom::CLSID {{../../lib_name}}::raw::{{name}}Descriptor::ID = {{clsid_struct}};
const std::array<intercom::IID, {{interface_count}}> {{../../lib_name}}::raw::{{name}}Descriptor::INTERFACES = { {
{{~#each interfaces}}
{{../../lib_name}}::raw::{{this}}::ID{{#unless @last}},{{/unless}}
{{~/each}}
} };
{{~/each}}