本文整理汇总了C++中ReadValue函数的典型用法代码示例。如果您正苦于以下问题:C++ ReadValue函数的具体用法?C++ ReadValue怎么用?C++ ReadValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ReadValue函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: while
void OGRDXFDataSource::ReadHeaderSection()
{
char szLineBuf[257];
int nCode;
while( (nCode = ReadValue( szLineBuf, sizeof(szLineBuf) )) > -1
&& !EQUAL(szLineBuf,"ENDSEC") )
{
if( nCode != 9 )
continue;
CPLString osName = szLineBuf;
ReadValue( szLineBuf, sizeof(szLineBuf) );
CPLString osValue = szLineBuf;
oHeaderVariables[osName] = osValue;
}
CPLDebug( "DXF", "Read %d header variables.",
(int) oHeaderVariables.size() );
}
开发者ID:actian-geospatial,项目名称:ogr-ingres,代码行数:24,代码来源:ogrdxfdatasource.cpp
示例2: ASSERT
int
NameAttributeText::Compare(WidgetAttributeText &attr, BPoseView *view)
{
NameAttributeText *compareTo = dynamic_cast<NameAttributeText *>(&attr);
ASSERT(compareTo);
if (fValueDirty)
ReadValue(&fFullValueText);
if (NameAttributeText::sSortFolderNamesFirst)
return fModel->CompareFolderNamesFirst(attr.TargetModel());
return NaturalCompare(fFullValueText.String(), compareTo->ValueAsText(view));
}
开发者ID:mmanley,项目名称:Antares,代码行数:15,代码来源:WidgetAttributeText.cpp
示例3: tmpString
bool
GenericAttributeText::CheckAttributeChanged()
{
GenericValueStruct tmpValue = fValue;
BString tmpString(fFullValueText);
ReadValue(&fFullValueText);
// fDirty could already be true, in that case we mustn't set it to
// false, even if the attribute text hasn't changed
bool changed = (fValue.int64t != tmpValue.int64t) || (tmpString != fFullValueText);
if (changed)
fDirty = true;
return fDirty;
}
开发者ID:mmanley,项目名称:Antares,代码行数:15,代码来源:WidgetAttributeText.cpp
示例4: ThrowOnAssert
int
RealNameAttributeText::Compare(WidgetAttributeText& attr, BPoseView* view)
{
RealNameAttributeText* compareTo
= dynamic_cast<RealNameAttributeText*>(&attr);
ThrowOnAssert(compareTo != NULL);
if (fValueDirty)
ReadValue(&fFullValueText);
if (RealNameAttributeText::sSortFolderNamesFirst)
return fModel->CompareFolderNamesFirst(attr.TargetModel());
return NaturalCompare(fFullValueText.String(),
compareTo->ValueAsText(view));
}
开发者ID:looncraz,项目名称:haiku,代码行数:16,代码来源:WidgetAttributeText.cpp
示例5: mmi_brw_recent_pages_read_sorting_method
/*****************************************************************************
* FUNCTION
* mmi_brw_recent_pages_read_sorting_method
* DESCRIPTION
* Function to read settings from NVRAM
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_brw_recent_pages_read_sorting_method(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S16 NvramError;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ReadValue(NVRAM_BRW_RECENT_PAGES_SORTING_METHOD, &(g_brw_cntx.sorting_method), DS_BYTE, &NvramError);
if (g_brw_cntx.sorting_method == 0xFF)
{
g_brw_cntx.sorting_method = WAP_CUSTOM_CFG_DEFAULT_SORTING_METHOD;
WriteValue(NVRAM_BRW_RECENT_PAGES_SORTING_METHOD, &(g_brw_cntx.sorting_method), DS_BYTE, &NvramError);
}
}
开发者ID:12019,项目名称:mtktest,代码行数:26,代码来源:BrowserRecentPages.c
示例6: DCHECK
bool RegKey::ReadValueDW(const wchar_t* name, DWORD* value)
{
DCHECK(value);
DWORD type = REG_DWORD;
DWORD size = sizeof(DWORD);
DWORD result = 0;
if(ReadValue(name, &result, &size, &type) &&
(type==REG_DWORD || type==REG_BINARY) &&
size==sizeof(DWORD))
{
*value = result;
return true;
}
return false;
}
开发者ID:Strongc,项目名称:Chrome_Library,代码行数:16,代码来源:registry.cpp
示例7: assert
void CVisProp::ReadValue(CVisSDIStream& refsdistream, bool fOnlyValue,
const void *pvReferenceOffset)
{
if (fOnlyValue)
{
// We assume that the type and name have already been read and that
// storage for the object has been allocated.
assert(IsValid());
if (IsArray())
{
void *pvObjFirst = PRefCntArray()->PvObjFirst();
if ((pvReferenceOffset != 0) && (IsObjReference()))
{
pvObjFirst = (void *)
(((BYTE *) pvObjFirst) + ((int) pvReferenceOffset));
}
m_pproptypeinfo->ReadObjArray(refsdistream, Dim(),
pvObjFirst);
}
else
{
void *pvObj = PvObj();
if ((pvReferenceOffset != 0) && (IsObjReference()))
{
pvObj = (void *)
(((BYTE *) pvObj) + ((int) pvReferenceOffset));
}
m_pproptypeinfo->ReadObj(refsdistream, pvObj);
}
}
else
{
#ifndef VIS_NO_SD_STREAM
// Need to read type and name and then create storate for object.
std::string strType;
std::string strName;
bool fShared;
CVisDim dim;
refsdistream.ReadTypeNameAndDim(strType, strName, dim, &fShared);
SetTypeNameAndDim(strType.c_str(), strName.c_str(), dim, fShared);
ReadValue(refsdistream, true, pvReferenceOffset);
refsdistream.EndObj();
#endif // VIS_NO_SD_STREAM
}
}
开发者ID:bigdig,项目名称:Portrait,代码行数:47,代码来源:VisProp.cpp
示例8: OnClick
virtual void OnClick(Point pt, int widget, int click_count)
{
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(CW_PANEL);
uint btn = (pt.y - wid->pos_y - WD_FRAMERECT_TOP - this->header_height) / (FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL);
uint x = pt.x - wid->pos_x;
bool rtl = _current_text_dir == TD_RTL;
if (rtl) x = wid->current_x - x;
if (btn >= lengthof(_cheats_ui)) return;
const CheatEntry *ce = &_cheats_ui[btn];
int value = (int32)ReadValue(ce->variable, ce->type);
int oldvalue = value;
if (btn == CHT_CHANGE_DATE && x >= 40) {
/* Click at the date text directly. */
SetDParam(0, value);
ShowQueryString(STR_JUST_INT, STR_CHEAT_CHANGE_DATE_QUERY_CAPT, 8, this, CS_NUMERAL, QSF_ACCEPT_UNCHANGED);
return;
}
/* Not clicking a button? */
if (!IsInsideMM(x, 20, 40)) return;
*ce->been_used = true;
switch (ce->type) {
case SLE_BOOL:
value ^= 1;
if (ce->proc != NULL) ce->proc(value, 0);
break;
default:
/* Take whatever the function returns */
value = ce->proc(value + ((x >= 30) ? 1 : -1), (x >= 30) ? 1 : -1);
/* The first cheat (money), doesn't return a different value. */
if (value != oldvalue || btn == CHT_MONEY) this->clicked = btn * 2 + 1 + ((x >= 30) != rtl ? 1 : 0);
break;
}
if (value != oldvalue) WriteValue(ce->variable, ce->type, (int64)value);
this->flags4 |= WF_TIMEOUT_BEGIN;
this->SetDirty();
}
开发者ID:a7omic,项目名称:OpenTTD,代码行数:47,代码来源:cheat_gui.cpp
示例9: ReadObject
typename std::enable_if<is_map_container<T>::value>::type ReadObject(T&& t, Value& v)
{
using U = typename std::decay<T>::type;
size_t sz = v.Size();
for (size_t i = 0; i < sz; i++)
{
Value& element = v[i];
typename U::key_type key;
typename U::value_type::second_type value;
ReadValue(key, element["0"], i); //key
ReadObject(value, element["1"]); //value
t.emplace(key, value);
}
}
开发者ID:JerkWisdom,项目名称:zpublic,代码行数:17,代码来源:DeSerializer.hpp
示例10: ReadValue
bool NDataReader::ReadValue(LPCTSTR name, DWORD& value)
{
nui::Base::NString data;
if(!ReadValue(name, data))
return false;
if(data.GetLength() == 0)
return false;
bool result = false;
if(data[0] == _T('#'))
{
if(data.GetLength() == 7)
{
result = _sntscanf(data.GetData() + 1, 6, _T("%x"), &value) == 1;
value = Ui::MakeArgb(0xFF, (BYTE)((value & 0xFF0000) >> 16), (BYTE)((value & 0xFF00) >> 8), (BYTE)(value & 0xFF));
}
else if(data.GetLength() == 9)
开发者ID:hufuman,项目名称:nui,代码行数:17,代码来源:NDataReader.cpp
示例11: RefreshAddresses
static void RefreshAddresses(WATCHDATA *ptr, VARINFO *var, int address, THREAD *thread, int noscope)
{
ptr->structNesting[ptr->nestingCount++] = var;
while (var)
{
char buf[1048];
int unscope = noscope;
var->scope = ptr->structNesting[0]->scope;
if (noscope)
var->outofscope = TRUE;
else
{
int val;
var->outofscope = FALSE;
if (thread)
var->thread = thread;
if (var->offset == -1)
{
DEBUG_INFO *dbg;
int i;
char name[2048];
name[0] = 0;
for (i=0; i < ptr->nestingCount-1; i++)
sprintf(name + strlen(name), "%s", ptr->structNesting[i]->structtag);
sprintf(name + strlen(name), "@%s", var->membername);
dbg = findDebug(ptr->structNesting[0]->scope->address);
val = var->address = GetSymbolAddress(dbg, name);
// static member data
}
else
{
val = var->address = address + var->offset;
}
if (var->constant)
val = var->address;
else if (var->pointer)
{
unscope = ((val = var->derefaddress) == -1 && !ReadValue(var->address, &val, 4, var)) || !val;
}
RefreshAddresses(ptr, var->subtype, val, thread, unscope);
}
var = var->link;
}
ptr->nestingCount--;
}
开发者ID:bencz,项目名称:OrangeC,代码行数:45,代码来源:dbgwatch.c
示例12: ReadValue
void
OpenWithRelationAttributeText::FitValue(BString* outString,
const BPoseView* view)
{
if (fValueDirty)
ReadValue();
ASSERT(view == fPoseView);
const OpenWithPoseView* launchWithView
= dynamic_cast<const OpenWithPoseView*>(view);
if (launchWithView != NULL)
launchWithView->OpenWithRelationDescription(fModel, &fRelationText);
fOldWidth = fColumn->Width();
fTruncatedWidth = TruncString(outString, fRelationText.String(),
fRelationText.Length(), view, fOldWidth, B_TRUNCATE_END);
fDirty = false;
}
开发者ID:looncraz,项目名称:haiku,代码行数:18,代码来源:WidgetAttributeText.cpp
示例13: ReadBufInt
// ELEMENT を読み込む
ELEMENT *ReadElement(BUF *b)
{
UINT i;
char name[MAX_ELEMENT_NAME_LEN + 1];
UINT type, num_value;
VALUE **values;
ELEMENT *e;
// 引数チェック
if (b == NULL)
{
return NULL;
}
// 名前
if (ReadBufStr(b, name, sizeof(name)) == false)
{
return NULL;
}
// 項目の種類
type = ReadBufInt(b);
// 項目数
num_value = ReadBufInt(b);
if (num_value > MAX_VALUE_NUM)
{
// 個数オーバー
return NULL;
}
// VALUE
values = (VALUE **)Malloc(sizeof(VALUE *) * num_value);
for (i = 0;i < num_value;i++)
{
values[i] = ReadValue(b, type);
}
// ELEMENT を作成
e = NewElement(name, type, num_value, values);
Free(values);
return e;
}
开发者ID:falcon8823,项目名称:utvpn,代码行数:45,代码来源:Pack.c
示例14: while
void OGRDXFDataSource::ReadLineTypeDefinition()
{
char szLineBuf[257];
int nCode;
CPLString osLineTypeName;
CPLString osLineTypeDef;
while( (nCode = ReadValue( szLineBuf, sizeof(szLineBuf) )) > 0 )
{
switch( nCode )
{
case 2:
osLineTypeName = ACTextUnescape(szLineBuf,GetEncoding());
break;
case 49:
{
if( osLineTypeDef != "" )
osLineTypeDef += " ";
if( szLineBuf[0] == '-' )
osLineTypeDef += szLineBuf+1;
else
osLineTypeDef += szLineBuf;
osLineTypeDef += "g";
}
break;
default:
break;
}
}
if( osLineTypeDef != "" )
oLineTypeTable[osLineTypeName] = osLineTypeDef;
if( nCode == 0 )
UnreadValue();
}
开发者ID:0004c,项目名称:node-gdal,代码行数:41,代码来源:ogrdxfdatasource.cpp
示例15: ReadValue
// Returns the key value as a bool type. Returns false if the key is
// not found.
bool IniFile::ReadBool(const string& mKey, const string& szSection, bool def_value)
{
bool bValue = def_value;
string mValue = ReadValue(mKey, szSection);
if(mWasFound)
{
if ( mValue.find("1") == 0
|| compareNoCase(mValue, "true") == 0
|| compareNoCase(mValue, "yes") == 0 )
{
bValue = true;
}
else
{
bValue = false;
}
}
return bValue;
}
开发者ID:Alcibiades586,项目名称:roadrunner,代码行数:23,代码来源:rrIniFile.cpp
示例16: isWine
//------------------------------------------------------------------------------
BOOL isWine()
{
HKEY CleTmp=0;
if (RegOpenKey(HKEY_LOCAL_MACHINE,"Software\\Wine",&CleTmp)==ERROR_SUCCESS)
{
RegCloseKey(CleTmp);
return TRUE;
}
//deuxième cas
char tmp[MAX_PATH]="";
if(ReadValue(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug","Debugger",tmp, MAX_PATH))
{
if (Contient(tmp,"winedbg"))
{
return TRUE;
}
}
return FALSE;
}
开发者ID:treejames,项目名称:omnia-projetcs,代码行数:22,代码来源:proc.c
示例17: LoadConfigDisplayAttr
void LoadConfigDisplayAttr(int no)
{
std::wstring strxmlval;
BOOL se;
TF_DISPLAYATTRIBUTE da;
for(int i = 0; i < _countof(displayAttr[no]) && displayAttr[no][i].key != nullptr; i++)
{
ReadValue(pathconfigxml, SectionDisplayAttr, displayAttr[no][i].key, strxmlval);
if(!strxmlval.empty())
{
if(swscanf_s(strxmlval.c_str(), displayAttrFormat,
&se, &da.crText.type, &da.crText.cr, &da.crBk.type, &da.crBk.cr,
&da.lsStyle, &da.fBoldLine, &da.crLine.type, &da.crLine.cr, &da.bAttr) == 10)
{
displayAttr[no][i].se = se;
displayAttr[no][i].da = da;
}
}
}
}
开发者ID:nathancorvussolis,项目名称:corvusskk,代码行数:21,代码来源:DlgProcDisplayAttr.cpp
示例18: while
bool JsonString::ReadObject(Token &tokenstart)
{
Token tokenname;
while(ReadToken(tokenname))
{
if(tokenname.type_ == tokenObjectEnd)
{
return true;
}
if(tokenname.type_ != tokenString)
{
break;
}
Token colon;
if(!ReadToken(colon) || colon.type_ != tokenMemberSeparator)
{
return false;
}
bool ok = ReadValue();
if(!ok)
{
return false;
}
Token comma;
if(!ReadToken(comma)
||(comma.type_ != tokenObjectEnd
&& comma.type_ != tokenArraySeparator))
{
return false;
}
if(comma.type_ == tokenObjectEnd)
{
return true;
}
}
return false;
}
开发者ID:Strongc,项目名称:myLib,代码行数:39,代码来源:JsonString.cpp
示例19: RefreshAddresses
void RefreshAddresses(VARINFO *var, int address, THREAD *thread, int noscope)
{
while (var)
{
int unscope = noscope;
int val;
if (noscope)
var->outofscope = TRUE;
else
{
var->outofscope = FALSE;
if (thread)
var->thread = thread;
val = var->address = address + var->offset;
if (var->pointer)
{
unscope = (val = var->derefaddress) == -1 && !ReadValue(var->address, &val, 4, var) || !val;
}
}
RefreshAddresses(var->subtype, val, thread, unscope);
var = var->link;
}
}
开发者ID:doniexun,项目名称:OrangeC,代码行数:23,代码来源:dbgwatch.c
示例20: ExpandPointer
static void ExpandPointer(VARINFO *v, int code, WATCHDATA *ptr)
{
if (v->pointer)
{
if (code == TVE_EXPAND)
{
int val;
int outofscope;
outofscope = ((val = v->derefaddress) == -1 && !ReadValue(v->address, &val, 4, v)) || !val;
if (!v->subtype && ptr->watchinfo_list[v->watchindex].dbg_info)
{
TreeView_DeleteItem(ptr->hwndWatchTree, v->hTreeHolder);
ExpandPointerInfo(ptr->watchinfo_list[v->watchindex].dbg_info, v);
if (v->subtype->structure)
{
InsertSubTree(v->hTreeItem, 0, v->subtype->subtype, v->watchindex, ptr);
}
else
InsertSubTree(v->hTreeItem, 0, v->subtype, v->watchindex, ptr);
}
ptr->structNesting[ptr->nestingCount++] = v;
RefreshAddresses(ptr, v->subtype, val, NULL, outofscope);
ptr->nestingCount--;
RefreshData(ptr->watchinfo_list[v->watchindex].dbg_info, v, TRUE);
}
else if (code == TVE_COLLAPSE)
{
if (v->subtype && !v->derefaddress)
{
FreeTree(v->subtype, ptr);
FreeVarInfo(v->subtype);
v->subtype = 0;
v->hTreeHolder = InsertItem(v->hTreeItem, TVI_LAST, v, ptr);
}
}
}
}
开发者ID:bencz,项目名称:OrangeC,代码行数:37,代码来源:dbgwatch.c
注:本文中的ReadValue函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论