示例#1
0
OovStringVec ComponentTypesFile::getComponentFiles(OovStringRef const compName,
        OovStringRef const tagStr, bool getNested) const
    {
    OovStringVec files;
    OovStringVec names = getComponentNames();
    OovString parentName = compName;
    for(auto const &name : names)
        {
        bool match = false;
        if(getNested)
            {
            if(strcmp(compName, Project::getRootComponentName()) == 0)
                {
                match = true;
                }
            else
                {
                match = compareComponentNames(parentName, name);
                }
            }
        else
            {
            match = (parentName == name);
            }
        if(match)
            {
            OovString tag = ComponentTypesFile::getCompTagName(name, tagStr);
            OovString val = mCompSourceListFile.getValue(tag);
            OovStringVec newFiles = CompoundValueRef::parseString(val);
            files.insert(files.end(), newFiles.begin(), newFiles.end());
            }
        }
    return files;
    }
示例#2
0
bool ComponentTypesFile::anyComponentsDefined() const
    {
    auto const &names = getComponentNames();
    return std::any_of(names.begin(), names.end(),
            [=](std::string const &name)
            {return(getComponentType(name) != CT_Unknown);} );
    }
示例#3
0
void ComponentTypesFile::coerceChildComponents(OovStringRef const compName)
    {
    OovStringVec names = getComponentNames();
    OovString parentName = compName;
    for(auto const &name : names)
        {
        if(name != parentName)
            {
            if(compareComponentNames(parentName, name))
                {
                setComponentType(name, CT_Unknown);
                }
            }
        }
    }
示例#4
0
	void Matcher::setComponentNames(const std::shared_ptr<Matcher> &matcher, std::vector<IMatcher> &matchers) {
		auto componentNames = getComponentNames(matchers);
		if(componentNames.size() > 0)
			matcher->componentNames = componentNames;
	}