當前位置: 首頁>>代碼示例>>C++>>正文


C++ AddValue函數代碼示例

本文整理匯總了C++中AddValue函數的典型用法代碼示例。如果您正苦於以下問題:C++ AddValue函數的具體用法?C++ AddValue怎麽用?C++ AddValue使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AddValue函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: AddValue

void wxGISGPStringDomain::AddString(const wxString &soStr, const wxString &soName)
{
	if(soName.IsEmpty())
		AddValue(wxVariant(soStr), soStr);
	else
		AddValue(wxVariant(soStr), soName);
}
開發者ID:GimpoByte,項目名稱:nextgismanager,代碼行數:7,代碼來源:gpdomain.cpp

示例2: AddValue

//---------------------------------------------------------------------------
void __fastcall CUBRelay::GetDump(void *&Dump, DWORD &DumpSize)
{
	CStdElement::GetDump(Dump, DumpSize);
   AddValue(Dump, DumpSize, &B, sizeof(long double));
   AddValue(Dump, DumpSize, &dX, sizeof(long double));
   AddValue(Dump, DumpSize, &dY, sizeof(long double));
}
開發者ID:Pala4,項目名稱:ModelCad,代碼行數:8,代碼來源:MCUBRelay.cpp

示例3: sprintf

bool plKeysAndValues::AddValue(const std::string & key, double value, KAddValueMode mode)
{
    char buf[30];
    sprintf(buf, "%f", value);
    std::string v(buf);
    return AddValue(key,v,mode);    
}
開發者ID:branan,項目名稱:Plasma-nobink,代碼行數:7,代碼來源:plKeysAndValues.cpp

示例4: GetValue

HRESULT CXFields::AddField(LPCWSTR key, short type, __int64 fmt)
{
	int i;

	if(!isVBType(type) && type != VT_DISPATCH)
		return E_INVALIDARG;

	if(type == VT_DISPATCH)
		type = VT_USERDEFINED;

	for(i = 0; i < (int)GetCount(); i ++)
		if(!GetValue(i)->m_strName.CompareNoCase(key))
		{
			GetValue(i)->m_nType = type;
			GetValue(i)->m_nFormat = fmt;
			return S_OK;
		}

	CXComPtr<CXField> pField;

	pField.CreateObject();

	pField->m_strName = key;
	pField->m_nType = type;
	pField->m_nFormat = fmt;

	AddValue(pField);

	return S_OK;
}
開發者ID:JimLiu,項目名稱:asptools,代碼行數:30,代碼來源:XRecords.cpp

示例5: sprintf

bool plConfigInfo::AddValue(const std::string & section, const std::string & key, double value, KAddValueMode mode)
{
    char buf[30];
    sprintf(buf, "%f", value);
    std::string v(buf);
    return AddValue(section,key,v,mode);    
}
開發者ID:branan,項目名稱:Plasma-nobink,代碼行數:7,代碼來源:plConfigInfo.cpp

示例6: WindowNameFilter

    WindowNameFilter(unsigned int type, const unsigned int* vec, size_t length) : RemapFilterBase(type) {
        targets_.reserve(length);

        for (size_t i = 0; i < length; ++i) {
            targets_.push_back(AddValue(vec[i]));
        }
    }
開發者ID:andyvand,項目名稱:Karabiner,代碼行數:7,代碼來源:WindowNameFilter.hpp

示例7: Reset

//==============================================================================
/// Configures the given filter.
//==============================================================================
void JRangeFilter::Config(std::string filter){
  Reset();
  std::string tx,tx2;
  while(!filter.empty()){
    int pos=int(filter.find(","));
    tx=(pos>0? filter.substr(0,pos): filter);
    filter=(pos>0? filter.substr(pos+1): "");
    pos=int(tx.find("-"));
    tx2=(pos>0? tx.substr(0,pos): "");
    if(pos>0)tx=tx.substr(pos+1);
    if(tx2.empty())AddValue(atoi(tx.c_str()));
    else AddRange(atoi(tx2.c_str()),atoi(tx.c_str()));
  }
  SortRanges();
  JoinRanges();
  if(Count){
    ValueMin=Ranges[0]; ValueMax=Ranges[((int(Count)-1)<<1)+1];
    if(ValueMax-ValueMin<1000&&ValueMax-ValueMin>1&&Count>1){
      FastValue=new byte[ValueMax-ValueMin+1];
      memset(FastValue,0,sizeof(byte)*(ValueMax-ValueMin+1));
      for(unsigned c=0;c<Count;c++){
        unsigned r=Ranges[c<<1],r2=Ranges[(c<<1)+1];
        for(;r<=r2;r++)FastValue[r-ValueMin]=1;
      }
    }
  }
}
開發者ID:PedroHRDiniz,項目名稱:RVA,代碼行數:30,代碼來源:JRangeFilter.cpp

示例8: CurIndex

bool KThruput::AddValue(int duration, unsigned long in, unsigned long out)
{
	int index = CurIndex();

	if (index >= 0 && RunTime[index] == duration)
		return TRUE;

	index = CurIndex(COUNT);

	RunTime[index]  = duration;

	AddValue(IN_DATA,in);
	AddValue(OUT_DATA,out);

	repaint();
	return TRUE;
}
開發者ID:marschap,項目名稱:isdn4k-utils,代碼行數:17,代碼來源:kthruput.cpp

示例9: AddValue

void R2Image::
AddValue(double x, double y, int c, double value)
{
  // Bilinear splat
  int ix1 = (int) x;
  int iy1 = (int) y;
  int ix2 = ix1 + 1;
  int iy2 = iy1 + 1;
  if (ix2 >= width) ix2 = ix1;
  if (iy2 >= height) iy2 = iy1;
  double dx = x - ix1;
  double dy = y - iy1;
  AddValue(ix1, iy1, c, value * (1.0-dx) * (1.0-dy));
  AddValue(ix1, iy2, c, value * (1.0-dx) * dy);
  AddValue(ix2, iy1, c, value * dx * (1.0-dy));
  AddValue(ix2, iy2, c, value * dx * dy);
}
開發者ID:52nlp,項目名稱:LabelMeAnnotationTool,代碼行數:17,代碼來源:R2Image.cpp

示例10: AddValue

void PerformanceStackPair::SendValues()
{
    UpdateBuilder builder;
    for (uint32_t i = 0; i < EVENTS_PER_ITERATION; ++i)
    {
        AddValue(i, builder);
    }
    this->outstation->Apply(builder.Build());
}
開發者ID:automatak,項目名稱:dnp3,代碼行數:9,代碼來源:PerformanceStackPair.cpp

示例11: CGPObject

CGPValue::CGPValue(const char *initName, const char *initValue) :
	CGPObject(initName),
	mList(0)
{
	if (initValue)
	{
		AddValue(initValue);
	}
}
開發者ID:Joanxt,項目名稱:OpenJK,代碼行數:9,代碼來源:genericparser2.cpp

示例12: _status

Store::Store(SymbolTable& symTab):_cell(0.0), _status (stNotInit)
{

	std::cout << "e = " << std::exp(1) << std::endl;
	int id = symTab.ForceAdd("e");
	SetValue (id, std::exp(1) );
	std::cout << "pi = " << 2 * std::acos (0.0) << std::endl;
	id = symTab.ForceAdd("pi");
	AddValue (id, 2.0 * std::acos (0.0) );
}
開發者ID:Accordeur,項目名稱:Calc,代碼行數:10,代碼來源:Store.cpp

示例13: AddValue

bool
CAuthAuthority::AddValue( CFStringRef inAuthAuthorityString )
{
	char aaBuffer[1024];
	
	if ( CFStringGetCString(inAuthAuthorityString, aaBuffer, sizeof(aaBuffer), kCFStringEncodingUTF8) )
		return AddValue( aaBuffer );
	
	return false;
}
開發者ID:aosm,項目名稱:DSTools,代碼行數:10,代碼來源:CAuthAuthority.cpp

示例14: while

HRESULT CBCookie::ParseUrlEncodeString(LPCSTR pstr, UINT nSize)
{
	LPCSTR pstrTemp;
	CBString strKey, strValue;
	LPCSTR pdefstr = pstr;
	UINT nDefSize = nSize;

	m_dict.RemoveAll();

	while(nSize)
	{
		pstrTemp = pstr;
		while(nSize && *pstr != '=')
		{
			pstr ++;
			nSize --;
		}
		if(!nSize)break;

		if(pstr > pstrTemp)
			strKey = CBEncoding::UrlDecode(pstrTemp, (UINT)(pstr - pstrTemp));
		else strKey.Empty();

		if(nSize)
		{
			nSize --;
			pstr ++;
		}

		pstrTemp = pstr;
		while(nSize && *pstr != '&')
		{
			pstr ++;
			nSize --;
		}

		if(!strKey.IsEmpty())
			if(pstr > pstrTemp)
				strValue = CBEncoding::UrlDecode(pstrTemp, (UINT)(pstr - pstrTemp));
			else strValue.Empty();

		if(nSize)
		{
			nSize --;
			pstr ++;
		}

		if(!strKey.IsEmpty())AddValue(strKey, strValue);
	}

	if(m_dict.GetCount())m_strDefault =  CBString(pdefstr, nDefSize);
	else m_strDefault = CBEncoding::UrlDecode(pdefstr, nDefSize);

	return S_OK;
}
開發者ID:2Quico,項目名稱:netbox,代碼行數:55,代碼來源:BCookie.cpp

示例15: AddValue

bool 
User::BuildYourValueSet(){
	ManagedObject::BuildYourValueSet();

	AddValue( &m_userName , SSAPI_USER_FID_USERNAME );
	AddValue( &m_password , SSAPI_USER_FID_PASSWORD );
	AddValue( &m_firstName , SSAPI_USER_FID_FIRST_NAME );
	AddValue( &m_lastName , SSAPI_USER_FID_LAST_NAME );
	AddValue( &m_description , SSAPI_USER_FID_DESCRIPTION );
	AddValue( &m_email , SSAPI_USER_FID_EMAIL );
	AddValue( &m_phoneNumber1 , SSAPI_USER_FID_PHONE_1 );
	AddValue( &m_phoneNumber2 , SSAPI_USER_FID_PHONE_2 );
	AddValue( &m_department , SSAPI_USER_FID_DEPARTMENT);
	AddInt(m_language, SSAPI_USER_FID_LANGUAGE );

	return true;
}
開發者ID:JoeAltmaier,項目名稱:Odyssey,代碼行數:17,代碼來源:User.cpp


注:本文中的AddValue函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。