当前位置: 首页>>代码示例>>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;未经允许,请勿转载。