Exemplo n.º 1
0
StringArray EnabledModuleList::getAllModules() const
{
    StringArray moduleIDs;

    for (int i = 0; i < getNumModules(); ++i)
        moduleIDs.add (getModuleID(i));

    return moduleIDs;
}
Exemplo n.º 2
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));
    }
}
Exemplo n.º 3
0
void Writer::writeModuleRel (const Module *module)
{
	NoiseAssert (module != NULL, module);
	for (size_t i=0;i<module->getSourceModuleCount();++i)
	{
		const Module *child = module->getSourceModule(i);
		unsigned short id = getModuleID(child);
		mStream.write (id);
	}
}
Exemplo n.º 4
0
bool EnabledModuleList::areMostModulesCopiedLocally() const
{
    int numYes = 0, numNo = 0;

    for (int i = getNumModules(); --i >= 0;)
    {
        if (shouldCopyModuleFilesLocally (getModuleID (i)).getValue())
            ++numYes;
        else
            ++numNo;
    }

    return numYes > numNo;
}
Exemplo n.º 5
0
bool EnabledModuleList::areMostModulesUsingGlobalPath() const
{
    auto numYes = 0, numNo = 0;

    for (auto i = getNumModules(); --i >= 0;)
    {
        if (shouldUseGlobalPath (getModuleID (i)))
            ++numYes;
        else
            ++numNo;
    }

    return numYes > numNo;
}
Exemplo n.º 6
0
extern "C" void setParam(const char* paramName, const cvariant value)
{
	std::string key(paramName);

	if(key == PARAM_IMG_APP)
	{
		if(cvariant_get_type(value)==cvariant_string)
			parameters[PARAM_IMG_APP]=value;
		else
			printf("%s: Wrong data type for the parameter '%s' !\n", getModuleID(), paramName);
	}
	else if(key == PARAM_IMG_NET)
	{
		if(cvariant_get_type(value)==cvariant_string)
			parameters[PARAM_IMG_NET]=value;
		else
			printf("%s: Wrong data type for the parameter '%s' !\n", getModuleID(), paramName);
	}
	else if(key == PARAM_IMG_ITEM)
	{
		if(cvariant_get_type(value)==cvariant_string)
			parameters[PARAM_IMG_ITEM]=value;
		else
			printf("%s: Wrong data type for the parameter '%s' !\n", getModuleID(), paramName);
	}
	else if(key == PARAM_WINDOW_CAPTION)
	{
		if(cvariant_get_type(value)==cvariant_string)
			parameters[PARAM_WINDOW_CAPTION]=value;
		else
			printf("%s: Wrong data type for the parameter '%s' !\n", getModuleID(), paramName);
	}
	else if(key == PARAM_MAIN_TEXT)
	{
		if(cvariant_get_type(value)==cvariant_string)
			parameters[PARAM_MAIN_TEXT]=value;
		else
			printf("%s: Wrong data type for the parameter '%s' !\n", getModuleID(), paramName);
	}
	else
		printf("%s: Unknown param(%s) !!\n", getModuleID(), paramName);
}
Exemplo n.º 7
0
void EnabledModuleList::createRequiredModules (OwnedArray<LibraryModule>& modules)
{
    for (int i = 0; i < getNumModules(); ++i)
        modules.add (new LibraryModule (getModuleInfo (getModuleID (i))));
}