• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ AddValue函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中AddValue函数的典型用法代码示例。如果您正苦于以下问题:C++ AddValue函数的具体用法?C++ AddValue怎么用?C++ AddValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了AddValue函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: assert

void Storage::SetValue(unsigned int id,double value)
{
	assert(id<=cells_.size());
	if (id<cells_.size())
	{
		cells_[id] = value;
		inits_[id] = true;
	}else if(id == cells_.size())
	{
		AddValue(id,value);
	}
}
开发者ID:Cabriter,项目名称:Calculate,代码行数:12,代码来源:Storage.cpp


示例17: ComputeBestMix

long long ComputeBestMix(struct ingredient **pantry, struct cookie jar,
			int numLeft, int maxTsp)
{
	int myTsp;
	long long retVal = 0, tmpVal;
	if (maxTsp == 0) {
		return CookieValue(&jar);
	} else if (numLeft == 1) {
		AddValue(pantry[0], &jar, maxTsp);
		return CookieValue(&jar);
	}
	for (myTsp = maxTsp; myTsp >= 0; myTsp--) {
		AddValue(pantry[0], &jar, myTsp);
		tmpVal = ComputeBestMix(pantry+1, jar, numLeft-1, maxTsp-myTsp);
		SubtractValue(pantry[0], &jar, myTsp);
		if (tmpVal > retVal) {
			retVal = tmpVal;
		}
	}
	return retVal;
}
开发者ID:adventofcode,项目名称:2015solutions,代码行数:21,代码来源:p1a.c


示例18: AddInt

void 
SSAPIEvent::BuildYourValueSet(){

	AddInt(m_eventType, SSAPI_EVENT_FID_EVENT_TYPE );
	AddInt64(m_timeStamp, SSAPI_EVENT_FID_TIMESTAMP );	
	AddGenericValue( (char *)&m_parentId, sizeof(m_parentId), SSAPI_EVENT_FID_PARENT_ID );
	
	if( m_pManagedObject ){
		m_pManagedObject->BuildYourValueSet();
		AddValue( m_pManagedObject, SSAPI_EVENT_FID_MANAGED_OBJECT );
		m_pManagedObject->Clear();
	}
}
开发者ID:JoeAltmaier,项目名称:Odyssey,代码行数:13,代码来源:SsapiEvents.cpp


示例19: AddValue

bool Object::Combine(const Object& img, bool allow_mix, float factor) {
  AddValue(img.Value(), factor);
  
  if (!allow_mix && (stagevalues.Nitems() || img.stagevalues.Nitems()) &&
      (stagevalues.Nitems()!=1 || img.stagevalues.Nitems()!=1)) {
    char txt[100];
    sprintf(txt, "%d %d", stagevalues.Nitems(), img.stagevalues.Nitems());
    return ShowError("Object::Combine() error #1a: ", txt);
  }

  if (allow_mix && stagevalues.Nitems()!=img.stagevalues.Nitems()) {
    char txt[100];
    sprintf(txt, "%d %d", stagevalues.Nitems(), img.stagevalues.Nitems());
    return ShowError("Object::Combine() error #1b: ", txt);
  }

  for (int j=0; j<stagevalues.Nitems(); j++) {
    FloatVector &dst = stagevalues[j];
    const FloatVector &src = img.stagevalues[j];

    if (dst.Length()!=src.Length() || dst.Length()<2) {
      char txt[100];
      sprintf(txt, "j=%d %d %d", j, dst.Length(), src.Length());
      return ShowError("Object::Combine() error #2: ", txt);
    }
  
    for (int i=0; i<dst.Length()-1; i++) {
      if (!allow_mix && dst[i]!=MAXFLOAT && src[i]!=MAXFLOAT) {
	cout << "this=" <<     DumpString(-1) << endl;
	cout << "img =" << img.DumpString(-1) << endl;
	char txt[100];
	sprintf(txt, "j=%d i=%d", j, i);
	return ShowError("Object::Combine() error #3: ", txt);
      }
      if (src[i]!=MAXFLOAT) {
	if (dst[i]==MAXFLOAT)
	  dst[i] = src[i];
	else
	  dst[i] += src[i];
      }
    }
    dst.Last() = value;
  }

  return true;
}
开发者ID:aalto-cbir,项目名称:PicSOM,代码行数:46,代码来源:Valued.C


示例20: TOLOG

bool CWizXmlRpcStructValue::Read(CWizXMLNode& nodeValue)
{
	CWizXMLNode nodeStruct;
	if (!nodeValue.FindChildNode(_T("struct"), nodeStruct))
	{
		TOLOG(_T("Failed to get struct node!"));
		return FALSE;
	}
	//
    std::deque<CWizXMLNode> arrayMember;
	nodeStruct.GetAllChildNodes(arrayMember);
	//
    for (std::deque<CWizXMLNode>::iterator it = arrayMember.begin();
		it != arrayMember.end();
		it++)
	{
		CWizXMLNode& nodeMember = *it;
		//
		CString strName;
		if (!nodeMember.GetChildNodeText(_T("name"), strName))
		{
			TOLOG(_T("Failed to get struct member name!"));
			return FALSE;
		}
		//
		CWizXMLNode nodeMemberValue;
		if (!nodeMember.FindChildNode(_T("value"), nodeMemberValue))
		{
			TOLOG(_T("Failed to get struct member value!"));
			return FALSE;
		}
		//
		CWizXmlRpcValue* pMemberValue = NULL;
        if (!WizXmlRpcValueFromXml(nodeMemberValue, &pMemberValue))
		{
			TOLOG(_T("Failed to load struct member value from node!"));
			return FALSE;
		}
		//
		ATLASSERT(pMemberValue);
		//
		AddValue(strName, pMemberValue);
	}
	//
	return TRUE;
}
开发者ID:dwdcth,项目名称:WizQTClient,代码行数:46,代码来源:wizxmlrpc.cpp



注:本文中的AddValue函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AddValueToSplayTree函数代码示例发布时间:2022-05-30
下一篇:
C++ AddToUpdateQueueOf函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap