本文整理匯總了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);
}
示例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));
}
示例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);
}
示例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;
}
示例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);
}
示例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]));
}
}
示例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;
}
}
}
}
示例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;
}
示例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);
}
示例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());
}
示例11: CGPObject
CGPValue::CGPValue(const char *initName, const char *initValue) :
CGPObject(initName),
mList(0)
{
if (initValue)
{
AddValue(initValue);
}
}
示例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) );
}
示例13: AddValue
bool
CAuthAuthority::AddValue( CFStringRef inAuthAuthorityString )
{
char aaBuffer[1024];
if ( CFStringGetCString(inAuthAuthorityString, aaBuffer, sizeof(aaBuffer), kCFStringEncodingUTF8) )
return AddValue( aaBuffer );
return false;
}
示例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;
}
示例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;
}