本文整理汇总了C++中StringBuffer::appendInt方法的典型用法代码示例。如果您正苦于以下问题:C++ StringBuffer::appendInt方法的具体用法?C++ StringBuffer::appendInt怎么用?C++ StringBuffer::appendInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringBuffer
的用法示例。
在下文中一共展示了StringBuffer::appendInt方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetEntryType
void PlanEntryModel::SetEntryType(TimeEntry::EntryType type)
{
StringBuffer sb;
sb.appendInt(static_cast<int>(type));
BSTR bstr = SysAllocString(sb);
SetAttribute(TYPE, bstr);
SysFreeString(bstr);
}
示例2: SetState
/// State is internal maintenance flag.
void CTaskModel::SetState(TASK_STATE state)
{
StringBuffer sb;
sb.appendInt(static_cast<int>(state));
SetAttribute(STATE, sb);
SetModifiedDate(ModelUtils::CurrentUTC());
TaskEvent te(TaskEvent::PercentComplete, m_id);
notifyTaskListeners(&te);
}
示例3: toString
TCHAR* Token::toString() const{
StringBuffer sb;
sb.append(_T("("));
sb.append( _termText );
sb.append(_T(","));
sb.appendInt( _startOffset );
sb.append(_T(","));
sb.appendInt( _endOffset );
if ((!_tcscmp( _type, _T("word"))) == 0 ){
sb.append(_T(",type="));
sb.append(_type);
}
if (positionIncrement != 1){
sb.append(_T(",posIncr="));
sb.appendInt(positionIncrement);
}
sb.append(_T(")"));
return sb.toString();
}
示例4: SetPriority
///
/// Arbitrary integer set by user.
///
void CTaskModel::SetPriority(int pri)
{
StringBuffer sb;
sb.appendInt(pri);
SetAttribute(PRIORITY, sb);
SetModifiedDate(ModelUtils::CurrentUTC());
#ifdef _DEBUG
TCHAR out[1024];
_stprintf_s(out, _T("Set Task: %0.16I64x -Priority: %d\r\n"), m_id, pri);
OutputDebugString(out);
#endif
TaskEvent te(TaskEvent::Priority, m_id);
notifyTaskListeners(&te);
}