static void threadLoadAttribute(CWorkspaceItem * self, std::_tstring moduleLabel, std::_tstring attributeLabel, std::_tstring attributeType)
 {
     self->m_loaded = LOADING_STARTED;
     CComPtr<IAttribute> attribute = NULL;
     if (!moduleLabel.empty() && !attributeLabel.empty())
     {
         attribute = self->m_repository->GetAttributeFast(moduleLabel.c_str(), attributeLabel.c_str(), CreateIAttributeType(attributeType), 0, true, true, true);
         if (!attribute)
             attribute = self->m_repository->GetAttributePlaceholder(moduleLabel.c_str(), attributeLabel.c_str(), CreateIAttributeType(attributeType));
     }
     self->SetAttr(attribute);
     self->m_loaded = LOADING_FINISHED;
 }
Exemple #2
0
	bool GetAutoC(const std::_tstring & partialLabel, StdStringVector &set)
	{
		CComPtr<IRepository> rep = AttachRepository();
		rep->GetModulesAutoC(partialLabel, set);
		if (!partialLabel.empty())
			rep->GetAttributesAutoC(partialLabel, set);
		return true;
	}
Exemple #3
0
CLIB_API const boost::filesystem::path & GetProgramPath(boost::filesystem::path & path)
{
    TCHAR programPath[_MAX_PATH];
    ::GetModuleFileName(0, programPath, _MAX_PATH);
    path = stringToPath(programPath);
    if(!g_appName.empty())
    {
        path = path.branch_path() / stringToPath(g_appName);
    }
    return path;
}
 unsigned GetModules(const std::_tstring & module, IModuleVector & modules, bool GetChecksum = false, bool noRefresh=false) const
 {
     IModuleVector allModules;
     GetAllModules(allModules, GetChecksum, noRefresh);
     for(IModuleVector::iterator itr = allModules.begin(); itr != allModules.end(); ++itr)
     {
         IModule * parent = itr->get()->GetParentModule();
         if ((!parent && module.empty()) || (parent && boost::algorithm::equals(module, parent->GetQualifiedLabel())))
             modules.push_back(itr->get());
     }
     return 0;
 }
 void Update(const std::_tstring & description)
 {
     if (!description.empty())
         m_description = description;
 }