Esempio n. 1
0
void EnabledModuleList::createRequiredModules (OwnedArray<LibraryModule>& modules)
{
    for (int i = 0; i < getNumModules(); ++i)
    {
        ModuleDescription info (getModuleInfo (getModuleID (i)));

        if (info.isValid())
            modules.add (new LibraryModule (info));
    }
}
Esempio n. 2
0
bool EnabledModuleList::doesModuleHaveHigherCppStandardThanProject (const String& moduleID)
{
    auto projectCppStandard = project.getCppStandardValue().toString();

    if (projectCppStandard == "latest")
        return false;

    auto moduleCppStandard = getModuleInfo (moduleID).getMinimumCppStandard();

    return (moduleCppStandard.getIntValue() > projectCppStandard.getIntValue());
}
Esempio n. 3
0
      // Retrieve this module's information. Exposed to JavaScript
      static void GetModuleInfo (const v8::FunctionCallbackInfo<v8::Value>& args)
      {
         auto isolate = args.GetIsolate ();
         HandleScope scope (isolate);

         // validate parameters
         std::string error_string;
         if (descriptor.ValidateParameters (GetModuleInfo, args, error_string))
         {
            // unwrap object so we can call the correct function on the instance
            auto module = ObjectWrap::Unwrap<TDerivedLokiModule> (args.Holder ());
            // return info object
            args.GetReturnValue ().Set (module->getModuleInfo (isolate));
         }
         else
         {
            // if parameter validation failed for whatever reason, report the error
            isolate->ThrowException (Exception::Error (String::NewFromUtf8 (isolate, error_string.c_str ())));
         }
      }
Esempio n. 4
0
void EnabledModuleList::createRequiredModules (OwnedArray<LibraryModule>& modules)
{
    for (int i = 0; i < getNumModules(); ++i)
        modules.add (new LibraryModule (getModuleInfo (getModuleID (i))));
}