Esempio n. 1
0
void CVCDlg::InitDeviceComboBox()
{
	ProfileNode* pRoot = ProfileMgr::GetInstance()->GetRootProfile();
	int nChildCount = ((pRoot == NULL) ? 0 : pRoot->GetChildCount());

	std::string szText;
	AttribMap* pAttribMap = NULL;
	for(int i = 0; i < nChildCount; i++)
	{
		ProfileNode* pProfile = (ProfileNode*)pRoot->GetChild(i);

		pAttribMap = (AttribMap*)pProfile->GetData();
		if(!pAttribMap->Get(PF_ATTRIB_DESC, szText))
		{
			pAttribMap->Get(PF_ATTRIB_NAME, szText);
		}
		LIST_ITEM item;
		item.strText = CFL_A2T(szText.c_str());
		item.vpItemData = pProfile;
		m_deviceComboBox.AddItem(&item);
	}

	if(nChildCount > 0)
	{
		m_deviceComboBox.SetCurSel(0);
		OnCategorySelChanged();
	}
}
Esempio n. 2
0
void XMLNode::SetAttributes (AttribMap attrib)
{
  AttribMap::iterator itor = attrib.begin ();
  for (; itor != attrib.end (); ++itor)
  {
    m_Node.SetAttribute(itor->first, itor->second);
  }
}
Esempio n. 3
0
attributes_impl::value_type attributes_impl::get(const std::wstring & QualifiedName) const
{
    typedef AttribMap::const_iterator attr_map_iterator;
    typedef attributes::value_type attr_str_type;

    attr_map_iterator i = attrib_.find( QualifiedName );

    if ( i != attrib_.end() )
        return attr_str_type( values_[i->second].second );
    else
        return attr_str_type();
}
Esempio n. 4
0
void SessionManager::configFromModule( const Module* mod )
{
   AttribMap* attribs = mod->attributes();
   if( attribs == 0 )
   {
      return;
   }

   VarDef* value = attribs->findAttrib( FALCON_WOPI_SESSION_TO_ATTRIB );
   if( value != 0 && value->isInteger() )
   {
      m_nSessionTimeout = (uint32) value->asInteger();
   }
}
Esempio n. 5
0
vector<EGLint> attribMapToList (const AttribMap& attribs)
{
	vector<EGLint> attribList;

	for (AttribMap::const_iterator it = attribs.begin(); it != attribs.end(); ++it)
	{
		attribList.push_back(it->first);
		attribList.push_back(it->second);
	}

	attribList.push_back(EGL_NONE);

	return attribList;
}
Esempio n. 6
0
void CoreWopi::configFromModule( const Module* mod )
{
   AttribMap* attribs = mod->attributes();
   if( attribs == 0 )
   {
      return;
   }

   VarDef* value = attribs->findAttrib( FALCON_WOPI_PDATADIR_ATTRIB );
   if( value != 0 && value->isString() )
   {
      wopi()->dataLocation( *value->asString() );
   }
}
Esempio n. 7
0
void attributes_impl::add(const std::wstring & QualifiedName, const std::wstring & Value)
{
    typedef AttribMap::value_type attr_map_value_type;

    values_.push_back( key_value(QualifiedName, Value) );
    attrib_.insert( attr_map_value_type(QualifiedName, values_.size() - 1) );
}
Esempio n. 8
0
PLIST_ITEM CVCDlg::AddProfile(ProfileNode* pProfile, PLIST_ITEM pItemParent)
{
	if(pProfile == NULL)
	{
		return NULL;
	}
	std::string szText;
	AttribMap* pAttribMap = (AttribMap*)pProfile->GetData();
	if(!pAttribMap->Get(PF_ATTRIB_TAG, szText) || (szText.compare("device") != 0 && szText.compare("profile") != 0))
	{
		return NULL;
	}

	if(!pAttribMap->Get(PF_ATTRIB_DESC, szText))
	{
		cfl::tstring szLog;
		cfl::tformat(szLog, _T("Can't find the [desc] attribute"));
		LOG4CPLUS_INFO_STR(THE_LOGGER, szLog)
		return NULL;
	}
Esempio n. 9
0
inline DartContainerBrowserSelector::DartContainerBrowserSelector(AttribMap& m, const FunctorSelect& fs):
	m_map(m)
{
	if (GenericMap::isMultiRes())
	{
		m_cont = &(m.getMRAttributeContainer());
	}
	else
	{
		m_cont = &(m.getAttributeContainer<DART>());
	}
	m_selector = fs.copy();
}
Esempio n. 10
0
void CVCDlg::OnProfileSelChanged()
{
	int nCurSel = m_profileComboBox.GetCurSel();
	if(nCurSel >= 0)
	{
		ProfileNode* pProfile = (ProfileNode*)m_profileComboBox.GetItemDataPtr(nCurSel);
		AttribMap* pAttribMap = NULL;
		std::string szProfileFile;
		if(pProfile != NULL)
		{
			pAttribMap = (AttribMap*)pProfile->GetData();
			if(pAttribMap->Get(PF_ATTRIB_FILE, szProfileFile))
			{
				//Initialize the profile tree firstly
				CString szPath;
				if(SysUtils::GetProfile(szPath, CFL_A2T(szProfileFile.c_str())))
				{
					m_propListMgr.Init(CFL_T2A((LPCTSTR)szPath));
				}
			}
		}
	}
}
Esempio n. 11
0
size_t attributes_impl::size() const
{
    return attrib_.size();
}
Esempio n. 12
0
inline ContainerBrowserLinked::ContainerBrowserLinked(AttribMap& m, unsigned int orbit):
	autoAttribute(true), m_first(0xffffffff), m_end(0xffffffff)
{
	m_cont = &(m.getAttributeContainer(orbit));
	m_links = m_cont->addAttribute<unsigned int>("Browser_Links") ;
}